swh:1:snp:b37d435721bbd450624165f334724e3585346499
Raw File
Tip revision: e763335602af9b981c691f4c66eff25ef46bdea7 authored by Marcos Cáceres on 07 September 2018, 07:56:16 UTC
Add defaults to PaymentMethodChangeEventInit's members.
Tip revision: e763335
idlharness.any.js
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: script=resources/load_wasm.js

'use strict';

// https://webassembly.github.io/spec/js-api/

promise_test(async () => {
  const srcs = ['wasm-js-api'];
  const [wasm] = await Promise.all(
    srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));

  const idl_array = new IdlArray();
  idl_array.add_idls(wasm);
  // Ignored errors are surfaced in idlharness.js's test_object below.
  try {
    self.memory = new Memory({initial: 1024});
  } catch (e) { }

  try {
    self.mod = await createWasmModule();
    self.instance = new Instance(self.mod);
  } catch (e) { }

  idl_array.add_objects({
    Memory: ['memory'],
    Module: ['mod'],
    Instance: ['instance'],
  });
  idl_array.test();
}, 'wasm-js-api interfaces.');

back to top