diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini index 3605e8f3fc9..76b44d9e9cf 100644 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -4,7 +4,7 @@ expected: TIMEOUT [Opening a blob URL in a new window immediately before revoking it works.] - expected: TIMEOUT + expected: FAIL [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini new file mode 100644 index 00000000000..4bfb0c2053a --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-004.html] + [Miss float below something else] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini new file mode 100644 index 00000000000..baa9f1a7541 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-005.html] + [Miss clipped float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini index 4a1e8110f6f..f8e7e539aae 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini @@ -2,3 +2,6 @@ [Hit test intersecting scaled box] expected: FAIL + [Hit test within unscaled box] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini index d080f72a962..a6c39d50087 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini @@ -8,6 +8,3 @@ [throws if handleEvent is thruthy and not callable] expected: FAIL - [doesn't look up handleEvent method on callable event listeners] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini new file mode 100644 index 00000000000..e38782d8c85 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPoint-001.html.ini @@ -0,0 +1,4 @@ +[elementFromPoint-001.html] + [CSSOM View - 5 - extensions to the Document interface] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini index c131078eace..23c61ede1a1 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini @@ -17,3 +17,6 @@ [test the top of layer] expected: FAIL + [test some point of the element: top left corner] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini index 3bd0a5266dd..239c35135e4 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/offsetTopLeft-border-box.html.ini @@ -1,85 +1,7 @@ [offsetTopLeft-border-box.html] - [container: 11] - expected: FAIL - - [container: 10] - expected: FAIL - - [container: 13] - expected: FAIL - - [container: 12] - expected: FAIL - - [container: 15] - expected: FAIL - - [container: 14] - expected: FAIL - - [container: 17] - expected: FAIL - - [container: 16] - expected: FAIL - - [container: 19] - expected: FAIL - - [container: 18] - expected: FAIL - - [container: 9] - expected: FAIL - - [container: 8] - expected: FAIL - [container: 1] expected: FAIL [container: 0] expected: FAIL - [container: 3] - expected: FAIL - - [container: 2] - expected: FAIL - - [container: 5] - expected: FAIL - - [container: 4] - expected: FAIL - - [container: 7] - expected: FAIL - - [container: 6] - expected: FAIL - - [container: 20] - expected: FAIL - - [container: 21] - expected: FAIL - - [container: 22] - expected: FAIL - - [container: 23] - expected: FAIL - - [container: 24] - expected: FAIL - - [container: 25] - expected: FAIL - - [container: 26] - expected: FAIL - - [container: 27] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index 987cea68562..ae2bd6e1de2 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -312,24 +312,21 @@ [Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK] expected: NOTRUN - [ + + + diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/entry.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/entry.html new file mode 100644 index 00000000000..15018074491 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/entry.html @@ -0,0 +1,43 @@ + + +Entry settings object for host functions + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/helper.js b/tests/wpt/web-platform-tests/wasm/jsapi/functions/helper.js new file mode 100644 index 00000000000..487791c69ad --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/helper.js @@ -0,0 +1,12 @@ +function call_later(f) { + const builder = new WasmModuleBuilder(); + const functionIndex = builder.addImport("module", "imported", kSig_v_v); + builder.addStart(functionIndex); + const buffer = builder.toBuffer(); + + WebAssembly.instantiate(buffer, { + "module": { + "imported": f, + } + }); +} diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/incumbent.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/incumbent.html new file mode 100644 index 00000000000..cb276329770 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/incumbent.html @@ -0,0 +1,54 @@ + + +Incumbent settings object for host functions + + + + + + + + diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/README.md b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/README.md new file mode 100644 index 00000000000..a89258a4e01 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/README.md @@ -0,0 +1,5 @@ +A couple notes about the files scattered in this `resources/` directory: + +* The nested directory structure is necessary here so that relative URL resolution can be tested; we need different sub-paths for each document. + +* The semi-duplicate `window-to-open.html`s scattered throughout are present because Firefox, at least, does not fire `Window` `load` events for 404s, so we want to ensure that no matter which global is used, `window`'s `load` event is hit and our tests can proceed. diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/current/current.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/current/current.html new file mode 100644 index 00000000000..63d9c437fc5 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/current/current.html @@ -0,0 +1,4 @@ + + +Current page used as a test helper + diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/current/resources/window-to-open.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/current/resources/window-to-open.html new file mode 100644 index 00000000000..1bc4cca9a39 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/current/resources/window-to-open.html @@ -0,0 +1,3 @@ + + +If the current settings object is used this page will be opened diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/entry-incumbent.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/entry-incumbent.html new file mode 100644 index 00000000000..6b210563e99 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/entry-incumbent.html @@ -0,0 +1,15 @@ + + +Incumbent page used as a test helper + + + + + diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/function/function.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/function/function.html new file mode 100644 index 00000000000..979b902eaa0 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/function/function.html @@ -0,0 +1,3 @@ + + +Realm for a host function used as a test helper diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/function/resources/window-to-open.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/function/resources/window-to-open.html new file mode 100644 index 00000000000..3928c1f8aa9 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/function/resources/window-to-open.html @@ -0,0 +1,3 @@ + + +If the function's settings object is used this page will be opened diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/incumbent-incumbent.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/incumbent-incumbent.html new file mode 100644 index 00000000000..5e84f65a084 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/incumbent-incumbent.html @@ -0,0 +1,24 @@ + + +Incumbent page used as a test helper + + + + + + + + diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/relevant/relevant.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/relevant/relevant.html new file mode 100644 index 00000000000..06df91c2374 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/relevant/relevant.html @@ -0,0 +1,14 @@ + + +Relevant page used as a test helper + + diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/relevant/resources/window-to-open.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/relevant/resources/window-to-open.html new file mode 100644 index 00000000000..4138b5a0844 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/relevant/resources/window-to-open.html @@ -0,0 +1,3 @@ + + +If the relevant settings object is used this page will be opened diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/resources/window-to-open.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/resources/window-to-open.html new file mode 100644 index 00000000000..7743b9b5782 --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/resources/window-to-open.html @@ -0,0 +1,3 @@ + + +If the incumbent settings object is used this page will be opened diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/window-to-open.html b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/window-to-open.html new file mode 100644 index 00000000000..ce357937f5e --- /dev/null +++ b/tests/wpt/web-platform-tests/wasm/jsapi/functions/resources/window-to-open.html @@ -0,0 +1,3 @@ + + +If the entry settings object is used this page will be opened diff --git a/tests/wpt/web-platform-tests/wasm/jsapi/wasm-module-builder.js b/tests/wpt/web-platform-tests/wasm/jsapi/wasm-module-builder.js index 82c6e04135f..25fb1c836b0 100644 --- a/tests/wpt/web-platform-tests/wasm/jsapi/wasm-module-builder.js +++ b/tests/wpt/web-platform-tests/wasm/jsapi/wasm-module-builder.js @@ -3,10 +3,8 @@ // found in the LICENSE file. // Used for encoding f32 and double constants to bits. -let f32_view = new Float32Array(1); -let f32_bytes_view = new Uint8Array(f32_view.buffer); -let f64_view = new Float64Array(1); -let f64_bytes_view = new Uint8Array(f64_view.buffer); +let byte_view = new Uint8Array(8); +let data_view = new DataView(byte_view.buffer); // The bytes function receives one of // - several arguments, each of which is either a number or a string of length @@ -1017,14 +1015,10 @@ class WasmModuleBuilder { section.emit_u64v(global.init); break; case kWasmF32: - section.emit_u8(kExprF32Const); - f32_view[0] = global.init; - section.emit_bytes(f32_bytes_view); + section.emit_bytes(wasmF32Const(global.init)); break; case kWasmF64: - section.emit_u8(kExprF64Const); - f64_view[0] = global.init; - section.emit_bytes(f64_bytes_view); + section.emit_bytes(wasmF64Const(global.init)); break; case kWasmAnyFunc: case kWasmAnyRef: @@ -1322,18 +1316,18 @@ function wasmI32Const(val) { } function wasmF32Const(f) { - f32_view[0] = f; + // Write in little-endian order at offset 0. + data_view.setFloat32(0, f, true); return [ - kExprF32Const, f32_bytes_view[0], f32_bytes_view[1], f32_bytes_view[2], - f32_bytes_view[3] + kExprF32Const, byte_view[0], byte_view[1], byte_view[2], byte_view[3] ]; } function wasmF64Const(f) { - f64_view[0] = f; + // Write in little-endian order at offset 0. + data_view.setFloat64(0, f, true); return [ - kExprF64Const, f64_bytes_view[0], f64_bytes_view[1], f64_bytes_view[2], - f64_bytes_view[3], f64_bytes_view[4], f64_bytes_view[5], f64_bytes_view[6], - f64_bytes_view[7] + kExprF64Const, byte_view[0], byte_view[1], byte_view[2], + byte_view[3], byte_view[4], byte_view[5], byte_view[6], byte_view[7] ]; }