GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: wpt for Wasm jsapi including new ESM Integration tests · nodejs/node@cd391b5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test
    • common
      • wpt.js
      • wpt
        • worker.js
    • fixtures/wpt
      • README.md
      • versions.json
      • wasm
        • jsapi
          • WEB_FEATURES.yml
          • assertions.js
          • bad-imports.js
          • constructor
            • WEB_FEATURES.yml
            • compile.any.js
            • instantiate-bad-imports.any.js
            • instantiate.any.js
            • multi-value.any.js
            • toStringTag.any.js
            • validate.any.js
          • esm-integration
            • WEB_FEATURES.yml
            • exports.tentative.any.js
            • global-exports-live-bindings.tentative.any.js
            • global-exports.tentative.any.js
            • js-wasm-cycle.tentative.any.js
            • mutable-global-sharing.tentative.any.js
            • namespace-instance.tentative.any.js
            • reserved-import-names.tentative.any.js
            • resolve-export.tentative.any.js
            • resources
              • dep.wasm
              • exports.wasm
              • globals.js
              • globals.wasm
              • invalid-export-name-wasm-js.wasm
              • invalid-export-name.wasm
              • invalid-import-module.wasm
              • invalid-import-name-wasm-js.wasm
              • invalid-import-name.wasm
              • js-string-builtins.wasm
              • js-wasm-cycle.js
              • js-wasm-cycle.wasm
              • log.js
              • mutable-global-export.wasm
              • mutable-global-reexport.wasm
              • resolve-export.js
              • resolve-export.wasm
              • source-phase-identity.js
              • wasm-export-to-wasm.wasm
              • wasm-import-from-wasm.wasm
            • source-phase-string-builtins.tentative.any.js
            • source-phase.tentative.any.js
            • string-builtins.tentative.any.js
            • v128-tdz.tentative.any.js
            • wasm-import-wasm-export.tentative.any.js
          • exception
            • WEB_FEATURES.yml
            • basic.tentative.any.js
            • constructor.tentative.any.js
            • getArg.tentative.any.js
            • identity.tentative.any.js
            • is.tentative.any.js
            • toString.tentative.any.js
          • functions
            • WEB_FEATURES.yml
          • function
            • call.tentative.any.js
            • constructor.tentative.any.js
            • table.tentative.any.js
            • type.tentative.any.js
          • gc
            • casts.tentative.any.js
            • exported-object.tentative.any.js
            • i31.tentative.any.js
          • global
            • WEB_FEATURES.yml
            • constructor.any.js
            • toString.any.js
            • type.tentative.any.js
            • value-get-set.any.js
            • valueOf.any.js
          • idlharness.any.js
          • instanceTestFactory.js
          • instance
            • WEB_FEATURES.yml
            • constructor-bad-imports.any.js
            • constructor-caching.any.js
            • constructor.any.js
            • exports.any.js
            • toString.any.js
          • interface.any.js
          • js-string
            • WEB_FEATURES.yml
            • basic.any.js
            • constants.any.js
            • imports.any.js
            • polyfill.js
          • jspi
            • README.txt
            • js-promise-integration.any.js
            • notraps.any.js
            • rejects.any.js
            • testharness-additions.js
          • memory
            • WEB_FEATURES.yml
            • assertions.js
            • constructor-shared.tentative.any.js
            • constructor-types.tentative.any.js
            • constructor.any.js
            • grow.any.js
            • to-fixed-length-buffer-shared.any.js
            • to-fixed-length-buffer.any.js
            • to-resizable-buffer-shared.any.js
            • to-resizable-buffer.any.js
            • type.tentative.any.js
          • module
            • WEB_FEATURES.yml
            • constructor.any.js
            • customSections.any.js
            • exports.any.js
            • imports.any.js
            • moduleSource.tentative.any.js
            • toString.any.js
          • prototypes.any.js
          • table
            • WEB_FEATURES.yml
            • assertions.js
            • constructor-types.tentative.any.js
            • constructor.any.js
            • get-set.any.js
            • grow.any.js
            • length.any.js
            • toString.any.js
            • type.tentative.any.js
          • tag
            • WEB_FEATURES.yml
            • constructor.tentative.any.js
            • toString.tentative.any.js
            • type.tentative.any.js
          • wasm-module-builder.js
        • resources
          • load_wasm.js
    • wpt
      • status/wasm
        • jsapi.json
      • test-wasm-jsapi.mjs

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/common/wpt.js‎

Copy file name to clipboardExpand all lines: test/common/wpt.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ class WPTRunner {
922922
console.log(test.stack);
923923
}
924924
const command = `${process.execPath} ${process.execArgv}` +
925-
` ${require.main.filename} '${spec.filename}${spec.variant}'`;
925+
` ${require.main?.filename} '${spec.filename}${spec.variant}'`;
926926
console.log(`Command: ${command}\n`);
927927

928928
reportResult?.addSubtest(test.name, 'FAIL', test.message);
Collapse file

‎test/common/wpt/worker.js‎

Copy file name to clipboardExpand all lines: test/common/wpt/worker.js
+13-3Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
'use strict';
22

3-
const { runInNewContext, runInThisContext } = require('vm');
3+
const {
4+
runInNewContext,
5+
runInThisContext,
6+
constants: { USE_MAIN_CONTEXT_DEFAULT_LOADER },
7+
} = require('vm');
48
const { setFlagsFromString } = require('v8');
59
const { parentPort, workerData } = require('worker_threads');
610

@@ -28,11 +32,14 @@ globalThis.fetch = function fetch(file) {
2832
};
2933

3034
if (workerData.initScript) {
31-
runInThisContext(workerData.initScript);
35+
runInThisContext(workerData.initScript, {
36+
importModuleDynamically: USE_MAIN_CONTEXT_DEFAULT_LOADER,
37+
});
3238
}
3339

3440
runInThisContext(workerData.harness.code, {
3541
filename: workerData.harness.filename,
42+
importModuleDynamically: USE_MAIN_CONTEXT_DEFAULT_LOADER,
3643
});
3744

3845
// eslint-disable-next-line no-undef
@@ -66,5 +73,8 @@ add_completion_callback((_, status) => {
6673
});
6774

6875
for (const scriptToRun of workerData.scriptsToRun) {
69-
runInThisContext(scriptToRun.code, { filename: scriptToRun.filename });
76+
runInThisContext(scriptToRun.code, {
77+
filename: scriptToRun.filename,
78+
importModuleDynamically: USE_MAIN_CONTEXT_DEFAULT_LOADER,
79+
});
7080
}
Collapse file

‎test/fixtures/wpt/README.md‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/README.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Last update:
3131
- url: https://github.com/web-platform-tests/wpt/tree/fc3e651593/url
3232
- urlpattern: https://github.com/web-platform-tests/wpt/tree/a2e15ad405/urlpattern
3333
- user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing
34-
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi
34+
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/65a2134d50/wasm/jsapi
3535
- wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi
3636
- web-locks: https://github.com/web-platform-tests/wpt/tree/10a122a6bc/web-locks
3737
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/2cb332d710/WebCryptoAPI
Collapse file

‎test/fixtures/wpt/versions.json‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/versions.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"path": "user-timing"
8585
},
8686
"wasm/jsapi": {
87-
"commit": "cde25e7e3c3b9d2280eb088a3fb9da988793d255",
87+
"commit": "65a2134d50",
8888
"path": "wasm/jsapi"
8989
},
9090
"wasm/webapi": {
Collapse file

‎test/fixtures/wpt/wasm/jsapi/WEB_FEATURES.yml‎

Copy file name to clipboard
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
features:
2+
- name: wasm
3+
files:
4+
- "*"
Collapse file

‎test/fixtures/wpt/wasm/jsapi/assertions.js‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/wasm/jsapi/assertions.js
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ function assert_function_name(fn, name, description) {
66
assert_true(propdesc.configurable, "configurable", `${description} name should be configurable`);
77
assert_equals(propdesc.value, name, `${description} name should be ${name}`);
88
}
9+
globalThis.assert_function_name = assert_function_name;
910

1011
function assert_function_length(fn, length, description) {
1112
const propdesc = Object.getOwnPropertyDescriptor(fn, "length");
@@ -15,6 +16,7 @@ function assert_function_length(fn, length, description) {
1516
assert_true(propdesc.configurable, "configurable", `${description} length should be configurable`);
1617
assert_equals(propdesc.value, length, `${description} length should be ${length}`);
1718
}
19+
globalThis.assert_function_length = assert_function_length;
1820

1921
function assert_exported_function(fn, { name, length }, description) {
2022
if (WebAssembly.Function === undefined) {
@@ -28,6 +30,7 @@ function assert_exported_function(fn, { name, length }, description) {
2830
assert_function_name(fn, name, description);
2931
assert_function_length(fn, length, description);
3032
}
33+
globalThis.assert_exported_function = assert_exported_function;
3134

3235
function assert_Instance(instance, expected_exports) {
3336
assert_equals(Object.getPrototypeOf(instance), WebAssembly.Instance.prototype,
@@ -77,6 +80,7 @@ function assert_Instance(instance, expected_exports) {
7780
}
7881
}
7982
}
83+
globalThis.assert_Instance = assert_Instance;
8084

8185
function assert_WebAssemblyInstantiatedSource(actual, expected_exports={}) {
8286
assert_equals(Object.getPrototypeOf(actual), Object.prototype,
@@ -98,3 +102,4 @@ function assert_WebAssemblyInstantiatedSource(actual, expected_exports={}) {
98102
assert_true(instance.configurable, "instance: configurable");
99103
assert_Instance(instance.value, expected_exports);
100104
}
105+
globalThis.assert_WebAssemblyInstantiatedSource = assert_WebAssemblyInstantiatedSource;
Collapse file

‎test/fixtures/wpt/wasm/jsapi/bad-imports.js‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/wasm/jsapi/bad-imports.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,4 @@ function test_bad_imports(t) {
183183
});
184184
}
185185
}
186+
globalThis.test_bad_imports = test_bad_imports;
Collapse file

‎test/fixtures/wpt/wasm/jsapi/constructor/WEB_FEATURES.yml‎

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
features:
2+
- name: wasm
3+
files:
4+
- "*"
5+
- "!multi-value.any.js"
6+
- name: wasm-multi-value
7+
files:
8+
- "multi-value.any.js"
Collapse file

‎test/fixtures/wpt/wasm/jsapi/constructor/compile.any.js‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/wasm/jsapi/constructor/compile.any.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// META: global=window,dedicatedworker,jsshell
1+
// META: global=window,dedicatedworker,jsshell,shadowrealm
22
// META: script=/wasm/jsapi/wasm-module-builder.js
33

44
function assert_Module(module) {
Collapse file

‎test/fixtures/wpt/wasm/jsapi/constructor/instantiate-bad-imports.any.js‎

Copy file name to clipboardExpand all lines: test/fixtures/wpt/wasm/jsapi/constructor/instantiate-bad-imports.any.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// META: global=window,dedicatedworker,jsshell
1+
// META: global=window,dedicatedworker,jsshell,shadowrealm
22
// META: script=/wasm/jsapi/wasm-module-builder.js
33
// META: script=/wasm/jsapi/bad-imports.js
44

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.