diff options
210 files changed, 1700 insertions, 1197 deletions
diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini deleted file mode 100644 index f29da48a2a0..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-003.html] - [Miss float below something else] - 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 deleted file mode 100644 index 4bfb0c2053a..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[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 deleted file mode 100644 index baa9f1a7541..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-005.html] - [Miss clipped float] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini deleted file mode 100644 index 4c79907309b..00000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/CaretPosition-001.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[CaretPosition-001.html] - [Element at (400, 100)] - 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 23c61ede1a1..c131078eace 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,6 +17,3 @@ [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/matchMedia-display-none-iframe.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/matchMedia-display-none-iframe.html.ini deleted file mode 100644 index e6e1f29e274..00000000000 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/matchMedia-display-none-iframe.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[matchMedia-display-none-iframe.html] - expected: ERROR 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 5e04e805c9d..1cb7a0c1126 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 @@ -309,21 +309,18 @@ [Response: combined response Content-Type: text/html;" \\" text/plain ";charset=GBK] expected: NOTRUN - [<iframe>: separate response Content-Type: text/html */*;charset=gbk] - expected: FAIL - - [<iframe>: separate response Content-Type: text/plain */*] + [<iframe>: separate response Content-Type: text/html;" text/plain] expected: FAIL - [<iframe>: combined response Content-Type: */* text/html] + [<iframe>: combined response Content-Type: text/html */*;charset=gbk] expected: FAIL - [<iframe>: separate response Content-Type: text/html;" text/plain] + [<iframe>: combined response Content-Type: text/html */*] expected: FAIL - [<iframe>: combined response Content-Type: text/html */*;charset=gbk] + [<iframe>: combined response Content-Type: text/html;" \\" text/plain] expected: FAIL - [<iframe>: separate response Content-Type: text/html;x=" text/plain] + [<iframe>: combined response Content-Type: text/html;x=" text/plain] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini index b2ffc8abf78..d2df9b78483 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini @@ -56,6 +56,3 @@ [separate text/javascript x/x] expected: FAIL - [separate text/javascript error] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini index ec1fd06e1f5..30e1b851fd4 100644 --- a/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,6 +11,3 @@ [X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!] expected: FAIL - [X-Content-Type-Options%3A%0D%0AX-Content-Type-Options%3A%20nosniff] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini new file mode 100644 index 00000000000..87b07c3e670 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini @@ -0,0 +1,4 @@ +[traverse_the_history_1.html] + [Multiple history traversals from the same task] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini new file mode 100644 index 00000000000..51f8272a6de --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini @@ -0,0 +1,4 @@ +[traverse_the_history_3.html] + [Multiple history traversals, last would be aborted] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini deleted file mode 100644 index 735a9a75a2a..00000000000 --- a/tests/wpt/metadata-layout-2020/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[cross-origin-objects-on-new-window.html] - expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html.ini new file mode 100644 index 00000000000..16fa2c5cfc1 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html.ini @@ -0,0 +1,4 @@ +[creating_browsing_context_test_01.html] + [first argument: absolute url] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index f45aaafe1c5..4e69eb752b6 100644 --- a/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,15 +1,16 @@ [supported-elements.html] + expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL [Host element with delegatesFocus including no focusable descendants should be skipped] - expected: FAIL + expected: TIMEOUT [Element with tabindex should support autofocus] expected: FAIL [Area element should support autofocus] - expected: FAIL + expected: NOTRUN [Host element with delegatesFocus should support autofocus] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini index 5c3ac06f42a..09ae27d7480 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini @@ -171,3 +171,6 @@ [XHTML img usemap="#hash-id"] expected: FAIL + [HTML (standards) IMG usemap="no-hash-name"] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini index c792a071c3b..0407f0cc2b7 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,5 +1,5 @@ [iframe_sandbox_popups_nonescaping-2.html] - expected: CRASH + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index 7a36937927c..f4f994c5d6f 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,4 +1,5 @@ [iframe_sandbox_popups_nonescaping-3.html] + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini b/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini deleted file mode 100644 index 6cf9d13975c..00000000000 --- a/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[iframe_005.html] - [document.write external script into iframe write back into parent] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/module-delayed.html.ini b/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/module-delayed.html.ini deleted file mode 100644 index 59a54fe88e4..00000000000 --- a/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/document-write/module-delayed.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[module-delayed.html] - [async document.write in a module] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini b/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini index 57744023f73..58c9d7f8c0c 100644 --- a/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini +++ b/tests/wpt/metadata-layout-2020/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini @@ -1,5 +1,5 @@ [ignore-opens-during-unload.window.html] - expected: CRASH + expected: TIMEOUT [document.open should bail out when ignore-opens-during-unload is greater than 0 during visibilitychange event (open(parent) while unloading parent and child)] expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index dbec6f2c2ff..450c88bd32b 100644 --- a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -3,3 +3,6 @@ [The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] expected: TIMEOUT + [The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini index d65177c2a5b..16614b18649 100644 --- a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini +++ b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini @@ -1,7 +1,6 @@ [promise-rejection-events.html] - expected: TIMEOUT [delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire] - expected: TIMEOUT + expected: FAIL [unhandledrejection: from createImageBitmap which is UA triggered] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini index 29da96167e9..929eba7a1d5 100644 --- a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini +++ b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini @@ -320,3 +320,6 @@ [X SNR (-625.5179152127479 dB) is not greater than or equal to 65.737. Got -625.5179152127479.] expected: FAIL + [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[28696\]\t-6.7884163052642179e-30\t9.3139332532882690e-1\t9.3139332532882690e-1\t1.0000000000000000e+0\t3.8985999999999999e-3\n\t[28697\]\t7.0477002859115601e-1\t9.0675884485244751e-1\t2.0198881626129150e-1\t2.2275913536212616e-1\t3.8985999999999999e-3\n\tMax AbsError of 9.3139332532882690e-1 at index of 28696.\n\tMax RelError of 1.0000000000000000e+0 at index of 28696.\n] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini index b7e13cf7726..f1281b5ae81 100644 --- a/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini +++ b/tests/wpt/metadata-layout-2020/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini @@ -1,4 +1,5 @@ [audiocontext-not-fully-active.html] + expected: TIMEOUT [frame in navigated remote-site frame] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/webmessaging/with-ports/018.html.ini b/tests/wpt/metadata-layout-2020/webmessaging/with-ports/018.html.ini new file mode 100644 index 00000000000..663a1f8fa30 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/webmessaging/with-ports/018.html.ini @@ -0,0 +1,5 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT + diff --git a/tests/wpt/metadata-layout-2020/webmessaging/without-ports/017.html.ini b/tests/wpt/metadata-layout-2020/webmessaging/without-ports/017.html.ini deleted file mode 100644 index 064cf47545b..00000000000 --- a/tests/wpt/metadata-layout-2020/webmessaging/without-ports/017.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[017.html] - expected: TIMEOUT - [origin of the script that invoked the method, about:blank] - expected: TIMEOUT - diff --git a/tests/wpt/metadata-layout-2020/workers/baseurl/alpha/sharedworker-in-worker.html.ini b/tests/wpt/metadata-layout-2020/workers/baseurl/alpha/sharedworker-in-worker.html.ini index 650c91da4a6..333edb3a26e 100644 --- a/tests/wpt/metadata-layout-2020/workers/baseurl/alpha/sharedworker-in-worker.html.ini +++ b/tests/wpt/metadata-layout-2020/workers/baseurl/alpha/sharedworker-in-worker.html.ini @@ -1,5 +1,4 @@ [sharedworker-in-worker.html] - expected: ERROR [Base URL in workers: new SharedWorker()] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/workers/constructors/Worker/Worker-constructor.html.ini b/tests/wpt/metadata-layout-2020/workers/constructors/Worker/Worker-constructor.html.ini new file mode 100644 index 00000000000..80f9a4f15b8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/workers/constructors/Worker/Worker-constructor.html.ini @@ -0,0 +1,2 @@ +[Worker-constructor.html] + expected: ERROR diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 1e0b205480f..a725d81e592 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -126569,7 +126569,7 @@ ] ], "border-radius-clip-002.htm": [ - "c6aa0c6a3e10b639673541d7a16e1c7a43ac8fd2", + "e81871ee50c4498c3ed3a63672725e2e395b5281", [ null, [ @@ -139086,6 +139086,19 @@ {} ] ], + "flex-aspect-ratio-img-row-014.html": [ + "9f12b65f8435ef781d2a98170a70eb66574f73e5", + [ + null, + [ + [ + "/css/css-flexbox/reference/flex-aspect-ratio-img-row-014-ref.html", + "==" + ] + ], + {} + ] + ], "flex-base.html": [ "93401d3fe32716ca14a3f7f3be4f0fa64a7fabf2", [ @@ -244728,6 +244741,19 @@ {} ] ], + "legend-position-relative-2.html": [ + "3fbdbd5c2065addbbcd66a27de83406c7f1d4aa7", + [ + null, + [ + [ + "/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-2-ref.html", + "==" + ] + ], + {} + ] + ], "legend-position-relative.html": [ "993836126143a8921e31bc8e61bef955eb302503", [ @@ -279732,6 +279758,14 @@ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", [] ], + "attributes": { + "resources": { + "secure-non-secure-child.html": [ + "f6a4682f8aecc1fe2aaacc928836dfbba2b8af09", + [] + ] + } + }, "domain": { "domain-attribute-host-with-and-without-leading-period.sub.https.html.sub.headers": [ "77d3d8c0c447c99fa556ea58dee090fadf7ad31d", @@ -280001,214 +280035,6 @@ "fea1e1a643b97d4a101d704bd1497376a4997b3c", [] ], - "attribute0001-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0001-test": [ - "6199f78cff28e9deb6ea7e929d6d17ddfbf66c3f", - [] - ], - "attribute0002-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0002-test": [ - "047a24d9a5018e37269c7d257894db487f12bcaf", - [] - ], - "attribute0003-expected": [ - "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c", - [] - ], - "attribute0003-test": [ - "c944bac478bc34bf48627b634e98b96acf9772af", - [] - ], - "attribute0004-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0004-test": [ - "bcfaa7d8384832f4237f19f09b18432e8ded8fcb", - [] - ], - "attribute0005-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0005-test": [ - "1671087813f0304b45c1156e2bd80dbe7cc0f8a2", - [] - ], - "attribute0006-expected": [ - "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c", - [] - ], - "attribute0006-test": [ - "39d7589033d9b13e4263605a1b6799438c2120a2", - [] - ], - "attribute0007-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0007-test": [ - "f75f46a71d90df2e29ec93f214a717b210d90c38", - [] - ], - "attribute0008-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0008-test": [ - "be45b3a2c722804b852aa36070a5523b4f4d272c", - [] - ], - "attribute0009-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0009-test": [ - "1a44c2244014a4aca8f455b725828d33f1a7878d", - [] - ], - "attribute0010-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0010-test": [ - "ca6220061e86e612c851105bb8a8cfc67f8b93e9", - [] - ], - "attribute0011-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0011-test": [ - "3bd4c2e99882076e5482df9692c99fe05b7fb47a", - [] - ], - "attribute0012-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0012-test": [ - "6e7b816616391bf3b72e9373fb203003051a8ca4", - [] - ], - "attribute0013-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0013-test": [ - "f4814e432a498aa73bb1bb3eab5dbc10fb19d263", - [] - ], - "attribute0014-expected": [ - "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c", - [] - ], - "attribute0014-test": [ - "ef88896aaf7bdc14008b10b79dc628e0d812492e", - [] - ], - "attribute0015-expected": [ - "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c", - [] - ], - "attribute0015-test": [ - "cea7060a9c971d7ee7ef438f34bf51ded374b40f", - [] - ], - "attribute0016-expected": [ - "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c", - [] - ], - "attribute0016-test": [ - "9a5b591a78888796d10441fbf49ff5fe20d7c635", - [] - ], - "attribute0017-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0017-test": [ - "a6aeeb34ea7b41779b75f30c116b952ccb2e14b4", - [] - ], - "attribute0018-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0018-test": [ - "f9122013443607e641d72640c6ec382cffaa487a", - [] - ], - "attribute0019-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0019-test": [ - "a424c6ee68d17dbf01ed4de7a3610bf3ba8aaf44", - [] - ], - "attribute0020-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0020-test": [ - "367d2a104f5bbc9e48255189d0dae12ab0b094a3", - [] - ], - "attribute0021-expected": [ - "b14d4f69b58c3d9cc7ed1f363d42d625e7bdcf8c", - [] - ], - "attribute0021-test": [ - "bb76deb3afcf0041286612e755c08077414ed36c", - [] - ], - "attribute0022-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0022-test": [ - "ac79c0f9ec9d15abd7cd5fb65e11a2ac3a3c6e3a", - [] - ], - "attribute0023-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0023-test": [ - "97f2ac3946bda38f597e013b6505014d07f1636f", - [] - ], - "attribute0024-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0024-test": [ - "cb041c56c1c3db9bc6049a1bd4f384ac86eeaeee", - [] - ], - "attribute0025-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0025-test": [ - "c430943516d4ec679c63a04ece96aedb3fcf355a", - [] - ], - "attribute0026-expected": [ - "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", - [] - ], - "attribute0026-test": [ - "7f68322ee2e3710a12f3238ce2af834d1fe15164", - [] - ], "charset0001-expected": [ "8646afc636624f223fe79296a6d2b49747258d52", [] @@ -281554,7 +281380,11 @@ [] ], "cookie-helper.sub.js": [ - "50dcdfc5ecbb6dd023eef9ce64beab5e277db406", + "3f0aac26efe00a04a04dab727ef8438f86e21757", + [] + ], + "cookie.py": [ + "9710b518e21c317dc103722835b334c7843636d8", [] ], "drop.py": [ @@ -281574,7 +281404,7 @@ [] ], "echo-cookie.html": [ - "a715b8b4294ffdc89b4d1dc6172cea91ccfc8073", + "4780447e8baf0a6c69e72ef8b156bbacccf6e525", [] ], "echo-json.py": [ @@ -303882,6 +303712,10 @@ "5fe4eadd958ea1c70d6fd361f3b986639cd4e1db", [] ], + "flex-aspect-ratio-img-row-014-ref.html": [ + "ea36ff403011527bf63d248db2fc40ff24328d91", + [] + ], "flex-base-ref.html": [ "d5c4709094c2d71e6eeb3c702549bba7258e1f56", [] @@ -333406,7 +333240,7 @@ [] ], "progressive-image.py": [ - "64cc44ee0f2259f54c2c1ab303c57577890acf62", + "84e98c84510622c26002ec2bfa593b015ac939a1", [] ], "slow-image.py": [ @@ -334786,7 +334620,7 @@ [] ], "message2.py": [ - "cfe908406fc1c64bfee94f285d6335f80b5ec722", + "8515e7b25eb9e60e74700f51d9d2cdfa062dcae1", [] ], "reconnect-fail.py": [ @@ -345047,6 +344881,10 @@ "94f4991f2272da61a9a8381d07abb243677d06a9", [] ], + "legend-position-relative-2-ref.html": [ + "da2dd3e1c61cc42e948169c6a36c8947744c7e76", + [] + ], "legend-position-relative-ref.html": [ "fd6c11a00566759fbf1e749d49ad396cf1a7ee08", [] @@ -347986,7 +347824,7 @@ [] ], "moving-between-documents-iframe.py": [ - "b7b6dac1937c203f10cfbdcad315a6d240d10f32", + "dbcfe9b8d0d295074c6aaa950a0a73503e42990d", [] ], "slow-flag-setter.py": [ @@ -351706,40 +351544,120 @@ "953611f93037cfebe0459d5f67599b727539ae40", [] ], + "detached.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], + "iframe.cross-origin.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], + "iframe.cross-site.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], + "iframe.same-origin.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], + "main-frame-and-worker.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], + "main-frame.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], + "redirect.client.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], + "redirect.server.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], "resources": { "common.js": [ - "3b246719799d2f963bc5cb4cd12500bba62ecb08", + "11b40d7d3d17ff0708c457a43d66b360b7e0bb07", [] ], "iframe.redirect.sub.html": [ "6eaf557422c18e9f0d7a27870102227267af81c1", [] ], + "iframe.redirect.sub.html.headers": [ + "4e798cd9f5d3f756df077a43ce9a1a6f9b41fd28", + [] + ], "iframe.secret.sub.html": [ "55caa347fbfdb2b182bd6d2e1e22088eb78e0d3a", [] ], + "iframe.secret.sub.html.headers": [ + "b227e843ae8e4b9136127c37eed0353c5d21c85c", + [] + ], "iframe.sub.html": [ "96b7b1a83982e2f38bc4e9cc4288a3708611bb30", [] ], + "iframe.sub.html.headers": [ + "b227e843ae8e4b9136127c37eed0353c5d21c85c", + [] + ], + "redirect.py": [ + "1e6dbff8a8478c22d04948d1a358098a2c98470f", + [] + ], "window.redirect.sub.html": [ "b339abc54f7a3e72184b434de85231763b1734c4", [] ], + "window.redirect.sub.html.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], "window.secret.sub.html": [ "99d9d1251b28e0a91633a0f162ffc6bfc306ec26", [] ], + "window.secret.sub.html.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], "window.sub.html": [ "c2540943828ce9fd9db463ad4f33c643c6f1eadf", [] ], + "window.sub.html.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], "worker.js": [ - "bc194a854cd93528930b49ff2a3051e63d4ad43e", + "000df1272948ef22b5963978a015b56e70fc8093", + [] + ], + "worker.js.headers": [ + "a2714096617defba2905d164b8da35d3f7b15506", [] ] - } + }, + "window-open.cross-origin.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], + "window-open.cross-site.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], + "window-open.mix.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ], + "window-open.same-origin.tentative.https.window.js.headers": [ + "4fff9d9fba4c81f953826ffea010a75be626b95d", + [] + ] }, "media": { "1x1-green.png": [ @@ -354055,7 +353973,7 @@ [] ], "portal-harness.js": [ - "9761ac9268bce245cdf5335a613127874c0fd976", + "fa8c761afb9f924fe94f8b1b19e49270c79d281a", [] ], "portal-manipulate-history-with-subframes.sub.html": [ @@ -354096,7 +354014,7 @@ [] ], "eval-portal.html": [ - "98c2013915eae38bea2b8722bb8f80378ae894a0", + "a473501b014db604f70b4b20c3a55a22e5c40b5e", [] ], "focus-page-with-button.html": [ @@ -354120,11 +354038,11 @@ [] ], "portal-activate-data-portal.html": [ - "f57e4b196be471783316a6749a58ebd4a5b962a7", + "0842ad82efa19432dac85aa29d900fefd6d1a277", [] ], "portal-activate-event-portal.html": [ - "63c2e6e8b92b0af9cdf0e3814133b0fe4b68a169", + "6de5aafca78a261f879dd1f88f3eb124b91a621d", [] ], "portal-activate-in-handler.html": [ @@ -354132,7 +354050,7 @@ [] ], "portal-activate-inside-portal.html": [ - "517c9a47e516124c2602607f5a3b01d3acb0e971", + "ff8bead3242fd2334f4e1f263cd66e381c1c69fa", [] ], "portal-activate-twice-window-1.html": [ @@ -354144,7 +354062,7 @@ [] ], "portal-close-window.html": [ - "6e163f4e86c97f66ea8f3298e36ed62d1ceb4790", + "a12af3cd7a9e2f8be033cb2ceeb59eaffdcab659", [] ], "portal-embed-and-activate.html": [ @@ -354156,27 +354074,27 @@ [] ], "portal-host-hidden-after-activation-portal.html": [ - "75c8b733b5e7a5960ab86db549df437decea700e", + "491d184f9720d249e55f470e7032c82f555620c3", [] ], "portal-host-post-message-after-activate.html": [ - "996380f923086e21df847af7da8bd9efd73127b3", + "7b03ac0294ced6f2ef6b01fbc91876d82b829b81", [] ], "portal-host-post-message-navigate-1.html": [ - "3b36eaed05e95ad2b251d65598b1950d0f26e37e", + "a59144e7e11e8f906897beaad8adc0facdaa413c", [] ], "portal-host-post-message-navigate-2.html": [ - "163c42e655d6aa69a8ba8ccfb8474072eac9d349", + "571c4f122e0dccb5204f6576228910f03d34420a", [] ], "portal-host-post-message-x-origin.html": [ - "eb390e8b539d1b901bbe571f0b19f6eaa9c8d0bb", + "6cbc7f4b884242930486081081ec937e7deb7948", [] ], "portal-host-post-message.html": [ - "3c49d560f4b7f3b41d463dec1dc8ce621f47c0d3", + "1935ee898e915edf2478d3bea36cffb94d654efc", [] ], "portal-host.html": [ @@ -354204,7 +354122,7 @@ [] ], "portal-post-message-portal.html": [ - "26f62839af5ed8ea7a50535f411780bdf7fd6e03", + "e83ae56e08fcb251577168ba8cc8dce0e3100133", [] ], "portal-post-message-x-origin-portal.html": [ @@ -354216,7 +354134,7 @@ [] ], "portals-adopt-predecessor-portal.html": [ - "48e162b97140e835c7269ce40a859d38665451df", + "b838b38be16424e6bd51b483dca27a8445622090", [] ], "portals-adopt-predecessor.html": [ @@ -354224,15 +354142,15 @@ [] ], "portals-nested-portal.html": [ - "1ac17c03d4cdc6c9a7c3648c61be3909e965741e", + "278b32eea06bf71dd951780b12a8715410a83aab", [] ], "portals-rendering-portal.html": [ - "c3fe18ef5345c8d963da76bc9d6445635f310f17", + "31b3f4a9909e9bda842997f1c7586e79dceedc2b", [] ], "postmessage-referrer.sub.html": [ - "92aef00380ae4a6180039ad0b10169c81a190441", + "c3837dc79d8cb3d0fa86e45a78cdd4a7d37f9d1e", [] ], "predecessor-fires-unload-watch-unload.html": [ @@ -354244,11 +354162,11 @@ [] ], "simple-portal-adopts-predecessor.html": [ - "b199bdd93b3a03437ebde7abaef9b14ac61b1f76", + "b5ea9f029d84dc9c3bfd525820a3c428d0b1abaa", [] ], "simple-portal.html": [ - "29380099af1a3b9bf0990990ecefd8fa632d30c4", + "7d7b678cadcb81315ccd4052345c372f04a94fea", [] ], "stash-utils.sub.js": [ @@ -356069,7 +355987,7 @@ [] ], "SyntheticResponse.py": [ - "944de61c71561d9a96825b9a344bc642a48f262a", + "0cce1df3cf6b5377fb4cbe9ed40d0a023c75336b", [] ], "__init__.py": [ @@ -358194,7 +358112,7 @@ [] ], "chunked-encoding-scope.py": [ - "912f43d00402278d585bd123de5fe11d10ab1c04", + "659c4d8cdf24e481408d9ceacfad9ca1d55373a9", [] ], "chunked-encoding-worker.js": [ @@ -358937,7 +358855,7 @@ [] ], "invalid-chunked-encoding-with-flush.py": [ - "22a696508f44162927d396daa2ffad39780eaff2", + "05977c6ab0b5d977cf9490c7240f95f54f4a82d4", [] ], "invalid-chunked-encoding.py": [ @@ -359619,6 +359537,10 @@ "declarative-child-frame.html": [ "10608b4875e0bd7d0169cf109b62b2b3612a8288", [] + ], + "helpers.js": [ + "70808e8db7b11db236b893cfd7147458154f69ce", + [] ] } }, @@ -359729,7 +359651,7 @@ [] ], "README.md": [ - "4032edf22f34f596d74da5ee0e4019c5dcf1c69c", + "0987e90ad00481afb015a92faf1f2d8bf2f55694", [] ], "appcache": { @@ -359800,7 +359722,7 @@ [] ], "generate-test-sxgs.sh": [ - "e3988ce683dad77fd2dd8ed0ba5bf94426acb9d4", + "9738f7cab19f9175bb0015df818c7d3f7d3f57cb", [] ], "inner-url.html": [ @@ -368927,7 +368849,7 @@ [] ], "response.py": [ - "1519ed78f397646559c42fa6322a8c145a14d094", + "6e5ee115a55c329b5d457e44e77b9e990a8eadaf", [] ], "router.py": [ @@ -369905,7 +369827,7 @@ [] ], "README.md": [ - "03b42ab340a2c0cdc774b78f203c80d5eee5539f", + "90c13069bacde39c89acea37e1e0005b956be845", [] ], "resources": { @@ -369954,7 +369876,7 @@ ] }, "generate-test-wbns.sh": [ - "64a54bca3a408c5af751a59daf8664db62ea7d28", + "7100e6a777260261275c54e337b2aebeca1c4fd1", [] ], "location": { @@ -371538,7 +371460,7 @@ }, "unload-a-document": { "001-1.html": [ - "75d689e0b3d2e2ce3b7aa56ef33fb05409b78cb6", + "c6ef23018b1058eb9de29e9bd35ecbeabf90c77d", [] ], "001-2.html": [ @@ -371546,7 +371468,7 @@ [] ], "002-1.html": [ - "546de89dfee0782a916bf0ed82328bb77e92956c", + "04623ffc473fadaaf48f097994d60751400900b6", [] ], "002-2.html": [ @@ -371554,7 +371476,7 @@ [] ], "005-1.html": [ - "fd70fc5bddee9af48223f044146b4f69953b7cdc", + "1dbcef22bb368e60ba0a1b05b5ee9d46c56892ba", [] ] }, @@ -375200,7 +375122,7 @@ [] ], "echo-method.py": [ - "7899c184b768cfba8c50c9d6814ff0058d594cc8", + "564c3db11f0357a5917c4564a00c47329a3675f8", [] ], "empty-div-utf8-html.py": [ @@ -375280,7 +375202,7 @@ [] ], "inspect-headers.py": [ - "36ef17488ce5241f21caf48ac44c877bf86fbae8", + "72c1a7f1d7a4daae25a49a874cb9c311aa0ed344", [] ], "invalid-utf8-html.py": [ @@ -398457,6 +398379,44 @@ ] }, "cookies": { + "attributes": { + "invalid.html": [ + "9e72394940f01bf23df863dae862519e432c685a", + [ + null, + { + "timeout": "long" + } + ] + ], + "path.html": [ + "ca8d04935f5cd8ee8cb746b4cb4e10f6e99d6c61", + [ + null, + { + "timeout": "long" + } + ] + ], + "secure-non-secure.html": [ + "55f11f3adb10d002c0bb40c620e1c0ccba8012f5", + [ + null, + { + "timeout": "long" + } + ] + ], + "secure.https.html": [ + "5e73758c4a070a39812deab3e2b7c61e6f56733e", + [ + null, + { + "timeout": "long" + } + ] + ] + }, "cookie-enabled-noncookie-frame.html": [ "539d715ebd5344de4cf02b6485462b31bc167525", [ @@ -398495,15 +398455,6 @@ ] }, "http-state": { - "attribute-tests.html": [ - "5d9330042e18b09a9cf6739eb74ec1c1f1fa5c02", - [ - null, - { - "timeout": "long" - } - ] - ], "charset-tests.html": [ "5917da19ec4264eed7277858842cd533fcb4135e", [ @@ -497977,10 +497928,10 @@ } }, "measure-memory": { - "detached.tentative.window.js": [ - "c6a133cfe456c7c8488ea76d85b903261de206fb", + "detached.tentative.https.window.js": [ + "179e5e727adfd9b12e82b84b0c39a7c682a6689d", [ - "measure-memory/detached.tentative.window.html", + "measure-memory/detached.tentative.https.window.html", { "script_metadata": [ [ @@ -498000,10 +497951,10 @@ } ] ], - "iframe.cross-origin.tentative.window.js": [ - "a9dccc8d80f9de314f59a05da521621a8038fe0d", + "iframe.cross-origin.tentative.https.window.js": [ + "ac0641cc2621df534faedfe50d22dac5bde3cb15", [ - "measure-memory/iframe.cross-origin.tentative.window.html", + "measure-memory/iframe.cross-origin.tentative.https.window.html", { "script_metadata": [ [ @@ -498023,10 +497974,10 @@ } ] ], - "iframe.cross-site.tentative.window.js": [ - "e40ce59fa4d25741155fe637d1b18fce58a37245", + "iframe.cross-site.tentative.https.window.js": [ + "1b4dfc70b7e10ef4a304513b8b7446ea27df41c6", [ - "measure-memory/iframe.cross-site.tentative.window.html", + "measure-memory/iframe.cross-site.tentative.https.window.html", { "script_metadata": [ [ @@ -498046,10 +497997,10 @@ } ] ], - "iframe.same-origin.tentative.window.js": [ - "7fc02036117a152ffeb945fb4ad32ab2bdf97215", + "iframe.same-origin.tentative.https.window.js": [ + "1d546b27f302ace49618d448cfcb13f668631c08", [ - "measure-memory/iframe.same-origin.tentative.window.html", + "measure-memory/iframe.same-origin.tentative.https.window.html", { "script_metadata": [ [ @@ -498069,10 +498020,10 @@ } ] ], - "main-frame-and-worker.tentative.window.js": [ - "514a4ed067315433c5a368fc7d065b415a4e8229", + "main-frame-and-worker.tentative.https.window.js": [ + "f0b8abf1bc6dca66f57a0bd4f2152f6c479de6f2", [ - "measure-memory/main-frame-and-worker.tentative.window.html", + "measure-memory/main-frame-and-worker.tentative.https.window.html", { "script_metadata": [ [ @@ -498092,10 +498043,10 @@ } ] ], - "main-frame.tentative.window.js": [ - "0a34abb9246f0c218c26cedd99bebbf2f01aeaf0", + "main-frame.tentative.https.window.js": [ + "fd58e9314b0980154a9e828e0212dee2f20309d5", [ - "measure-memory/main-frame.tentative.window.html", + "measure-memory/main-frame.tentative.https.window.html", { "script_metadata": [ [ @@ -498115,10 +498066,10 @@ } ] ], - "redirect.client.tentative.window.js": [ - "e38a325c7122833c0a05bda9b4c8d027a407ead0", + "redirect.client.tentative.https.window.js": [ + "36d9a9d44cd1734572c2b3b930cec7ff0b3eeee2", [ - "measure-memory/redirect.client.tentative.window.html", + "measure-memory/redirect.client.tentative.https.window.html", { "script_metadata": [ [ @@ -498138,10 +498089,10 @@ } ] ], - "redirect.server.tentative.window.js": [ - "740abca167829087fbd8bf5d8373cf4f2646f3f7", + "redirect.server.tentative.https.window.js": [ + "6506730b34cbe681a72a65b290c3c2e5b012f5e5", [ - "measure-memory/redirect.server.tentative.window.html", + "measure-memory/redirect.server.tentative.https.window.html", { "script_metadata": [ [ @@ -498161,10 +498112,10 @@ } ] ], - "window-open.cross-origin.tentative.window.js": [ - "d067b2c175bd995898c7ded32297d5bfa543c57a", + "window-open.cross-origin.tentative.https.window.js": [ + "2e6561ad44bbd8345102e627dbe079ea7f98605e", [ - "measure-memory/window-open.cross-origin.tentative.window.html", + "measure-memory/window-open.cross-origin.tentative.https.window.html", { "script_metadata": [ [ @@ -498184,10 +498135,10 @@ } ] ], - "window-open.cross-site.tentative.window.js": [ - "7fa49f5facc21f73818a726d4547cc0ba5581e30", + "window-open.cross-site.tentative.https.window.js": [ + "f70ad9df32b92640160503550afcbb9a4168943e", [ - "measure-memory/window-open.cross-site.tentative.window.html", + "measure-memory/window-open.cross-site.tentative.https.window.html", { "script_metadata": [ [ @@ -498207,10 +498158,10 @@ } ] ], - "window-open.mix.tentative.window.js": [ - "5bb9d29c61d86c67f654f77827d7dc07c31b2508", + "window-open.mix.tentative.https.window.js": [ + "6a913a88a4876ae096b989658384c8848b14f227", [ - "measure-memory/window-open.mix.tentative.window.html", + "measure-memory/window-open.mix.tentative.https.window.html", { "script_metadata": [ [ @@ -498230,10 +498181,10 @@ } ] ], - "window-open.same-origin.tentative.window.js": [ - "7ec3cc436f1c3a250c18c6bcc369241241b2b081", + "window-open.same-origin.tentative.https.window.js": [ + "5223a97bc7d2fc4ca55fbd5e06d979abe78d2ca1", [ - "measure-memory/window-open.same-origin.tentative.window.html", + "measure-memory/window-open.same-origin.tentative.https.window.html", { "script_metadata": [ [ @@ -508901,7 +508852,7 @@ ] ], "portals-focus.sub.html": [ - "168e74aa9c816ef56c4618b34e5fe01370b3cb6c", + "3e3045adf90aabdfb7b9a2136fabb48d9f98406c", [ null, { @@ -508932,7 +508883,7 @@ ] ], "portals-host-post-message.sub.html": [ - "aa4893cb904d29087ea5413c90eddf7dc317a216", + "d589235ec3bf9befbe8e41dd98d98134fea887a8", [ null, { @@ -508955,7 +508906,7 @@ ] ], "portals-post-message.sub.html": [ - "19803f686969678f72030d6a6ddce4b0d361b275", + "d556dd43d84ab413e85055bb14d000bbdb070ec7", [ null, { @@ -524493,21 +524444,21 @@ ] ], "declarative-shadow-dom-attachment.tentative.html": [ - "c4a35d341c1f688e9690851982b6cb6a9ef7fa7f", + "b9033f599242237626985f35ac6560527c972b32", [ null, {} ] ], "declarative-shadow-dom-basic.tentative.html": [ - "6e3c16a9d82dfa798fed4c54ecb9561832548d07", + "a03743e44ffda00d1d334e58d275eb8bf61ff2a9", [ null, {} ] ], "declarative-shadow-dom-opt-in.tentative.html": [ - "2d6bf5f3f2d90970f109aa4213bc8de79775811c", + "d1fd9fc448a220c270dff51117648ccc8ba16607", [ null, {} @@ -524547,13 +524498,6 @@ null, {} ] - ], - "setinnerhtml.tentative.html": [ - "c65bf04a06c97343025aa1e795a8e440edbe763b", - [ - null, - {} - ] ] }, "event-composed-path-after-dom-mutation.html": [ @@ -546757,6 +546701,13 @@ } ] ], + "RTCPeerConnectionIceErrorEvent.html": [ + "4434cfd28b7eb761df1c11571fa7c50ce5f32bbf", + [ + null, + {} + ] + ], "RTCPeerConnectionIceEvent-constructor.html": [ "447002dca1fa35816fdd24c74dd761c1d48cf028", [ @@ -551405,7 +551356,7 @@ }, "unload-a-document": { "001.html": [ - "56e883c6492be7c6a18100ca275864fe3e284526", + "52427b5d8d8478033f7f8877916bffaaccb11d6f", [ null, {} @@ -551416,7 +551367,7 @@ ] ], "002.html": [ - "94028e703863132a131f8153e3efe762a1fe8905", + "748da64ec7b0ff8397d699df92b96bdb2273a236", [ null, { @@ -551447,7 +551398,7 @@ ] ], "005.html": [ - "81a05f48ead2dea99489ea11f8bfb91b83696733", + "588fd76765acd16b3b0ddbb73dbd30bad6f84963", [ null, { diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini deleted file mode 100644 index f29da48a2a0..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-003.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-003.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini deleted file mode 100644 index 4bfb0c2053a..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-004.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini deleted file mode 100644 index baa9f1a7541..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-005.html] - [Miss clipped float] - expected: FAIL - diff --git a/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini b/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini deleted file mode 100644 index 4c79907309b..00000000000 --- a/tests/wpt/metadata/css/cssom-view/CaretPosition-001.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[CaretPosition-001.html] - [Element at (400, 100)] - expected: FAIL - diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini index 5733d536fd3..85e94926cb3 100644 --- a/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini @@ -21,6 +21,3 @@ [test the top of layer] expected: FAIL - [test some point of the element: top left corner] - expected: FAIL - diff --git a/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini b/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini deleted file mode 100644 index e6e1f29e274..00000000000 --- a/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[matchMedia-display-none-iframe.html] - expected: ERROR diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini index 9e431309742..b97c8fff7ce 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -309,21 +309,18 @@ [fetch(): separate response Content-Type: text/plain ] expected: NOTRUN - [<iframe>: separate response Content-Type: text/html */*;charset=gbk] - expected: FAIL - - [<iframe>: separate response Content-Type: text/plain */*] + [<iframe>: separate response Content-Type: text/html;" text/plain] expected: FAIL - [<iframe>: combined response Content-Type: */* text/html] + [<iframe>: combined response Content-Type: text/html */*;charset=gbk] expected: FAIL - [<iframe>: separate response Content-Type: text/html;" text/plain] + [<iframe>: combined response Content-Type: text/html */*] expected: FAIL - [<iframe>: combined response Content-Type: text/html */*;charset=gbk] + [<iframe>: combined response Content-Type: text/html;" \\" text/plain] expected: FAIL - [<iframe>: separate response Content-Type: text/html;x=" text/plain] + [<iframe>: combined response Content-Type: text/html;x=" text/plain] expected: FAIL diff --git a/tests/wpt/metadata/fetch/content-type/script.window.js.ini b/tests/wpt/metadata/fetch/content-type/script.window.js.ini index b2ffc8abf78..d2df9b78483 100644 --- a/tests/wpt/metadata/fetch/content-type/script.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/script.window.js.ini @@ -56,6 +56,3 @@ [separate text/javascript x/x] expected: FAIL - [separate text/javascript error] - expected: FAIL - diff --git a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini index ec1fd06e1f5..30e1b851fd4 100644 --- a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,6 +11,3 @@ [X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!] expected: FAIL - [X-Content-Type-Options%3A%0D%0AX-Content-Type-Options%3A%20nosniff] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini new file mode 100644 index 00000000000..87b07c3e670 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini @@ -0,0 +1,4 @@ +[traverse_the_history_1.html] + [Multiple history traversals from the same task] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini new file mode 100644 index 00000000000..51f8272a6de --- /dev/null +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini @@ -0,0 +1,4 @@ +[traverse_the_history_3.html] + [Multiple history traversals, last would be aborted] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini b/tests/wpt/metadata/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini deleted file mode 100644 index 735a9a75a2a..00000000000 --- a/tests/wpt/metadata/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[cross-origin-objects-on-new-window.html] - expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html.ini new file mode 100644 index 00000000000..16fa2c5cfc1 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html.ini @@ -0,0 +1,4 @@ +[creating_browsing_context_test_01.html] + [first argument: absolute url] + expected: FAIL + diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index 6b68e9094e4..f4d11768961 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,4 +1,5 @@ [supported-elements.html] + expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL @@ -6,10 +7,10 @@ expected: FAIL [Host element with delegatesFocus including no focusable descendants should be skipped] - expected: FAIL + expected: TIMEOUT [Area element should support autofocus] - expected: FAIL + expected: NOTRUN [Host element with delegatesFocus should support autofocus] expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini index 1de3f8d68b2..98163335e40 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/image-maps/image-map-processing-model/hash-name-reference.html.ini @@ -172,3 +172,6 @@ [XHTML img usemap="http://example.org/#garbage-before-hash-id"] expected: FAIL + [HTML (standards) IMG usemap="no-hash-name"] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini index 06bbed1fcac..d43f38b40cd 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,6 +1,6 @@ [iframe_sandbox_popups_nonescaping-2.html] type: testharness - expected: CRASH + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index dc856a3d5a3..e440b1e38c6 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,5 +1,6 @@ [iframe_sandbox_popups_nonescaping-3.html] type: testharness + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini deleted file mode 100644 index 6cf9d13975c..00000000000 --- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[iframe_005.html] - [document.write external script into iframe write back into parent] - expected: FAIL - diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-delayed.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-delayed.html.ini deleted file mode 100644 index 59a54fe88e4..00000000000 --- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-delayed.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[module-delayed.html] - [async document.write in a module] - expected: FAIL - diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini index 910c88d3e81..69bd952d756 100644 --- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini +++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js.ini @@ -1,5 +1,5 @@ [ignore-opens-during-unload.window.html] - expected: CRASH + expected: TIMEOUT [ignore-opens-during-unload] expected: FAIL diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index 0cef5158fae..01f7b72cbe7 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -4,3 +4,6 @@ [The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] expected: TIMEOUT + [The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini index d65177c2a5b..16614b18649 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini @@ -1,7 +1,6 @@ [promise-rejection-events.html] - expected: TIMEOUT [delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire] - expected: TIMEOUT + expected: FAIL [unhandledrejection: from createImageBitmap which is UA triggered] expected: FAIL diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini index 0f2c64444bd..7725db63616 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html.ini @@ -548,3 +548,6 @@ [X SNR (-625.5179152127479 dB) is not greater than or equal to 65.737. Got -625.5179152127479.] expected: FAIL + [X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[28696\]\t-6.7884163052642179e-30\t9.3139332532882690e-1\t9.3139332532882690e-1\t1.0000000000000000e+0\t3.8985999999999999e-3\n\t[28697\]\t7.0477002859115601e-1\t9.0675884485244751e-1\t2.0198881626129150e-1\t2.2275913536212616e-1\t3.8985999999999999e-3\n\tMax AbsError of 9.3139332532882690e-1 at index of 28696.\n\tMax RelError of 1.0000000000000000e+0 at index of 28696.\n] + expected: FAIL + diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini index b7e13cf7726..f1281b5ae81 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audiocontext-interface/audiocontext-not-fully-active.html.ini @@ -1,4 +1,5 @@ [audiocontext-not-fully-active.html] + expected: TIMEOUT [frame in navigated remote-site frame] expected: FAIL diff --git a/tests/wpt/metadata/webmessaging/with-ports/018.html.ini b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini new file mode 100644 index 00000000000..663a1f8fa30 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini @@ -0,0 +1,5 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/webmessaging/without-ports/017.html.ini b/tests/wpt/metadata/webmessaging/without-ports/017.html.ini deleted file mode 100644 index 064cf47545b..00000000000 --- a/tests/wpt/metadata/webmessaging/without-ports/017.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[017.html] - expected: TIMEOUT - [origin of the script that invoked the method, about:blank] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini b/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini index 650c91da4a6..333edb3a26e 100644 --- a/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini +++ b/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini @@ -1,5 +1,4 @@ [sharedworker-in-worker.html] - expected: ERROR [Base URL in workers: new SharedWorker()] expected: FAIL diff --git a/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini b/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini new file mode 100644 index 00000000000..80f9a4f15b8 --- /dev/null +++ b/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini @@ -0,0 +1,2 @@ +[Worker-constructor.html] + expected: ERROR diff --git a/tests/wpt/web-platform-tests/cookies/attributes/invalid.html b/tests/wpt/web-platform-tests/cookies/attributes/invalid.html new file mode 100644 index 00000000000..9e72394940f --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/attributes/invalid.html @@ -0,0 +1,80 @@ +<!doctype html> +<html> + <head> + <meta charset=utf-8> + <title>Test invalid attribute parsing</title> + <meta name=help href="https://tools.ietf.org/html/rfc6265#section-5.2"> + <meta name="timeout" content="long"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/cookies/resources/cookie-helper.sub.js"></script> + </head> + <body> + <div id=log></div> + <script> + // These tests ensure that invalid attributes don't affect + // cookie parsing. `Path` isn't important to the tests where it appears, + // but it's used to be able to place the invalid attribute in different + // locations. + const invalidAttributeTests = [ + { + cookie: "test=1; lol; Path=/", + expected: "test=1", + name: "Set cookie with invalid attribute" + }, + { + cookie: "test=2; Path=/; lol", + expected: "test=2", + name: "Set cookie ending with invalid attribute." + }, + { + cookie: "test=3; Path=/; 'lol'", + expected: "test=3", + name: "Set cookie ending with quoted invalid attribute." + }, + { + cookie: 'test=4; Path=/; "lol"', + expected: "test=4", + name: "Set cookie ending with double-quoted invalid attribute." + }, + { + cookie: "test=5; Path=/; lol=", + expected: "test=5", + name: "Set cookie ending with invalid attribute equals." + }, + { + cookie: 'test=6; lol="aaa;bbb"; Path=/', + expected: "test=6", + name: "Set cookie with two invalid attributes (lol=\"aaa and bbb)." + }, + { + cookie: 'test=7; Path=/; lol="aaa;bbb"', + expected: "test=7", + name: "Set cookie ending with two invalid attributes (lol=\"aaa and bbb)." + }, + { + cookie: 'test=8; "Secure"', + expected: "test=8", + // This gets parsed as an unrecognized \"Secure\" attribute, not a valid + // Secure attribute. That's why it gets set on an non-secure origin. + name: "Set cookie for quoted Secure attribute", + defaultPath: true + }, + { + cookie: "test=9; Secure qux", + expected: "test=9", + // This should be parsed as an unrecognized "Secure qux" attribute + // and ignored. That is, the cookie will not be Secure. + name: "Set cookie for Secure qux", + defaultPath: true + }, + ]; + + for (const test of invalidAttributeTests) { + promise_test(async testCase => { + await runCookieTest(test.cookie, test.expected, test.defaultPath); + }, test.name); + } + </script> + </body> +</html>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/cookies/attributes/path.html b/tests/wpt/web-platform-tests/cookies/attributes/path.html new file mode 100644 index 00000000000..ca8d04935f5 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/attributes/path.html @@ -0,0 +1,76 @@ +<!doctype html> +<html> + <head> + <meta charset=utf-8> + <title>Test cookie path attribute parsing</title> + <meta name=help href="https://tools.ietf.org/html/rfc6265#section-5.2.4"> + <meta name="timeout" content="long"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/cookies/resources/cookie-helper.sub.js"></script> + </head> + <body> + <script> + const pathTests = [ + { + cookie: "test=1; Path", + expected: "test=1", + name: "Set cookie for bare Path", + defaultPath: true + }, + { + cookie: "test=2; Path=", + expected: "test=2", + name: "Set cookie for Path=", + defaultPath: true + }, + { + cookie: "test=3; Path=/", + expected: "test=3", + name: "Set cookie for Path=/" + }, + { + cookie: "test=4; Path=/qux", + expected: "", + name: "No cookie returned for mismatched path" + }, + { + cookie: "test=5; Path =/qux", + expected: "", + name: "No cookie returned for path space equals mismatched path" + }, + { + cookie: "test=6; Path= /qux", + expected: "", + name: "No cookie returned for path equals space mismatched path" + }, + { + cookie: "test=7; Path=/qux ; taz", + expected: "", + name: "No cookie returned for mismatched path and attribute" + }, + { + cookie: "test=8; Path=/qux; Path=/", + expected: "test=8", + name: "Set cookie for mismatched and root path" + }, + { + cookie: "test=9; Path=/; Path=/qux", + expected: "", + name: "No cookie returned for root and mismatched path" + }, + { + cookie: "test=10; Path=/lol; Path=/qux", + expected: "", + name: "No cookie returned for multiple mismatched paths" + }, + ]; + + for (const test of pathTests) { + promise_test(async testCase => { + await runCookieTest(test.cookie, test.expected, test.defaultPath); + }, test.name); + } + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/cookies/attributes/resources/secure-non-secure-child.html b/tests/wpt/web-platform-tests/cookies/attributes/resources/secure-non-secure-child.html new file mode 100644 index 00000000000..f6a4682f8ae --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/attributes/resources/secure-non-secure-child.html @@ -0,0 +1,75 @@ +<!doctype html> +<html> + <head> + <meta charset=utf-8> + <title>Test cookie secure attribute parsing (on non-secure page)</title> + <meta name=help href="https://tools.ietf.org/html/rfc6265#section-5.2.5"> + <meta name="timeout" content="long"> + <script src="/resources/testharness.js"></script> + <script src="/cookies/resources/cookie-helper.sub.js"></script> + </head> + <body> + <script> + // These tests are the non-secure analog to secure.https.html. + // They're not in the /cookies/attributes folder because they shouldn't + // be run by themselves. Instead, /cookies/attributes/secure.https.html + // opens this in a non-secure window. + const secureNonSecureTests = [ + { + cookie: "test=1; Secure", + expected: "", + name: "(non-secure) Ignore cookie for Secure attribute", + defaultPath: true + }, + { + cookie: "test=2; seCURe", + expected: "", + name: "(non-secure) Ignore cookie for seCURe attribute", + defaultPath: true + }, + { + cookie: "test=3; Secure=", + expected: "", + name: "(non-secure) Ignore cookie for for Secure= attribute", + defaultPath: true + }, + { + cookie: "test=4; Secure=aaaa", + expected: "", + name: "(non-secure) Ignore cookie for Secure=aaaa", + defaultPath: true + }, + { + cookie: "test=5; Secure =aaaaa", + expected: "", + name: "(non-secure) Ignore cookie for Secure space equals", + defaultPath: true + }, + { + cookie: "test=6; Secure= aaaaa", + expected: "", + name: "(non-secure) Ignore cookie for Secure equals space", + defaultPath: true + }, + { + cookie: "test=7; Secure", + expected: "", + name: "(non-secure) Ignore cookie for spaced Secure", + defaultPath: true + }, + { + cookie: "test=8; Secure ;", + expected: "", + name: "(non-secure) Ignore cookie for space Secure with ;", + defaultPath: true + } + ]; + + for (const test of secureNonSecureTests) { + promise_test(async testCase => { + await runCookieTest(test.cookie, test.expected, test.defaultPath); + }, test.name); + } + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/cookies/attributes/secure-non-secure.html b/tests/wpt/web-platform-tests/cookies/attributes/secure-non-secure.html new file mode 100644 index 00000000000..55f11f3adb1 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/attributes/secure-non-secure.html @@ -0,0 +1,21 @@ +<!doctype html> +<html> + <head> + <meta charset=utf-8> + <title>Test cookie secure attribute parsing (non-secure origin)</title> + <meta name=help href="https://tools.ietf.org/html/rfc6265#section-5.2.5"> + <meta name="timeout" content="long"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/cookies/resources/cookie-helper.sub.js"></script> + </head> + <body> + <div id=log></div> + <script> + test(t => { + const win = window.open(`${INSECURE_ORIGIN}/cookies/attributes/resources/secure-non-secure-child.html`); + fetch_tests_from_window(win); + }); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/cookies/attributes/secure.https.html b/tests/wpt/web-platform-tests/cookies/attributes/secure.https.html new file mode 100644 index 00000000000..5e73758c4a0 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/attributes/secure.https.html @@ -0,0 +1,73 @@ +<!doctype html> +<html> + <head> + <meta charset=utf-8> + <title>Test cookie secure attribute parsing</title> + <meta name=help href="https://tools.ietf.org/html/rfc6265#section-5.2.5"> + <meta name="timeout" content="long"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/cookies/resources/cookie-helper.sub.js"></script> + </head> + <body> + <div id=log></div> + <script> + const secureTests = [ + { + cookie: "test=1; Secure", + expected: "test=1", + name: "Set cookie for Secure attribute", + defaultPath: true + }, + { + cookie: "test=2; seCURe", + expected: "test=2", + name: "Set cookie for seCURe attribute", + defaultPath: true + }, + { + cookie: "test=3; Secure=", + expected: "test=3", + name: "Set cookie for for Secure= attribute", + defaultPath: true + }, + { + cookie: "test=4; Secure=aaaa", + expected: "test=4", + name: "Set cookie for Secure=aaaa", + defaultPath: true + }, + { + cookie: "test=5; Secure =aaaaa", + expected: "test=5", + name: "Set cookie for Secure space equals", + defaultPath: true + }, + { + cookie: "test=6; Secure= aaaaa", + expected: "test=6", + name: "Set cookie for Secure equals space", + defaultPath: true + }, + { + cookie: "test=7; Secure", + expected: "test=7", + name: "Set cookie for spaced Secure", + defaultPath: true + }, + { + cookie: "test=8; Secure ;", + expected: "test=8", + name: "Set cookie for space Secure with ;", + defaultPath: true + } + ]; + + for (const test of secureTests) { + promise_test(async testCase => { + await runCookieTest(test.cookie, test.expected, test.defaultPath); + }, test.name); + } + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/cookies/http-state/attribute-tests.html b/tests/wpt/web-platform-tests/cookies/http-state/attribute-tests.html deleted file mode 100644 index 5d9330042e1..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/attribute-tests.html +++ /dev/null @@ -1,56 +0,0 @@ -<!doctype html> -<html> - <head> - <meta charset=utf-8> - <title>Tests cookie attribute functionality</title> - <meta name=help href="https://tools.ietf.org/html/rfc6265#page-8"> - <meta name="timeout" content="long"> - - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="resources/cookie-http-state-template.js"></script> - </head> - <body> - <div id="log"></div> - <div id="iframes"></div> - <script> - setup({ explicit_timeout: true }); - - const TEST_CASES = [ - {file: "attribute0001", name: "Ignore cookie for Secure attribute."}, - {file: "attribute0002", name: "Ignore cookie for seCURe attribute."}, - {file: "attribute0003", name: "Set cookie for \"Secure\" attribute."}, - {file: "attribute0004", name: "Ignore cookie for for Secure= attribute."}, - {file: "attribute0005", name: "Ignore cookie for Secure=aaaa"}, - {file: "attribute0006", name: "Set cookie for Secure qux"}, - {file: "attribute0007", name: "Ignore cookie for Secure space equals."}, - {file: "attribute0008", name: "Ignore cookie for Secure equals space"}, - {file: "attribute0009", name: "Ignore cookie for Secure separated."}, - {file: "attribute0010", name: "Ignore cookie for Secure separated v2."}, - {file: "attribute0011", name: "Ignore cookie for Secure separated v2."}, - {file: "attribute0012", name: "Ignore cookie for spaced Secure"}, - {file: "attribute0013", name: "Ignore cookie for space Secure with ;."}, - {file: "attribute0014", name: "Set cookie for Path."}, - {file: "attribute0015", name: "Set cookie for Path=."}, - {file: "attribute0016", name: "Set cookie for Path=/."}, - {file: "attribute0017", name: "Ignore cookie for invalid path."}, - {file: "attribute0018", name: "Ignore cookie for spaced invalid path."}, - {file: "attribute0019", name: "Ignore cookie for spaced invalid path v2."}, - {file: "attribute0020", name: "Ignore cookie for invalid path and attribute."}, - {file: "attribute0021", name: "Ignore cookie for invalid and root path."}, - {file: "attribute0022", name: "Set cookie for root and invalid path."}, - {file: "attribute0023", name: "Set cookie for invalid and sane path."}, - {file: "attribute0024", name: "Ignore cookie for sane and invalid path."}, - {file: "attribute0025", name: "Ignore cookie for invalid + Secure."}, - {file: "attribute0026", name: "Ignore cookie for quoted invalid attribute."}, - ]; - - for (const i in TEST_CASES) { - const t = TEST_CASES[i]; - promise_test(createCookieTest(t.file), - t.file + " - " + t.name); - } - - </script> - </body> -</html> diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0001-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0001-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0001-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0001-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0001-test deleted file mode 100644 index 6199f78cff2..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0001-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0002-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0002-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0002-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0002-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0002-test deleted file mode 100644 index 047a24d9a50..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0002-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; seCURe diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0003-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0003-expected deleted file mode 100644 index b14d4f69b58..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0003-expected +++ /dev/null @@ -1 +0,0 @@ -Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0003-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0003-test deleted file mode 100644 index c944bac478b..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0003-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; "Secure" diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0004-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0004-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0004-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0004-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0004-test deleted file mode 100644 index bcfaa7d8384..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0004-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure= diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0005-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0005-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0005-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0005-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0005-test deleted file mode 100644 index 1671087813f..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0005-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure=aaaa diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0006-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0006-expected deleted file mode 100644 index b14d4f69b58..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0006-expected +++ /dev/null @@ -1 +0,0 @@ -Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0006-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0006-test deleted file mode 100644 index 39d7589033d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0006-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0007-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0007-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0007-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0007-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0007-test deleted file mode 100644 index f75f46a71d9..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0007-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure =aaaaa diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0008-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0008-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0008-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0008-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0008-test deleted file mode 100644 index be45b3a2c72..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0008-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure= aaaaa diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0009-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0009-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0009-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0009-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0009-test deleted file mode 100644 index 1a44c224401..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0009-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure; qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0010-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0010-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0010-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0010-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0010-test deleted file mode 100644 index ca6220061e8..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0010-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure;qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0011-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0011-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0011-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0011-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0011-test deleted file mode 100644 index 3bd4c2e9988..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0011-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure ; qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0012-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0012-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0012-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0012-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0012-test deleted file mode 100644 index 6e7b8166163..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0012-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0013-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0013-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0013-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0013-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0013-test deleted file mode 100644 index f4814e432a4..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0013-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Secure ; diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0014-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0014-expected deleted file mode 100644 index b14d4f69b58..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0014-expected +++ /dev/null @@ -1 +0,0 @@ -Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0014-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0014-test deleted file mode 100644 index ef88896aaf7..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0014-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0015-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0015-expected deleted file mode 100644 index b14d4f69b58..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0015-expected +++ /dev/null @@ -1 +0,0 @@ -Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0015-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0015-test deleted file mode 100644 index cea7060a9c9..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0015-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path= diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0016-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0016-expected deleted file mode 100644 index b14d4f69b58..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0016-expected +++ /dev/null @@ -1 +0,0 @@ -Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0016-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0016-test deleted file mode 100644 index 9a5b591a788..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0016-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path=/ diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0017-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0017-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0017-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0017-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0017-test deleted file mode 100644 index a6aeeb34ea7..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0017-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path=/qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0018-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0018-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0018-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0018-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0018-test deleted file mode 100644 index f9122013443..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0018-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path =/qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0019-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0019-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0019-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0019-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0019-test deleted file mode 100644 index a424c6ee68d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0019-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path= /qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0020-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0020-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0020-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0020-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0020-test deleted file mode 100644 index 367d2a104f5..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0020-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path=/qux ; taz diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0021-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0021-expected deleted file mode 100644 index b14d4f69b58..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0021-expected +++ /dev/null @@ -1 +0,0 @@ -Cookie: foo=bar diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0021-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0021-test deleted file mode 100644 index bb76deb3afc..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0021-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path=/qux; Path=/ diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0022-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0022-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0022-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0022-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0022-test deleted file mode 100644 index ac79c0f9ec9..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0022-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path=/; Path=/qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0023-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0023-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0023-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0023-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0023-test deleted file mode 100644 index 97f2ac3946b..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0023-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path=/qux; Path=/cookie-parser-result diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0024-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0024-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0024-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0024-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0024-test deleted file mode 100644 index cb041c56c1c..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0024-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; Path=/cookie-parser-result; Path=/qux diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0025-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0025-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0025-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0025-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0025-test deleted file mode 100644 index c430943516d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0025-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; qux; Secure diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0026-expected b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0026-expected deleted file mode 100644 index e69de29bb2d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0026-expected +++ /dev/null diff --git a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0026-test b/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0026-test deleted file mode 100644 index 7f68322ee2e..00000000000 --- a/tests/wpt/web-platform-tests/cookies/http-state/resources/test-files/attribute0026-test +++ /dev/null @@ -1 +0,0 @@ -Set-Cookie: foo=bar; qux="aaa;bbb"; Secure diff --git a/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js b/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js index 50dcdfc5ecb..3f0aac26efe 100644 --- a/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js +++ b/tests/wpt/web-platform-tests/cookies/resources/cookie-helper.sub.js @@ -309,3 +309,52 @@ function erase_cookie_from_js(name, params) { var re = new RegExp("(?:^|; )" + name); assert_equals(re.test(document.cookie), false, "Sanity check: " + name + " has been deleted."); } + +// getDefaultPathCookies is a helper method to get and delete cookies on the +// "default path" (which for these tests will be at `/cookies/resources`), +// determined by the path portion of the request-uri. +async function getDefaultPathCookies(path = '/cookies/resources') { + return new Promise((resolve, reject) => { + try { + const iframe = document.createElement('iframe'); + iframe.style = 'display: none'; + iframe.src = `${path}/echo-cookie.html`; + + iframe.addEventListener('load', (e) => { + const win = e.target.contentWindow; + const iframeCookies = win.getCookies(); + win.expireCookie('test', path); + resolve(iframeCookies); + }, {once: true}); + + document.documentElement.appendChild(iframe); + } catch (e) { + reject(e); + } + }); +} + +// runCookieTest sets a |cookie|, then asserts it was or was not set +// via |expectedValue|. Then cleans it up. +async function runCookieTest(cookie, expectedValue, defaultPath) { + return fetch(`/cookies/resources/cookie.py?set=${encodeURIComponent(cookie)}`) + .then(async _ => { + let cookies = document.cookie; + // for the tests where a Path is set from the request-uri path, we need + // to go look for cookies in an iframe at that default path. + if (defaultPath) { + cookies = await getDefaultPathCookies(); + } + + if (Boolean(expectedValue)) { + assert_equals( + cookies, expectedValue, 'The cookie was set as expected.'); + } else { + assert_equals(cookies, expectedValue, 'The cookie was rejected.'); + } + }) + .then(_ => { + return fetch( + `/cookies/resources/cookie.py?drop=${encodeURIComponent(cookie)}`); + }); +} diff --git a/tests/wpt/web-platform-tests/cookies/resources/cookie.py b/tests/wpt/web-platform-tests/cookies/resources/cookie.py new file mode 100644 index 00000000000..9710b518e21 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/resources/cookie.py @@ -0,0 +1,33 @@ +from cookies.resources.helpers import setNoCacheAndCORSHeaders +from wptserve.utils import isomorphic_encode + +def main(request, response): + """Set or drop a cookie via GET params. + + Usage: `/cookie.py?set={cookie}` or `/cookie.py?drop={cookie}` + + The passed-in cookie string should be encoded via encodeURIComponent, + otherwise `parse_qsl` will split on any semicolons (used by the Request.GET + property getter). + + Note: here we don't use Response.delete_cookie() or similar other methods + in this resources directory because there are edge cases that are impossible + to express via those APIs, namely a bare (`Path`) or empty Path (`Path=`) + attribute. Instead, we pipe through the entire cookie and append `max-age=0` + to it. + """ + headers = setNoCacheAndCORSHeaders(request, response) + + try: + if b'drop' in request.GET: + cookie = request.GET[b'drop'] + cookie += "; max-age=0" + + if b'set' in request.GET: + cookie = request.GET[b'set'] + + headers.append((b'Set-Cookie', isomorphic_encode(cookie))) + return headers, b'{"success": true}' + except Exception as e: + return 500, headers, bytes({'error': '{}'.format(e)}) + diff --git a/tests/wpt/web-platform-tests/cookies/resources/echo-cookie.html b/tests/wpt/web-platform-tests/cookies/resources/echo-cookie.html index a715b8b4294..4780447e8ba 100644 --- a/tests/wpt/web-platform-tests/cookies/resources/echo-cookie.html +++ b/tests/wpt/web-platform-tests/cookies/resources/echo-cookie.html @@ -19,6 +19,7 @@ window.isCookieSet = function (name, path) { window.expireCookie = function (name, path) { document.cookie = name + '=0; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=' + path + ';'; }; +window.getCookies = () => document.cookie; </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/border-radius-clip-002.htm b/tests/wpt/web-platform-tests/css/css-backgrounds/border-radius-clip-002.htm index c6aa0c6a3e1..e81871ee50c 100644 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/border-radius-clip-002.htm +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/border-radius-clip-002.htm @@ -31,6 +31,7 @@ { width: 98px; height: 98px; + margin-top: 62px; margin-left: 20px; border-radius: 20px; background: red url(support/swatch-red.png); diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-014.html b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-014.html new file mode 100644 index 00000000000..9f12b65f843 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-014.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<title>CSS Flexible Box Test: Aspect ratio handling of images</title> +<link rel="author" title="Sergio Villar Senin" href="mailto:svillar@igalia.com" /> +<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#algo-cross-item" /> +<link rel="match" href="reference/flex-aspect-ratio-img-row-014-ref.html" /> +<meta name="assert" content="Test that we compute the correct aspect-ratio based cross size when a percentage main size is specified" /> + +<style> +#reference-overlapped-red { + position: absolute; + background-color: red; + width: 90px; + height: 225px; + z-index: -1; +} +#constrained-flex { + display: flex; + width: 300px; + border: 1px solid black; +} +img { + min-width: 0; + min-height: 0; + width: 30%; +} +</style> + +<p>Test passes if there is <strong>no red</strong> visible on the page.</p> + +<div id="reference-overlapped-red"></div> +<div id="constrained-flex"> + <img id="test-flex-item-overlapping-green" src="support/20x50-green.png" /> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/reference/flex-aspect-ratio-img-row-014-ref.html b/tests/wpt/web-platform-tests/css/css-flexbox/reference/flex-aspect-ratio-img-row-014-ref.html new file mode 100644 index 00000000000..ea36ff40301 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-flexbox/reference/flex-aspect-ratio-img-row-014-ref.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<title>CSS Reference</title> +<link rel="author" title="Sergio Villar Senin" href="mailto:svillar@igalia.com" /> +<style> +span { + display: inline-block; + background-color: green; + height: 225px; + width: 90px; +} + +div { + border: 1px solid black; + height: 225px; + width: 300px; +} +</style> + +<p>Test passes if there is <strong>no red</strong> visible on the page.</p> +<div><span></span></div> diff --git a/tests/wpt/web-platform-tests/element-timing/resources/progressive-image.py b/tests/wpt/web-platform-tests/element-timing/resources/progressive-image.py index 64cc44ee0f2..84e98c84510 100644 --- a/tests/wpt/web-platform-tests/element-timing/resources/progressive-image.py +++ b/tests/wpt/web-platform-tests/element-timing/resources/progressive-image.py @@ -19,7 +19,6 @@ def main(request, response): # Read from the beginning, |numInitial| bytes. first = body[:numInitial] response.writer.write_content(first) - response.writer.flush() time.sleep(sleepTime) diff --git a/tests/wpt/web-platform-tests/eventsource/resources/message2.py b/tests/wpt/web-platform-tests/eventsource/resources/message2.py index cfe908406fc..8515e7b25eb 100644 --- a/tests/wpt/web-platform-tests/eventsource/resources/message2.py +++ b/tests/wpt/web-platform-tests/eventsource/resources/message2.py @@ -4,7 +4,6 @@ def main(request, response): response.headers.set(b'Content-Type', b'text/event-stream') response.headers.set(b'Cache-Control', b'no-cache') - response.explicit_flush = True response.write_status_headers() while True: @@ -31,5 +30,4 @@ def main(request, response): response.writer.write(u"data:end") response.writer.write(u"\n\n") - response.writer.flush() time.sleep(2) diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-2-ref.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-2-ref.html new file mode 100644 index 00000000000..da2dd3e1c61 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-2-ref.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<title>Reference for legend position: relative</title> +<style> +#fieldset2 { + background: lime; + border: 2px solid lime; + width: 200px; + padding: 0; + margin: 0; +} +#legend2 { + background: #00ffff; +} +</style> +<p>"Legend" should be shown.</p> +<fieldset id="fieldset2"><legend id="legend2">Legend</legend></fieldset> diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-2.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-2.html new file mode 100644 index 00000000000..3fbdbd5c206 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-position-relative-2.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<title>legend position: relative</title> +<link ref=help href="http://crbug.com/1151295"> +<link rel=match href=legend-position-relative-2-ref.html> +<style> +#fieldset2 { + background: lime; + border: 2px solid lime; + width: 200px; + padding: 0; + margin: 0; + overflow: hidden; +} +#legend2 { + position: relative; + overflow: hidden; + background: #00ffff; +} +</style> +<p>"Legend" should be shown.</p> +<fieldset id="fieldset2"><legend id="legend2">Legend</legend></fieldset> diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-iframe.py b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-iframe.py index b7b6dac1937..dbcfe9b8d0d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-iframe.py +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-iframe.py @@ -47,7 +47,6 @@ def main(request, response): response.writer.write(u"%x\r\n" % len(body)) response.writer.write(body) response.writer.write(u"\r\n") - response.writer.flush() body = u"" @@ -101,4 +100,3 @@ def main(request, response): response.writer.write(u"0\r\n") response.writer.write(u"\r\n") - response.writer.flush() diff --git a/tests/wpt/web-platform-tests/measure-memory/detached.tentative.https.window.js b/tests/wpt/web-platform-tests/measure-memory/detached.tentative.https.window.js new file mode 100644 index 00000000000..179e5e727ad --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/detached.tentative.https.window.js @@ -0,0 +1,196 @@ +// META: script=/common/get-host-info.sub.js +// META: script=./resources/common.js +// META: timeout=long +'use strict'; + +assert_true(self.crossOriginIsolated); + +promise_test(async testCase => { + const {iframes, windows} = await build([ + { + id: 'cross-site-1', + children: [ + { + id: 'same-origin-2', + }, + { + id: 'same-origin-11', + window_open: true, + }, + ], + }, + { + id: 'same-origin-3', + children: [ + { + id: 'same-origin-4', + }, + { + id: 'same-origin-12', + window_open: true, + }, + ], + }, + { + id: 'cross-origin-5', + children: [ + { + id: 'same-origin-6', + }, + { + id: 'same-origin-13', + window_open: true, + }, + ], + }, + { + id: 'same-origin-7', + window_open: true, + children: [ + { + id: 'same-origin-8', + } + ], + }, + { + id: 'cross-origin-9', + window_open: true, + children: [ + { + id: 'same-origin-10', + } + ], + }, + ]); + const expected = [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + { + url: 'cross-origin-url', + scope: 'cross-origin-aggregated', + container: { + id: 'cross-site-1', + src: iframes['cross-site-1'].src, + }, + }, + { + url: windows['same-origin-2'].location.href, + scope: 'Window', + container: { + id: 'cross-site-1', + src: iframes['cross-site-1'].src, + }, + }, + { + url: windows['same-origin-3'].location.href, + scope: 'Window', + container: { + id: 'same-origin-3', + src: iframes['same-origin-3'].src, + }, + }, + { + url: windows['same-origin-4'].location.href, + scope: 'Window', + container: { + id: 'same-origin-4', + src: iframes['same-origin-4'].src, + }, + }, + { + url: 'cross-origin-url', + scope: 'cross-origin-aggregated', + container: { + id: 'cross-origin-5', + src: iframes['cross-origin-5'].src, + }, + }, + { + url: windows['same-origin-6'].location.href, + scope: 'Window', + container: { + id: 'cross-origin-5', + src: iframes['cross-origin-5'].src, + }, + }, + { + url: windows['same-origin-8'].location.href, + scope: 'Window', + container: { + id: 'same-origin-8', + src: iframes['same-origin-8'].src, + }, + }, + { + url: windows['same-origin-7'].location.href, + scope: 'Window', + container: null, + }, + { + url: windows['same-origin-11'].location.href, + scope: 'Window', + container: null, + }, + { + url: windows['same-origin-12'].location.href, + scope: 'Window', + container: null, + }, + { + url: windows['same-origin-13'].location.href, + scope: 'Window', + container: null, + }, + ]; + const keep = sameOriginContexts(frames).concat(sameOriginContexts(windows)); + // Detach iframes: + // 1) By setting src attribute: + iframes['cross-site-1'].src = + iframes['cross-site-1'].src.replace('iframe.sub', 'iframe.secret.sub'); + // 2) By setting location attribute: + let url = iframes['same-origin-3'].contentWindow.location.href; + url = url.replace('iframe.sub', 'iframe.secret.sub'); + iframes['same-origin-3'].contentWindow.location.href = url; + // 3) By removing from the DOM tree: + iframes['cross-origin-5'].parentNode.removeChild(iframes['cross-origin-5']); + + // Detach windows: + // 1) By setting document.location attribute: + url = windows['same-origin-7'].location.href; + url = url.replace('window.sub', 'window.secret.sub'); + windows['same-origin-7'].location.href = url; + // 2) By closing the window: + windows['same-origin-10'].parent.close(); + + await waitForMessage('cross-site-1'); + await waitForMessage('same-origin-3'); + await waitForMessage('same-origin-7'); + + expected.push({ + url: 'cross-origin-url', + scope: 'cross-origin-aggregated', + container: { + id: 'cross-site-1', + src: iframes['cross-site-1'].src, + }, + }); + + expected.push({ + url: windows['same-origin-3'].location.href, + scope: 'Window', + container: { + id: 'same-origin-3', + src: iframes['same-origin-3'].src, + }, + }); + expected.push({ + url: windows['same-origin-7'].location.href, + scope: 'Window', + container: null, + }); + const result = await performance.measureMemory(); + checkMeasureMemory(result, expected); +}, 'performance.measureMemory URLs within a cross-site iframe.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/detached.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/detached.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/detached.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/detached.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/detached.tentative.window.js deleted file mode 100644 index c6a133cfe45..00000000000 --- a/tests/wpt/web-platform-tests/measure-memory/detached.tentative.window.js +++ /dev/null @@ -1,115 +0,0 @@ -// META: script=/common/get-host-info.sub.js -// META: script=./resources/common.js -// META: timeout=long -'use strict'; - -promise_test(async testCase => { - const {iframes, windows} = await build([ - { - id: 'cross-site-1', - children: [ - { - id: 'same-origin-2', - }, - { - id: 'same-origin-11', - window_open: true, - }, - ], - }, - { - id: 'same-origin-3', - children: [ - { - id: 'same-origin-4', - }, - { - id: 'same-origin-12', - window_open: true, - }, - ], - }, - { - id: 'cross-origin-5', - children: [ - { - id: 'same-origin-6', - }, - { - id: 'same-origin-13', - window_open: true, - }, - ], - }, - { - id: 'same-origin-7', - window_open: true, - children: [ - { - id: 'same-origin-8', - } - ], - }, - { - id: 'cross-origin-9', - window_open: true, - children: [ - { - id: 'same-origin-10', - } - ], - }, - ]); - const allowed = [ - window.location.href, - iframes['cross-site-1'].src, - iframes['same-origin-3'].src, - iframes['same-origin-4'].src, - iframes['cross-origin-5'].src, - iframes['same-origin-8'].sec, - windows['same-origin-7'].location.href, - windows['same-origin-12'].location.href, - ]; - const keep = sameOriginContexts(frames).concat(sameOriginContexts(windows)); - // Detach iframes: - // 1) By setting src attribute: - iframes['cross-site-1'].src = - iframes['cross-site-1'].src.replace('iframe.sub', 'iframe.secret.sub'); - // 2) By setting location attribute: - let url = iframes['same-origin-3'].contentWindow.location.href; - url = url.replace('iframe.sub', 'iframe.secret.sub'); - iframes['same-origin-3'].contentWindow.location.href = url; - // 3) By removing from the DOM tree: - iframes['cross-origin-5'].parentNode.removeChild(iframes['cross-origin-5']); - - // Detach windows: - // 1) By setting document.location attribute: - url = windows['same-origin-7'].location.href; - url = url.replace('window.sub', 'window.secret.sub'); - windows['same-origin-7'].location.href = url; - // 2) By closing the window: - windows['cross-origin-9'].close(); - - await waitForMessage('cross-site-1'); - await waitForMessage('same-origin-3'); - await waitForMessage('same-origin-7'); - - try { - const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: allowed.concat([ - iframes['cross-site-1'].src, - iframes['same-origin-3'].contentWindow.location.href, - windows['same-origin-7'].location.href, - ]), - required: [ - window.location.href, - ], - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } -}, 'performance.measureMemory URLs within a cross-site iframe.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/iframe.cross-origin.tentative.https.window.js b/tests/wpt/web-platform-tests/measure-memory/iframe.cross-origin.tentative.https.window.js new file mode 100644 index 00000000000..ac0641cc262 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/iframe.cross-origin.tentative.https.window.js @@ -0,0 +1,49 @@ +// META: script=/common/get-host-info.sub.js +// META: script=./resources/common.js +// META: timeout=long +'use strict'; + +assert_true(self.crossOriginIsolated); + +promise_test(async testCase => { + const {iframes, windows} = await build([ + { + id: 'cross-origin-1', + children: [ + { + id: 'same-origin-2', + }, + { + id: 'cross-origin-3', + }, + { + id: 'cross-site-4', + } + ], + }, + ]); + const result = await performance.measureMemory(); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + { + url: 'cross-origin-url', + scope: 'cross-origin-aggregated', + container: { + id: 'cross-origin-1', + src: iframes['cross-origin-1'].src, + }, + }, + { + url: windows['same-origin-2'].location.href, + scope: 'Window', + container: { + id: 'cross-origin-1', + src: iframes['cross-origin-1'].src, + }, + }, + ]); +}, 'performance.measureMemory URLs within a cross-origin iframe.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/iframe.cross-origin.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/iframe.cross-origin.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/iframe.cross-origin.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/iframe.cross-origin.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/iframe.cross-origin.tentative.window.js deleted file mode 100644 index a9dccc8d80f..00000000000 --- a/tests/wpt/web-platform-tests/measure-memory/iframe.cross-origin.tentative.window.js +++ /dev/null @@ -1,40 +0,0 @@ -// META: script=/common/get-host-info.sub.js -// META: script=./resources/common.js -// META: timeout=long -'use strict'; - -promise_test(async testCase => { - const {iframes} = await build([ - { - id: 'cross-origin-1', - children: [ - { - id: 'same-origin-2', - }, - { - id: 'cross-origin-3', - }, - { - id: 'cross-site-4', - } - ], - }, - ]); - try { - const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: [ - window.location.href, - iframes['cross-origin-1'].src, - ], - required: [ - window.location.href, - ], - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } -}, 'performance.measureMemory URLs within a cross-origin iframe.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/iframe.cross-site.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/iframe.cross-site.tentative.https.window.js index e40ce59fa4d..1b4dfc70b7e 100644 --- a/tests/wpt/web-platform-tests/measure-memory/iframe.cross-site.tentative.window.js +++ b/tests/wpt/web-platform-tests/measure-memory/iframe.cross-site.tentative.https.window.js @@ -3,8 +3,10 @@ // META: timeout=long 'use strict'; +assert_true(self.crossOriginIsolated); + promise_test(async testCase => { - const {iframes} = await build([ + const {iframes, windows} = await build([ { id: 'cross-site-1', children: [ @@ -22,15 +24,29 @@ promise_test(async testCase => { ]); try { const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: [ - window.location.href, - iframes['cross-site-1'].src, - ], - required: [ - window.location.href, - ], - }); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + { + url: 'cross-origin-url', + scope: 'cross-origin-aggregated', + container: { + id: 'cross-site-1', + src: iframes['cross-site-1'].src, + }, + }, + { + url: windows['same-origin-2'].location.href, + scope: 'Window', + container: { + id: 'cross-site-1', + src: iframes['cross-site-1'].src, + }, + }, + ]); } catch (error) { if (!(error instanceof DOMException)) { throw error; diff --git a/tests/wpt/web-platform-tests/measure-memory/iframe.cross-site.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/iframe.cross-site.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/iframe.cross-site.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/iframe.same-origin.tentative.https.window.js b/tests/wpt/web-platform-tests/measure-memory/iframe.same-origin.tentative.https.window.js new file mode 100644 index 00000000000..1d546b27f30 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/iframe.same-origin.tentative.https.window.js @@ -0,0 +1,43 @@ +// META: script=/common/get-host-info.sub.js +// META: script=./resources/common.js +// META: timeout=long +'use strict'; + +assert_true(self.crossOriginIsolated); + +promise_test(async testCase => { + const {iframes, windows} = await build([ + { + id: 'same-origin-1', + children: [ + { + id: 'same-origin-2', + } + ], + }, + ]); + const result = await performance.measureMemory(); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + { + url: windows['same-origin-1'].location.href, + scope: 'Window', + container: { + id: 'same-origin-1', + src: iframes['same-origin-1'].src, + }, + }, + { + url: windows['same-origin-2'].location.href, + scope: 'Window', + container: { + id: 'same-origin-2', + src: iframes['same-origin-2'].src, + }, + }, + ]); +}, 'Well-formed result of performance.measureMemory with same-origin iframes.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/iframe.same-origin.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/iframe.same-origin.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/iframe.same-origin.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/iframe.same-origin.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/iframe.same-origin.tentative.window.js deleted file mode 100644 index 7fc02036117..00000000000 --- a/tests/wpt/web-platform-tests/measure-memory/iframe.same-origin.tentative.window.js +++ /dev/null @@ -1,37 +0,0 @@ -// META: script=/common/get-host-info.sub.js -// META: script=./resources/common.js -// META: timeout=long -'use strict'; - -promise_test(async testCase => { - const {iframes} = await build([ - { - id: 'same-origin-1', - children: [ - { - id: 'same-origin-2', - } - ], - }, - ]); - try { - const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: [ - window.location.href, - iframes['same-origin-1'].src, - iframes['same-origin-2'].src, - ], - required: [ - window.location.href, - iframes['same-origin-1'].src, - iframes['same-origin-2'].src, - ] - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } -}, 'Well-formed result of performance.measureMemory with same-origin iframes.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/main-frame-and-worker.tentative.https.window.js b/tests/wpt/web-platform-tests/measure-memory/main-frame-and-worker.tentative.https.window.js new file mode 100644 index 00000000000..f0b8abf1bc6 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/main-frame-and-worker.tentative.https.window.js @@ -0,0 +1,26 @@ +// META: script=/common/get-host-info.sub.js +// META: script=./resources/common.js +// META: timeout=long +'use strict'; + +assert_true(self.crossOriginIsolated); + +promise_test(async testCase => { + const BYTES_PER_WORKER = 10 * 1024 * 1024; + const worker_url = await createWorker(BYTES_PER_WORKER); + const result = await performance.measureMemory(); + assert_greater_than_equal(result.bytes, BYTES_PER_WORKER); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + { + url: worker_url, + scope: 'DedicatedWindow', + container: null, + }, + ]); +}, 'Well-formed result of performance.measureMemory.'); + diff --git a/tests/wpt/web-platform-tests/measure-memory/main-frame-and-worker.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/main-frame-and-worker.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/main-frame-and-worker.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/main-frame-and-worker.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/main-frame-and-worker.tentative.window.js deleted file mode 100644 index 514a4ed0673..00000000000 --- a/tests/wpt/web-platform-tests/measure-memory/main-frame-and-worker.tentative.window.js +++ /dev/null @@ -1,24 +0,0 @@ -// META: script=/common/get-host-info.sub.js -// META: script=./resources/common.js -// META: timeout=long -'use strict'; - - -promise_test(async testCase => { - try { - const BYTES_PER_WORKER = 10 * 1024 * 1024; - await createWorker(BYTES_PER_WORKER); - const result = await performance.measureMemory(); - assert_greater_than_equal(result.bytes, BYTES_PER_WORKER); - checkMeasureMemory(result, { - allowed: [window.location.href], - required: [window.location.href], - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } -}, 'Well-formed result of performance.measureMemory.'); - diff --git a/tests/wpt/web-platform-tests/measure-memory/main-frame.tentative.https.window.js b/tests/wpt/web-platform-tests/measure-memory/main-frame.tentative.https.window.js new file mode 100644 index 00000000000..fd58e9314b0 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/main-frame.tentative.https.window.js @@ -0,0 +1,16 @@ +// META: script=/common/get-host-info.sub.js +// META: script=./resources/common.js +// META: timeout=long +'use strict'; + +assert_true(self.crossOriginIsolated); +promise_test(async testCase => { + const result = await performance.measureMemory(); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + ]); +}, 'Well-formed result of performance.measureMemory.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/main-frame.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/main-frame.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/main-frame.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/main-frame.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/main-frame.tentative.window.js deleted file mode 100644 index 0a34abb9246..00000000000 --- a/tests/wpt/web-platform-tests/measure-memory/main-frame.tentative.window.js +++ /dev/null @@ -1,20 +0,0 @@ -// META: script=/common/get-host-info.sub.js -// META: script=./resources/common.js -// META: timeout=long -'use strict'; - -promise_test(async testCase => { - try { - const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: [window.location.href], - required: [window.location.href], - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } -}, 'Well-formed result of performance.measureMemory.'); - diff --git a/tests/wpt/web-platform-tests/measure-memory/redirect.client.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/redirect.client.tentative.https.window.js index e38a325c712..36d9a9d44cd 100644 --- a/tests/wpt/web-platform-tests/measure-memory/redirect.client.tentative.window.js +++ b/tests/wpt/web-platform-tests/measure-memory/redirect.client.tentative.https.window.js @@ -3,6 +3,8 @@ // META: timeout=long 'use strict'; +assert_true(self.crossOriginIsolated); + promise_test(async testCase => { const {iframes, windows} = await build([ { @@ -38,21 +40,28 @@ promise_test(async testCase => { }, ]); const keep = sameOriginContexts(frames).concat(sameOriginContexts(windows)); - try { - const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: [ - window.location.href, - iframes['cross-origin-1'].src, - ], - required: [ - window.location.href, - ], - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } + const result = await performance.measureMemory(); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + { + url: 'cross-origin-url', + scope: 'cross-origin-aggregated', + container: { + id: 'cross-origin-1', + src: frames['cross-origin-1'].src, + }, + }, + { + url: windows['same-origin-2'].location.href, + scope: 'Window', + container: { + id: 'cross-origin-1', + src: iframes['cross-origin-1'].src, + }, + }, + ]); }, 'performance.measureMemory does not leak client redirected URL.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/redirect.client.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/redirect.client.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/redirect.client.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/redirect.server.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/redirect.server.tentative.https.window.js index 740abca1678..6506730b34c 100644 --- a/tests/wpt/web-platform-tests/measure-memory/redirect.server.tentative.window.js +++ b/tests/wpt/web-platform-tests/measure-memory/redirect.server.tentative.https.window.js @@ -3,6 +3,8 @@ // META: timeout=long 'use strict'; +assert_true(self.crossOriginIsolated); + promise_test(async testCase => { const {iframes, windows} = await build([ { @@ -38,21 +40,28 @@ promise_test(async testCase => { }, ]); const keep = sameOriginContexts(frames).concat(sameOriginContexts(windows)); - try { - const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: [ - window.location.href, - iframes['cross-origin-1'].src, - ], - required: [ - window.location.href, - ], - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } + const result = await performance.measureMemory(); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + { + url: 'cross-origin-url', + scope: 'cross-origin-aggregated', + container: { + id: 'cross-origin-1', + src: frames['cross-origin-1'].src, + }, + }, + { + url: windows['same-origin-2'].location.href, + scope: 'Window', + container: { + id: 'cross-origin-1', + src: iframes['cross-origin-1'].src, + }, + }, + ]); }, 'performance.measureMemory does not leak server redirected URL.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/redirect.server.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/redirect.server.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/redirect.server.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/common.js b/tests/wpt/web-platform-tests/measure-memory/resources/common.js index 3b246719799..11b40d7d3d1 100644 --- a/tests/wpt/web-platform-tests/measure-memory/resources/common.js +++ b/tests/wpt/web-platform-tests/measure-memory/resources/common.js @@ -1,11 +1,32 @@ const ORIGINS = { - 'same-origin': get_host_info().HTTP_ORIGIN, - 'cross-origin': get_host_info().HTTP_REMOTE_ORIGIN, - 'cross-site': get_host_info().HTTP_NOTSAMESITE_ORIGIN, + 'same-origin': get_host_info().HTTPS_ORIGIN, + 'cross-origin': get_host_info().HTTPS_REMOTE_ORIGIN, + 'cross-site': get_host_info().HTTPS_NOTSAMESITE_ORIGIN, } -function checkMeasureMemoryBreakdown(breakdown, options, required) { - const allowed = new Set(options.allowed); +function checkContainer(actual, expected) { + if (!actual) return true; + if (!expected) return false; + return actual.id == expected.id && actual.src == expected.src; +} + +function checkAttribuiton(attribution, expected) { + assert_own_property(attribution, 'url'); + assert_own_property(attribution, 'scope'); + let found = false; + for (const e of expected) { + if (attribution.url === e.url && + attribution.scope === e.scope && + checkContainer(attribution.container, e.container)) { + found = true; + e.found = true; + } + } + assert_true(found, JSON.stringify(attribution) + + ' is not found in ' + JSON.stringify(expected) + '.'); +} + +function checkBreakdown(breakdown, expected) { assert_own_property(breakdown, 'bytes'); assert_greater_than_equal(breakdown.bytes, 0); assert_own_property(breakdown, 'userAgentSpecificTypes'); @@ -14,28 +35,25 @@ function checkMeasureMemoryBreakdown(breakdown, options, required) { } assert_own_property(breakdown, 'attribution'); for (const attribution of breakdown.attribution) { - assert_equals(typeof attribution, 'string'); - assert_true( - allowed.has(attribution), - `${attribution} must be in ${JSON.stringify(options.allowed)}`); - if (required.has(attribution)) { - required.delete(attribution); - } + checkAttribuiton(attribution, expected); } } -function checkMeasureMemory(result, options) { - assert_own_property(result, 'bytes'); - assert_own_property(result, 'breakdown'); - const required = new Set(options.required); - let bytes = 0; - for (let breakdown of result.breakdown) { - checkMeasureMemoryBreakdown(breakdown, options, required); - bytes += breakdown.bytes; +function checkMeasureMemory(result, expected) { + assert_own_property(result, 'bytes'); + assert_own_property(result, 'breakdown'); + let bytes = 0; + for (let breakdown of result.breakdown) { + checkBreakdown(breakdown, expected); + bytes += breakdown.bytes; + } + assert_equals(bytes, result.bytes); + for (const e of expected) { + if (e.required) { + assert_true(e.found, + JSON.stringify(e) + ' did not appear in the result.'); } - assert_equals(bytes, result.bytes); - assert_equals(required.size, 0, JSON.stringify(result.breakdown) + - ' does not include ' + JSON.stringify(required.values())); + } } function url(params) { @@ -52,7 +70,8 @@ function url(params) { } let url = `${origin}/${file}?id=${params.id}`; if (params.redirect === 'server') { - url = `${origin}/common/redirect.py?location=${encodeURIComponent(url)}`; + url = (`${origin}/measure-memory/resources/redirect.py?` + + `location=${encodeURIComponent(url)}`); } return url; } @@ -95,31 +114,7 @@ let waitForMessage = (function () { } })(); -// Constructs iframes based on their descriptoin. -async function build(children) { - window.accessible_children = {iframes: {}, windows: {}}; - await Promise.all(children.map(buildChild)); - const result = window.accessible_children; - delete window.accessible_children; - return result; -} - -async function buildChild(params) { - let child = null; - function target() { - return params.window_open ? child : child.contentWindow; - } - if (params.window_open) { - child = window.open(url(params)); - } else { - child = document.createElement('iframe'); - child.src = url(params); - child.id = params.id; - document.body.appendChild(child); - } - const ready = await waitForMessage(params.id); - target().postMessage({id: 'parent', payload: params.children}, '*'); - const done = await waitForMessage(params.id); +function getMainWindow() { let main = window; while (true) { if (main === main.parent) { @@ -132,17 +127,17 @@ async function buildChild(params) { main = main.parent; } } + return main; +} + +function isSameOrigin(other) { try { - main.accessible_children; + other.descendants; } catch (e) { // Cross-origin iframe that cannot access the main frame. - return; - } - if (params.window_open) { - main.accessible_children.windows[params.id] = child; - } else { - main.accessible_children.iframes[params.id] = child; + return false; } + return !!other.descendants; } function getId() { @@ -157,15 +152,57 @@ function getParent() { return window.parent; } +// Constructs iframes based on their descriptoin. +async function build(children) { + window.descendants = {iframes: {}, windows: {}}; + await Promise.all(children.map(buildChild)); + const result = window.descendants; + return result; +} + +async function buildChild(params) { + let child = null; + function target() { + return params.window_open ? child : child.contentWindow; + } + if (params.window_open) { + child = window.open(url(params)); + if (!params.id.startsWith('same-origin')) { + // Cross-origin windows gets their own browsing context groups with COOP. + // The postMessage calls before would not work for them, so we do not + // wait for them to load. + return; + } + } else { + child = document.createElement('iframe'); + child.src = url(params); + child.id = params.id; + document.body.appendChild(child); + } + const ready = await waitForMessage(params.id); + target().postMessage({id: 'parent', payload: params.children}, '*'); + const done = await waitForMessage(params.id); + if (!params.window_open) { + const main = getMainWindow(); + if (isSameOrigin(main)) { + main.descendants.iframes[params.id] = child; + } + } +} + // This function runs within an iframe. // It gets the children descriptions from the parent and constructs them. async function setupChild() { const id = getId(); + const main = getMainWindow(); + if (isSameOrigin(main)) { + main.descendants.windows[id] = window; + } document.getElementById('title').textContent = id; getParent().postMessage({id : id, payload: 'ready'}, '*'); const children = await waitForMessage('parent'); if (children) { - await build(children); + await Promise.all(children.map(buildChild)); } getParent().postMessage({id: id, payload: 'done'}, '*'); } @@ -186,8 +223,7 @@ async function createWorker(bytes) { let resolve_promise; const promise = new Promise(resolve => resolve_promise = resolve); worker.onmessage = function (message) { - assert_equals(message.data, 'ready'); - resolve_promise(); + resolve_promise(message.data); } worker.postMessage({bytes}); return promise; diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/iframe.redirect.sub.html.headers b/tests/wpt/web-platform-tests/measure-memory/resources/iframe.redirect.sub.html.headers new file mode 100644 index 00000000000..4e798cd9f5d --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/resources/iframe.redirect.sub.html.headers @@ -0,0 +1,2 @@ +Cross-Origin-Embedder-Policy: require-corp +Cross-Origin-Resource-Policy: cross-origin diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/iframe.secret.sub.html.headers b/tests/wpt/web-platform-tests/measure-memory/resources/iframe.secret.sub.html.headers new file mode 100644 index 00000000000..b227e843ae8 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/resources/iframe.secret.sub.html.headers @@ -0,0 +1,2 @@ +Cross-Origin-Embedder-Policy: require-corp +Cross-Origin-Resource-Policy: cross-origin
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/iframe.sub.html.headers b/tests/wpt/web-platform-tests/measure-memory/resources/iframe.sub.html.headers new file mode 100644 index 00000000000..b227e843ae8 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/resources/iframe.sub.html.headers @@ -0,0 +1,2 @@ +Cross-Origin-Embedder-Policy: require-corp +Cross-Origin-Resource-Policy: cross-origin
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/redirect.py b/tests/wpt/web-platform-tests/measure-memory/resources/redirect.py new file mode 100644 index 00000000000..1e6dbff8a84 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/resources/redirect.py @@ -0,0 +1,21 @@ +def main(request, response): + """Simple handler that causes redirection. + + The request should typically have two query parameters: + status - The status to use for the redirection. Defaults to 302. + location - The resource to redirect to. + """ + status = 302 + if b"status" in request.GET: + try: + status = int(request.GET.first(b"status")) + except ValueError: + pass + + response.status = status + + location = request.GET.first(b"location") + + response.headers.set(b"Location", location) + response.headers.set(b"Cross-Origin-Embedder-Policy", b"require-corp") + response.headers.set(b"Cross-Origin-Resource-Policy", b"cross-origin") diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/window.redirect.sub.html.headers b/tests/wpt/web-platform-tests/measure-memory/resources/window.redirect.sub.html.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/resources/window.redirect.sub.html.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/window.secret.sub.html.headers b/tests/wpt/web-platform-tests/measure-memory/resources/window.secret.sub.html.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/resources/window.secret.sub.html.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/window.sub.html.headers b/tests/wpt/web-platform-tests/measure-memory/resources/window.sub.html.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/resources/window.sub.html.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/worker.js b/tests/wpt/web-platform-tests/measure-memory/resources/worker.js index bc194a854cd..000df127294 100644 --- a/tests/wpt/web-platform-tests/measure-memory/resources/worker.js +++ b/tests/wpt/web-platform-tests/measure-memory/resources/worker.js @@ -5,5 +5,5 @@ self.onmessage = function(message) { for (let i = 0; i < length; i += 256) { self.root[i] = 1; } - postMessage('ready'); + postMessage(self.location.href); } diff --git a/tests/wpt/web-platform-tests/measure-memory/resources/worker.js.headers b/tests/wpt/web-platform-tests/measure-memory/resources/worker.js.headers new file mode 100644 index 00000000000..a2714096617 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/resources/worker.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Embedder-Policy: require-corp +Cross-Origin-Resource-Policy: same-origin
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/window-open.cross-origin.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/window-open.cross-origin.tentative.https.window.js index d067b2c175b..2e6561ad44b 100644 --- a/tests/wpt/web-platform-tests/measure-memory/window-open.cross-origin.tentative.window.js +++ b/tests/wpt/web-platform-tests/measure-memory/window-open.cross-origin.tentative.https.window.js @@ -3,8 +3,10 @@ // META: timeout=long 'use strict'; +assert_true(self.crossOriginIsolated); + promise_test(async testCase => { - const {windows, iframes} = await build([ + const {iframes, windows} = await build([ { id: 'cross-origin-1', window_open: true, @@ -22,20 +24,12 @@ promise_test(async testCase => { ] }, ]); - try { - const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: [ - window.location.href, - ], - required: [ - window.location.href, - ], - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } + const result = await performance.measureMemory(); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + ]); }, 'performance.measureMemory does not leak URL of cross-origin window.open.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/window-open.cross-origin.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/window-open.cross-origin.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/window-open.cross-origin.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/window-open.cross-site.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/window-open.cross-site.tentative.https.window.js index 7fa49f5facc..f70ad9df32b 100644 --- a/tests/wpt/web-platform-tests/measure-memory/window-open.cross-site.tentative.window.js +++ b/tests/wpt/web-platform-tests/measure-memory/window-open.cross-site.tentative.https.window.js @@ -3,8 +3,10 @@ // META: timeout=long 'use strict'; +assert_true(self.crossOriginIsolated); + promise_test(async testCase => { - const {windows, iframes} = await build([ + const {iframes, windows} = await build([ { id: 'cross-site-1', window_open: true, @@ -22,20 +24,12 @@ promise_test(async testCase => { ] }, ]); - try { - const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: [ - window.location.href, - ], - required: [ - window.location.href, - ], - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } + const result = await performance.measureMemory(); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + ]); }, 'performance.measureMemory does not leak URL of cross-site window.open.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/window-open.cross-site.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/window-open.cross-site.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/window-open.cross-site.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/window-open.mix.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/window-open.mix.tentative.https.window.js index 5bb9d29c61d..6a913a88a48 100644 --- a/tests/wpt/web-platform-tests/measure-memory/window-open.mix.tentative.window.js +++ b/tests/wpt/web-platform-tests/measure-memory/window-open.mix.tentative.https.window.js @@ -3,8 +3,10 @@ // META: timeout=long 'use strict'; +assert_true(self.crossOriginIsolated); + promise_test(async testCase => { - const {windows, iframes} = await build([ + const {iframes, windows} = await build([ { id: 'same-origin-1', children: [ @@ -70,30 +72,64 @@ promise_test(async testCase => { ] }, ]); - try { - const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: [ - window.location.href, - iframes['same-origin-1'].src, - windows['same-origin-2'].location.href, - windows['same-origin-3'].location.href, - iframes['cross-origin-4'].src, - iframes['cross-site-6'].src, - iframes['same-origin-8'].src, - ], - required: [ - window.location.href, - iframes['same-origin-1'].src, - windows['same-origin-2'].location.href, - windows['same-origin-3'].location.href, - iframes['same-origin-8'].src, - ], - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } + const result = await performance.measureMemory(); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + { + url: windows['same-origin-1'].location.href, + scope: 'Window', + container: { + id: 'same-origin-1', + src: iframes['same-origin-1'].src, + }, + }, + { + url: windows['same-origin-2'].location.href, + scope: 'Window', + container: null, + }, + { + url: windows['same-origin-3'].location.href, + scope: 'Window', + container: null, + }, + { + url: 'cross-origin-url', + scope: 'cross-origin-aggregated', + container: { + id: 'cross-origin-4', + src: iframes['cross-origin-4'].src, + }, + }, + { + url: windows['same-origin-5'].location.href, + scope: 'Window', + container: null, + }, + { + url: 'cross-origin-url', + scope: 'cross-origin-aggregated', + container: { + id: 'cross-site-6', + src: iframes['cross-site-6'].src, + }, + }, + { + url: windows['same-origin-7'].location.href, + scope: 'Window', + container: null, + }, + { + url: windows['same-origin-8'].location.href, + scope: 'Window', + container: { + id: 'same-origin-8', + src: iframes['same-origin-8'].src, + }, + }, + ]); }, 'performance.measureMemory does not leak URLs in cross-origin iframes and windows.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/window-open.mix.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/window-open.mix.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/window-open.mix.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/window-open.same-origin.tentative.https.window.js b/tests/wpt/web-platform-tests/measure-memory/window-open.same-origin.tentative.https.window.js new file mode 100644 index 00000000000..5223a97bc7d --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/window-open.same-origin.tentative.https.window.js @@ -0,0 +1,50 @@ +// META: script=/common/get-host-info.sub.js +// META: script=./resources/common.js +// META: timeout=long +'use strict'; + +assert_true(self.crossOriginIsolated); + +promise_test(async testCase => { + const {iframes, windows} = await build([ + { + id: 'same-origin-1', + window_open: true, + children: [ + { + id: 'same-origin-2', + window_open: true, + }, + { + id: 'same-origin-3', + }, + ] + }, + ]); + const result = await performance.measureMemory(); + checkMeasureMemory(result, [ + { + url: window.location.href, + scope: 'Window', + container: null, + }, + { + url: windows['same-origin-1'].location.href, + scope: 'Window', + container: null, + }, + { + url: windows['same-origin-2'].location.href, + scope: 'Window', + container: null, + }, + { + url: windows['same-origin-3'].location.href, + scope: 'Window', + container: { + id: 'same-origin-3', + src: iframes['same-origin-3'].src, + }, + }, + ]); +}, 'Well-formed result of performance.measureMemory with same-origin window.open.'); diff --git a/tests/wpt/web-platform-tests/measure-memory/window-open.same-origin.tentative.https.window.js.headers b/tests/wpt/web-platform-tests/measure-memory/window-open.same-origin.tentative.https.window.js.headers new file mode 100644 index 00000000000..4fff9d9fba4 --- /dev/null +++ b/tests/wpt/web-platform-tests/measure-memory/window-open.same-origin.tentative.https.window.js.headers @@ -0,0 +1,2 @@ +Cross-Origin-Opener-Policy: same-origin +Cross-Origin-Embedder-Policy: require-corp
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/measure-memory/window-open.same-origin.tentative.window.js b/tests/wpt/web-platform-tests/measure-memory/window-open.same-origin.tentative.window.js deleted file mode 100644 index 7ec3cc436f1..00000000000 --- a/tests/wpt/web-platform-tests/measure-memory/window-open.same-origin.tentative.window.js +++ /dev/null @@ -1,44 +0,0 @@ -// META: script=/common/get-host-info.sub.js -// META: script=./resources/common.js -// META: timeout=long -'use strict'; - -promise_test(async testCase => { - const {windows, iframes} = await build([ - { - id: 'same-origin-1', - window_open: true, - children: [ - { - id: 'same-origin-2', - window_open: true, - }, - { - id: 'same-origin-3', - }, - ] - }, - ]); - try { - const result = await performance.measureMemory(); - checkMeasureMemory(result, { - allowed: [ - window.location.href, - windows['same-origin-1'].location.href, - windows['same-origin-2'].location.href, - iframes['same-origin-3'].src, - ], - required: [ - window.location.href, - windows['same-origin-1'].location.href, - windows['same-origin-2'].location.href, - iframes['same-origin-3'].src, - ], - }); - } catch (error) { - if (!(error instanceof DOMException)) { - throw error; - } - assert_equals(error.name, 'SecurityError'); - } -}, 'Well-formed result of performance.measureMemory with same-origin window.open.'); diff --git a/tests/wpt/web-platform-tests/portals/history/resources/portal-harness.js b/tests/wpt/web-platform-tests/portals/history/resources/portal-harness.js index 9761ac9268b..fa8c761afb9 100644 --- a/tests/wpt/web-platform-tests/portals/history/resources/portal-harness.js +++ b/tests/wpt/web-platform-tests/portals/history/resources/portal-harness.js @@ -6,7 +6,7 @@ window.onload = async () => { let testName = urlParams.get('testName'); let testFn = window[testName]; if (!testFn) { - window.portalHost.postMessage('Missing test: ' + testName, '*'); + window.portalHost.postMessage('Missing test: ' + testName); return; } @@ -17,10 +17,10 @@ window.onload = async () => { try { await testFn(); - window.portalHost.postMessage('Passed', '*'); + window.portalHost.postMessage('Passed'); } catch (e) { window.portalHost.postMessage( - 'Failed: ' + e.name + ': ' + e.message, '*'); + 'Failed: ' + e.name + ': ' + e.message); } }; diff --git a/tests/wpt/web-platform-tests/portals/portals-focus.sub.html b/tests/wpt/web-platform-tests/portals/portals-focus.sub.html index 168e74aa9c8..3e3045adf90 100644 --- a/tests/wpt/web-platform-tests/portals/portals-focus.sub.html +++ b/tests/wpt/web-platform-tests/portals/portals-focus.sub.html @@ -22,7 +22,7 @@ portal.onmessage = t.step_func(e => { assert_unreached("button inside portal should not be focused"); }); - portal.postMessage("focus", "*"); + portal.postMessage("focus"); await new Promise(r => t.step_timeout(r, 500)); } finally { document.body.removeChild(portal); @@ -35,7 +35,7 @@ portal.onmessage = t.step_func(e => { assert_unreached("button inside portal should not be focused"); }); - portal.postMessage("focus", "*"); + portal.postMessage("focus"); await new Promise(r => t.step_timeout(r, 500)); } finally { document.body.removeChild(portal); diff --git a/tests/wpt/web-platform-tests/portals/portals-host-post-message.sub.html b/tests/wpt/web-platform-tests/portals/portals-host-post-message.sub.html index aa4893cb904..d589235ec3b 100644 --- a/tests/wpt/web-platform-tests/portals/portals-host-post-message.sub.html +++ b/tests/wpt/web-platform-tests/portals/portals-host-post-message.sub.html @@ -22,7 +22,7 @@ var waitForResponse = new Promise((resolve, reject) => { portal.addEventListener("message", e => { resolve(e); }); }); - portal.postMessage(params, "*"); + portal.postMessage(params); return waitForResponse; } @@ -31,17 +31,10 @@ promise_test(async () => { var {data, origin} = await createPortalAndLoopMessage(sameOriginUrl, - ["test", "*"]); - assert_equals(data, "test"); - assert_equals(origin, "http://{{host}}:{{ports[http][0]}}"); - }, "Message received after postMessage from portal host"); - - promise_test(async () => { - var {data, origin} = await createPortalAndLoopMessage(sameOriginUrl, ["test"]); assert_equals(data, "test"); assert_equals(origin, "http://{{host}}:{{ports[http][0]}}"); - }, "Message received from same-origin portal host with no target origin specified"); + }, "Message received after postMessage from portal host"); promise_test(async () => { var message = { @@ -53,7 +46,7 @@ } }; var {data} = await createPortalAndLoopMessage(sameOriginUrl, - [message, "*"]); + [message]); assert_object_equals(data, message); }, "postMessage with object message"); @@ -63,7 +56,7 @@ return new Promise((resolve, reject) => { var channel = new MessageChannel(); channel.port1.onmessage = resolve; - port.postMessage("sending port", [channel.port2]); + port.postMessage("sending port", {transfer: [channel.port2]}); }); } diff --git a/tests/wpt/web-platform-tests/portals/portals-post-message.sub.html b/tests/wpt/web-platform-tests/portals/portals-post-message.sub.html index 19803f68696..d556dd43d84 100644 --- a/tests/wpt/web-platform-tests/portals/portals-post-message.sub.html +++ b/tests/wpt/web-platform-tests/portals/portals-post-message.sub.html @@ -33,21 +33,21 @@ }); } - function postMessageWithMessagePorts(portal, message, targetOrigin) { + function postMessageWithMessagePorts(portal, message) { return new Promise((resolve, reject) => { var channel = new MessageChannel(); channel.port1.onmessage = e => { channel.port1.close(); resolve(e.data); }; - portal.postMessage(message, targetOrigin, [channel.port2]); + portal.postMessage(message, {transfer: [channel.port2]}); }); } promise_test(async () => { var portal = await createAndInsertPortal(sameOriginUrl); var message = "test message"; - var {origin, data, sourceIsPortalHost} = await postMessage(portal, message, "*"); + var {origin, data, sourceIsPortalHost} = await postMessage(portal, message); assert_equals(data, message); assert_equals(origin, window.location.origin); assert_true(sourceIsPortalHost); @@ -55,18 +55,6 @@ promise_test(async () => { var portal = await createAndInsertPortal(sameOriginUrl); - var message = "test message"; - var {data} = await postMessage(portal, message); - assert_equals(data, message); - var {data} = await postMessage(portal, message, "/"); - assert_equals(data, message); - var {data} = await postMessage(portal, message, - "http://{{host}}:{{ports[http][0]}}"); - assert_equals(data, message); - }, "postMessage received by portal host in same-origin portal for multiple valid target origins"); - - promise_test(async () => { - var portal = await createAndInsertPortal(sameOriginUrl); var message = { prop1: "value1", prop2: 2.5, @@ -82,7 +70,7 @@ promise_test(async () => { var portal = await createAndInsertPortal(sameOriginUrl); var message = "test message"; - var {data} = await postMessageWithMessagePorts(portal, message, "*"); + var {data} = await postMessageWithMessagePorts(portal, message); assert_equals(data, message); }, "postMessage with message ports and same-origin portal"); @@ -95,7 +83,7 @@ var message = { arrayBuffer: arrayBuffer }; - var {data} = await postMessage(portal, message, "*"); + var {data} = await postMessage(portal, message); assert_array_equals([0, 1, 2, 3, 4], int8View); assert_array_equals([0, 1, 2, 3, 4], data.array); }, "postMessage with array buffer without transfer"); @@ -109,7 +97,7 @@ var message = { arrayBuffer: arrayBuffer }; - var {data} = await postMessage(portal, message, "*", [arrayBuffer]); + var {data} = await postMessage(portal, message, {transfer: [arrayBuffer]}); assert_equals(int8View.length, 0); assert_array_equals(data.array, [0, 1, 2, 3, 4]); }, "postMessage with transferred array buffer"); @@ -149,7 +137,7 @@ promise_test(async t => { var portal = await createAndInsertPortal(sameOriginUrl); return promise_rejects_js(t, TypeError, - postMessage(portal, "test", "*", [null])); + postMessage(portal, "test", {transfer: [null]})); }, "postMessage should fail with invalid ports"); async function waitForMessage(channelName) { @@ -189,7 +177,7 @@ promise_test(async t => { const key = token(); const portal = await createAndInsertPortal(`${crossOriginUrl}?key=${key}`); - portal.postMessage('test message', '*'); + portal.postMessage('test message'); t.step_timeout(() => { StashUtils.putValue(key, 'passed'); }, TIMEOUT_DURATION_MS); diff --git a/tests/wpt/web-platform-tests/portals/resources/eval-portal.html b/tests/wpt/web-platform-tests/portals/resources/eval-portal.html index 98c2013915e..a473501b014 100644 --- a/tests/wpt/web-platform-tests/portals/resources/eval-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/eval-portal.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <script> let logic = new Function('event', (new URL(location)).searchParams.get('logic')); -onload = () => window.portalHost.postMessage('ready', '*'); +onload = () => window.portalHost.postMessage('ready'); onportalactivate = event => { Promise.resolve(event) .then(logic) diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-activate-data-portal.html b/tests/wpt/web-platform-tests/portals/resources/portal-activate-data-portal.html index f57e4b196be..0842ad82efa 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-activate-data-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-activate-data-portal.html @@ -1,9 +1,9 @@ <!DOCTYPE html> <script> let logic = new Function('event', (new URL(location)).searchParams.get('logic')); -onload = () => window.portalHost.postMessage('ready', '*'); +onload = () => window.portalHost.postMessage('ready'); onportalactivate = event => { var portal = event.adoptPredecessor(); - portal.postMessage(logic(event), "*"); + portal.postMessage(logic(event)); }; </script> diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-portal.html b/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-portal.html index 63c2e6e8b92..6de5aafca78 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-activate-event-portal.html @@ -17,5 +17,5 @@ window.addEventListener("portalactivate", portalActivate); } - window.portalHost.postMessage("loaded", "*"); + window.portalHost.postMessage("loaded"); </script> diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-activate-inside-portal.html b/tests/wpt/web-platform-tests/portals/resources/portal-activate-inside-portal.html index 517c9a47e51..ff8bead3242 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-activate-inside-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-activate-inside-portal.html @@ -4,7 +4,7 @@ var portal = document.createElement("portal"); portal.src = "simple-portal.html"; portal.onload = () => { - portal.activate().catch(e => window.portalHost.postMessage(e.name, "*")); + portal.activate().catch(e => window.portalHost.postMessage(e.name)); } document.body.appendChild(portal); </script> diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-close-window.html b/tests/wpt/web-platform-tests/portals/resources/portal-close-window.html index 6e163f4e86c..a12af3cd7a9 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-close-window.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-close-window.html @@ -2,6 +2,6 @@ <script> onload = () => { window.close(); - window.portalHost.postMessage(window.closed, '*'); + window.portalHost.postMessage(window.closed); }; </script> diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-host-hidden-after-activation-portal.html b/tests/wpt/web-platform-tests/portals/resources/portal-host-hidden-after-activation-portal.html index 75c8b733b5e..491d184f972 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-host-hidden-after-activation-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-host-hidden-after-activation-portal.html @@ -10,5 +10,5 @@ bc.postMessage({hasHost: !!window.portalHost }); bc.close(); - window.portalHost.postMessage("loaded", "*"); + window.portalHost.postMessage("loaded"); </script> diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-after-activate.html b/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-after-activate.html index 996380f9230..7b03ac0294c 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-after-activate.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-after-activate.html @@ -1,13 +1,13 @@ <!DOCTYPE html> <script> - window.portalHost.postMessage("loaded", "*"); + window.portalHost.postMessage("loaded"); var ph = window.portalHost; window.onportalactivate = e => { var exception_name = "" try { - ph.postMessage("message", "*"); + ph.postMessage("message"); } catch (error) { exception_name = error.name; diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-navigate-1.html b/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-navigate-1.html index 3b36eaed05e..a59144e7e11 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-navigate-1.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-navigate-1.html @@ -1,5 +1,5 @@ <!DOCTYPE html> <script> - window.portalHost.postMessage("loaded", "*"); + window.portalHost.postMessage("loaded"); window.location.href = "portal-host-post-message-navigate-2.html" </script> diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-navigate-2.html b/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-navigate-2.html index 163c42e655d..571c4f122e0 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-navigate-2.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-navigate-2.html @@ -1,4 +1,4 @@ <!DOCTYPE html> <script> - window.portalHost.postMessage("loaded", "*"); + window.portalHost.postMessage("loaded"); </script> diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-x-origin.html b/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-x-origin.html index eb390e8b539..6cbc7f4b884 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-x-origin.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message-x-origin.html @@ -1,4 +1,4 @@ <!DOCTYPE html> <script> - window.portalHost.postMessage('test message', '*'); + window.portalHost.postMessage('test message'); </script> diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message.html b/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message.html index 3c49d560f4b..1935ee898e9 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-host-post-message.html @@ -5,15 +5,15 @@ channel.port1.onmessage = e => { e.ports[0].postMessage("received"); } - window.portalHost.postMessage("sending port", "*", [channel.port2]); + window.portalHost.postMessage("sending port", {transfer: [channel.port2]}); } function postMessageWithArrayBuffer(array, withTransfer) { var arrayBuffer = new Int8Array(array).buffer; if (withTransfer) { - window.portalHost.postMessage({arrayBuffer}, "*", [arrayBuffer]); + window.portalHost.postMessage({arrayBuffer}, {transfer: [arrayBuffer]}); } else { - window.portalHost.postMessage({arrayBuffer}, "*"); + window.portalHost.postMessage({arrayBuffer}); } } @@ -21,7 +21,7 @@ try { window.portalHost.postMessage(...params); } catch (e) { - window.portalHost.postMessage({errorType: e.name}, "*"); + window.portalHost.postMessage({errorType: e.name}); } } @@ -39,10 +39,10 @@ postMessageWithArrayBuffer(e.data.array, true); return; case "invalid-message": - postMessageAndCatchException(document.body, "*"); + postMessageAndCatchException(document.body); return; case "invalid-port": - postMessageAndCatchException("", "*", [null]); + postMessageAndCatchException("", {transfer: [null]}); return; } } diff --git a/tests/wpt/web-platform-tests/portals/resources/portal-post-message-portal.html b/tests/wpt/web-platform-tests/portals/resources/portal-post-message-portal.html index 26f62839af5..e83ae56e08f 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portal-post-message-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/portal-post-message-portal.html @@ -24,6 +24,6 @@ return; } - window.portalHost.postMessage(message, "*"); + window.portalHost.postMessage(message); }; </script> diff --git a/tests/wpt/web-platform-tests/portals/resources/portals-adopt-predecessor-portal.html b/tests/wpt/web-platform-tests/portals/resources/portals-adopt-predecessor-portal.html index 48e162b9714..b838b38be16 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portals-adopt-predecessor-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/portals-adopt-predecessor-portal.html @@ -9,7 +9,7 @@ document.body.appendChild(portal); if (portal instanceof HTMLPortalElement) { - portal.postMessage("adopted", "*"); + portal.postMessage("adopted"); } } if (test == "adopt-twice") { @@ -20,7 +20,7 @@ e.adoptPredecessor(); } catch(e) { if (e.name == "InvalidStateError") { - portal.postMessage("passed", "*"); + portal.postMessage("passed"); } } } diff --git a/tests/wpt/web-platform-tests/portals/resources/portals-nested-portal.html b/tests/wpt/web-platform-tests/portals/resources/portals-nested-portal.html index 1ac17c03d4c..278b32eea06 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portals-nested-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/portals-nested-portal.html @@ -3,7 +3,7 @@ <script> var portal = document.createElement("portal"); portal.src = "simple-portal.html"; - portal.onload = e => window.portalHost.postMessage(e.data, "*"); + portal.onload = e => window.portalHost.postMessage(e.data); document.body.appendChild(portal); </script> </body> diff --git a/tests/wpt/web-platform-tests/portals/resources/portals-rendering-portal.html b/tests/wpt/web-platform-tests/portals/resources/portals-rendering-portal.html index c3fe18ef534..31b3f4a9909 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portals-rendering-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/portals-rendering-portal.html @@ -2,7 +2,7 @@ <body style="background-color: green"> <script> window.requestAnimationFrame(function(ts) { - window.portalHost.postMessage("loaded", "*"); + window.portalHost.postMessage("loaded"); }); </script> </body> diff --git a/tests/wpt/web-platform-tests/portals/resources/postmessage-referrer.sub.html b/tests/wpt/web-platform-tests/portals/resources/postmessage-referrer.sub.html index 92aef00380a..c3837dc79d8 100644 --- a/tests/wpt/web-platform-tests/portals/resources/postmessage-referrer.sub.html +++ b/tests/wpt/web-platform-tests/portals/resources/postmessage-referrer.sub.html @@ -4,5 +4,5 @@ httpReferrer: '{{header_or_default(Referer, no-http-referrer)}}', documentReferrer: document.referrer || 'no-document-referrer', }; - window.portalHost.postMessage(message, "*"); + window.portalHost.postMessage(message); </script> diff --git a/tests/wpt/web-platform-tests/portals/resources/simple-portal-adopts-predecessor.html b/tests/wpt/web-platform-tests/portals/resources/simple-portal-adopts-predecessor.html index b199bdd93b3..b5ea9f029d8 100644 --- a/tests/wpt/web-platform-tests/portals/resources/simple-portal-adopts-predecessor.html +++ b/tests/wpt/web-platform-tests/portals/resources/simple-portal-adopts-predecessor.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <body> <script> - window.portalHost.postMessage("ready", "*"); + window.portalHost.postMessage("ready"); onportalactivate = e => document.body.appendChild(e.adoptPredecessor()); </script> </body> diff --git a/tests/wpt/web-platform-tests/portals/resources/simple-portal.html b/tests/wpt/web-platform-tests/portals/resources/simple-portal.html index 29380099af1..7d7b678cadc 100644 --- a/tests/wpt/web-platform-tests/portals/resources/simple-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/simple-portal.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <body> <script> - window.portalHost.postMessage("ready", "*"); + window.portalHost.postMessage("ready"); </script> </body> diff --git a/tests/wpt/web-platform-tests/resource-timing/SyntheticResponse.py b/tests/wpt/web-platform-tests/resource-timing/SyntheticResponse.py index 944de61c715..0cce1df3cf6 100644 --- a/tests/wpt/web-platform-tests/resource-timing/SyntheticResponse.py +++ b/tests/wpt/web-platform-tests/resource-timing/SyntheticResponse.py @@ -44,8 +44,6 @@ def main(request, response): response.writer.end_headers() else: statusSent = True - elif arg == b"flush": - response.writer.flush() # else: # error " INVALID ARGUMENT %s" % arg diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-preload/resources/chunked-encoding-scope.py b/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-preload/resources/chunked-encoding-scope.py index 912f43d0040..659c4d8cdf2 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-preload/resources/chunked-encoding-scope.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-preload/resources/chunked-encoding-scope.py @@ -14,7 +14,6 @@ def main(request, response): response.writer.write(u"%s\n%s\n" % (len(str(idx)), idx)) else: response.writer.write(u"%s\r\n%s\r\n" % (len(str(idx)), idx)) - response.writer.flush() time.sleep(0.001) response.writer.write(u"0\r\n\r\n") diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/invalid-chunked-encoding-with-flush.py b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/invalid-chunked-encoding-with-flush.py index 22a696508f4..05977c6ab0b 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/invalid-chunked-encoding-with-flush.py +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/invalid-chunked-encoding-with-flush.py @@ -5,7 +5,5 @@ def main(request, response): response.write_status_headers() time.sleep(1) - response.explicit_flush = True response.writer.write(b"XX\r\n\r\n") - response.writer.flush() diff --git a/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html b/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html index c4a35d341c1..b9033f59924 100644 --- a/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html +++ b/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-attachment.tentative.html @@ -5,6 +5,7 @@ <script src='/resources/testharness.js'></script> <script src='/resources/testharnessreport.js'></script> <script src='../resources/shadow-dom-utils.js'></script> +<script src="support/helpers.js"></script> <script> const shadowContent = '<span>Shadow tree</span><slot></slot>'; @@ -18,7 +19,7 @@ function addDeclarativeShadowRoot(elementType, mode, delegatesFocus) { const declarativeString = `<${elementType} id=theelement>${getDeclarativeContent(mode, delegatesFocus)} <span class='lightdom'>${lightDomTextContent}</span></${elementType}>`; const wrapper = document.createElement('div'); - wrapper.setInnerHTML(declarativeString, {includeShadowRoots: true}); + setInnerHTML(wrapper, declarativeString); const element = wrapper.querySelector('#theelement'); return {wrapper: wrapper, element: element}; } diff --git a/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html b/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html index 6e3c16a9d82..a03743e44ff 100644 --- a/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html +++ b/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-basic.tentative.html @@ -5,6 +5,7 @@ <link rel="help" href="https://github.com/whatwg/dom/issues/831"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="support/helpers.js"></script> <div id="host" style="display:none"> <template shadowroot="open"> @@ -32,14 +33,14 @@ test(() => { test(() => { const div = document.createElement('div'); - div.setInnerHTML(` + setInnerHTML(div,` <div id="host"> <template shadowroot="open"> <slot id="s1" name="slot1"></slot> </template> <div id="c1" slot="slot1"></div> </div> - `, {includeShadowRoots: true}); + `); const host = div.querySelector('#host'); const c1 = host.querySelector('#c1'); assert_true(!!c1); @@ -53,12 +54,12 @@ test(() => { test(() => { const div = document.createElement('div'); - div.setInnerHTML(` + setInnerHTML(div,` <div id="host"> <template shadowroot="invalid"> </template> </div> - `, {includeShadowRoots: true}); + `); const host = div.querySelector('#host'); assert_equals(host.shadowRoot, null, "Shadow root was found"); const tmpl = host.querySelector('template'); @@ -69,12 +70,12 @@ test(() => { test(() => { const div = document.createElement('div'); - div.setInnerHTML(` + setInnerHTML(div,` <div id="host"> <template shadowroot="closed"> </template> </div> - `, {includeShadowRoots: true}); + `); const host = div.querySelector('#host'); assert_equals(host.shadowRoot, null, "Closed shadow root"); assert_equals(host.querySelector('template'), null, "No template - converted to shadow root"); @@ -82,12 +83,12 @@ test(() => { test(() => { const div = document.createElement('div'); - div.setInnerHTML(` + setInnerHTML(div,` <div id="host"> <template shadowroot="open"> <slot id="s1" name="slot1"></slot> </div> - `, {includeShadowRoots: true}); + `); const host = div.querySelector('#host'); assert_equals(host.querySelector('#s1'), null, "Should be inside shadow root"); assert_equals(host.querySelector('template'), null, "No leftover template node"); @@ -98,35 +99,25 @@ test(() => { test(() => { const div = document.createElement('div'); - div.setInnerHTML(` + setInnerHTML(div,` <div id="host"> <template shadowroot="open" shadowrootdelegatesfocus> </template> </div> - `, {includeShadowRoots: true}); + `); var host = div.querySelector('#host'); assert_true(!!host.shadowRoot,"No shadow root found"); assert_true(host.shadowRoot.delegatesFocus,"delegatesFocus should be true"); - div.setInnerHTML(` + setInnerHTML(div,` <div id="host"> <template shadowroot="open"> </template> </div> - `, {includeShadowRoots: true}); + `); host = div.querySelector('#host'); assert_true(!!host.shadowRoot,"No shadow root found"); assert_false(host.shadowRoot.delegatesFocus,"delegatesFocus should be false without the shadowrootdelegatesfocus attribute"); }, 'Declarative Shadow DOM: delegates focus attribute'); - -test(() => { - const host = document.createElement('div'); - // Root element of setInnerHTML is a <template shadowroot>: - host.setInnerHTML('<template shadowroot=open></template>', {allowShadowRoot: true}); - assert_equals(host.shadowRoot, null, "Shadow root should not be present"); - const tmpl = host.querySelector('template'); - assert_true(!!tmpl,"Template should still be present"); - assert_equals(tmpl.getAttribute('shadowroot'),"open","'shadowroot' attribute should still be present"); -}, 'Declarative Shadow DOM: setInnerHTML root element'); </script> <div id="multi-host" style="display:none"> diff --git a/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html b/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html index 2d6bf5f3f2d..d1fd9fc448a 100644 --- a/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html +++ b/tests/wpt/web-platform-tests/shadow-dom/declarative/declarative-shadow-dom-opt-in.tentative.html @@ -5,6 +5,7 @@ <link rel="help" href="https://github.com/whatwg/dom/issues/831"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src='../resources/shadow-dom-utils.js'></script> <body> <style> @@ -58,56 +59,40 @@ test(() => { assert_dsd(div,true); }, 'Non-fragment parsing needs no opt-in'); -test(() => { - const div = document.createElement('div'); - div.innerHTML = content; - assert_dsd(div,false); -}, 'innerHTML on element - disallowed'); - -test(() => { - const div = document.createElement('div'); - div.setInnerHTML(content); - assert_dsd(div,false); - div.setInnerHTML(content, {includeShadowRoots: false}); - assert_dsd(div,false); - div.setInnerHTML(content, {includeShadowRoots: true}); - assert_dsd(div,true); -}, 'setInnerHTML on element'); - -test(() => { - const templateContent = `<template id=tmpl>${content}</template>`; - const div = document.createElement('div'); - div.innerHTML = templateContent; - assert_dsd(div.querySelector('#tmpl').content,false); - div.setInnerHTML(templateContent, {includeShadowRoots: true}); - assert_dsd(div.querySelector('#tmpl').content,true); -}, 'setInnerHTML on element, with nested template content'); +const noChildElements = ['iframe','noscript','script','select','style','textarea','title','colgroup']; +const elements = HTML5_ELEMENT_NAMES.filter(el => !noChildElements.includes(el)); +for (let elementName of elements) { + var t = test(function() { + const el1 = document.createElement(elementName); + el1.innerHTML = content; + assert_dsd(el1,false); + + const templateContent = `<template id=tmpl>${content}</template>`; + const el2 = document.createElement('div'); + el2.innerHTML = templateContent; + assert_dsd(el2.querySelector('#tmpl').content,false); + }, `innerHTML on a <${elementName}>`); +} test(() => { const temp = document.createElement('template'); temp.innerHTML = content; assert_dsd(temp.content,false, 'innerHTML should not allow declarative shadow content'); - temp.setInnerHTML(content, {includeShadowRoots: true}); - assert_dsd(temp.content,true, 'setInnerHTML should allow declarative shadow content if enabled'); -}, 'setInnerHTML on template'); +}, 'innerHTML on template'); test(() => { const templateContent = `<template id=tmpl>${content}</template>`; const temp = document.createElement('template'); temp.innerHTML = templateContent; assert_dsd(temp.content.querySelector('#tmpl').content,false); - temp.setInnerHTML(templateContent, {includeShadowRoots: true}); - assert_dsd(temp.content.querySelector('#tmpl').content,true); -}, 'setInnerHTML on template, with nested template content'); +}, 'innerHTML on template, with nested template content'); test(() => { const div = document.createElement('div'); const shadow = div.attachShadow({mode: 'open'}); shadow.innerHTML = content; assert_dsd(shadow,false); - shadow.setInnerHTML(content, {includeShadowRoots: true}); - assert_dsd(shadow,true); -}, 'setInnerHTML on shadowRoot'); +}, 'innerHTML on shadowRoot'); test(() => { const parser = new DOMParser(); @@ -123,9 +108,7 @@ test(() => { const doc = document.implementation.createHTMLDocument(''); doc.body.innerHTML = content; assert_dsd(doc.body,false); - doc.body.setInnerHTML(content, {includeShadowRoots: true}); - assert_dsd(doc.body,true); -}, 'createHTMLDocument with setInnerHTML'); +}, 'createHTMLDocument with innerHTML - not supported'); test(() => { const doc = document.implementation.createHTMLDocument(''); @@ -145,7 +128,7 @@ async_test((t) => { client.open("GET", `data:text/html,${content}`); client.responseType = 'document'; client.send(); -}, 'XMLHttpRequest, disabled'); +}, 'XMLHttpRequest - not supported'); test(() => { const div = document.createElement('div'); diff --git a/tests/wpt/web-platform-tests/shadow-dom/declarative/setinnerhtml.tentative.html b/tests/wpt/web-platform-tests/shadow-dom/declarative/setinnerhtml.tentative.html deleted file mode 100644 index c65bf04a06c..00000000000 --- a/tests/wpt/web-platform-tests/shadow-dom/declarative/setinnerhtml.tentative.html +++ /dev/null @@ -1,48 +0,0 @@ -<!DOCTYPE html> -<title>getInnerHTML </title> -<link rel='author' title='Mason Freed' href='mailto:masonfreed@chromium.org'> -<link rel='help' href='https://github.com/whatwg/dom/issues/831'> -<script src='/resources/testharness.js'></script> -<script src='/resources/testharnessreport.js'></script> -<script src='../resources/shadow-dom-utils.js'></script> - -<body> -<script> -function testElementType(allowsShadowDom, elementType, applyToShadow) { - const t = test(t => { - // Create and attach element - let wrapper; - if (applyToShadow) { - const host = document.createElement('div'); - t.add_cleanup(function() { host.remove(); }); - document.body.appendChild(host); - wrapper = host.attachShadow({mode: 'open'}); - } else { - wrapper = document.createElement('div'); - t.add_cleanup(function() { wrapper.remove(); }); - document.body.appendChild(wrapper); - } - const html = `<${elementType}><template shadowroot="open"><slot></slot></template><span></span></${elementType}>`; - wrapper.setInnerHTML(html, {includeShadowRoots: true}); - if (allowsShadowDom) { - // Retrieve shadow root - assert_true(!!wrapper.firstElementChild.shadowRoot,'No shadow root found'); - } else { - const leftover = wrapper.firstElementChild.firstElementChild; - assert_true(wrapper.firstElementChild.childElementCount == 0 || leftover instanceof HTMLTemplateElement,'Template should be left over (or no children)'); - } - }, `${applyToShadow ? 'ShadowRoot' : 'Element'}.setInnerHTML() on <${elementType}>${allowsShadowDom ? `, with declarative Shadow DOM.` : ''}`); -} - -function runAllTests() { - const allElements = [...HTML5_ELEMENT_NAMES, 'htmlunknown'].filter(item => item !== 'body'); - const safelisted = ATTACHSHADOW_SAFELISTED_ELEMENTS; - for (const elementName of allElements) { - for (const applyToShadow of [false, true]) { - testElementType(safelisted.includes(elementName), elementName, applyToShadow); - } - } -} - -runAllTests(); -</script> diff --git a/tests/wpt/web-platform-tests/shadow-dom/declarative/support/helpers.js b/tests/wpt/web-platform-tests/shadow-dom/declarative/support/helpers.js new file mode 100644 index 00000000000..70808e8db7b --- /dev/null +++ b/tests/wpt/web-platform-tests/shadow-dom/declarative/support/helpers.js @@ -0,0 +1,4 @@ +function setInnerHTML(el,content) { + const fragment = (new DOMParser()).parseFromString(`<pre>${content}</pre>`, 'text/html', {includeShadowRoots: true}); + el.replaceChildren(...fragment.body.firstChild.childNodes); +} diff --git a/tests/wpt/web-platform-tests/signed-exchange/README.md b/tests/wpt/web-platform-tests/signed-exchange/README.md index 4032edf22f3..0987e90ad00 100644 --- a/tests/wpt/web-platform-tests/signed-exchange/README.md +++ b/tests/wpt/web-platform-tests/signed-exchange/README.md @@ -19,4 +19,5 @@ regenerate these files by running `generate-test-sxgs.sh` in the To install them, run: ``` go get -u github.com/WICG/webpackage/go/signedexchange/cmd/... +export PATH=$PATH:$(go env GOPATH)/bin ``` diff --git a/tests/wpt/web-platform-tests/signed-exchange/resources/generate-test-sxgs.sh b/tests/wpt/web-platform-tests/signed-exchange/resources/generate-test-sxgs.sh index e3988ce683d..9738f7cab19 100755 --- a/tests/wpt/web-platform-tests/signed-exchange/resources/generate-test-sxgs.sh +++ b/tests/wpt/web-platform-tests/signed-exchange/resources/generate-test-sxgs.sh @@ -19,6 +19,7 @@ for cmd in gen-signedexchange gen-certurl dump-signedexchange; do if ! command -v $cmd > /dev/null 2>&1; then echo "$cmd is not installed. Please run:" echo " go get -u github.com/WICG/webpackage/go/signedexchange/cmd/..." + echo ' export PATH=$PATH:$(go env GOPATH)/bin' exit 1 fi done diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py index 1519ed78f39..6e5ee115a55 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py @@ -41,11 +41,6 @@ class Response(object): Boolean, default False, indicating whether the body content should be sent when the request method is HEAD. - .. attribute:: explicit_flush - - Boolean indicating whether output should be flushed automatically or only - when requested. - .. attribute:: writer The ResponseWriter for this response @@ -73,7 +68,6 @@ class Response(object): self.add_required_headers = True self.send_body_for_head_request = False - self.explicit_flush = False self.close_connection = False self.logger = get_logger() @@ -665,11 +659,7 @@ class ResponseWriter(object): """Object providing an API to write out a HTTP response. :param handler: The RequestHandler being used. - :param response: The Response associated with this writer. - - After each part of the response is written, the output is - flushed unless response.explicit_flush is False, in which case - the user must call .flush() explicitly.""" + :param response: The Response associated with this writer.""" def __init__(self, handler, response): self._wfile = handler.wfile self._response = response @@ -707,52 +697,65 @@ class ResponseWriter(object): :param name: Name of the header field :param value: Value of the header field + :return: A boolean indicating whether the write succeeds """ if not self._status_written: self.write_status(self.default_status) self._headers_seen.add(self.encode(name.lower())) - self.write(name) - self.write(b": ") + if not self.write(name): + return False + if not self.write(b": "): + return False if isinstance(value, int): - self.write(text_type(value)) - else: - self.write(value) - self.write(b"\r\n") - if not self._response.explicit_flush: - self.flush() + if not self.write(text_type(value)): + return False + elif not self.write(value): + return False + return self.write(b"\r\n") def write_default_headers(self): for name, f in [("Server", self._handler.version_string), ("Date", self._handler.date_time_string)]: if not self._seen_header(name): - self.write_header(name, f()) + if not self.write_header(name, f()): + return False if (isinstance(self._response.content, (binary_type, text_type)) and not self._seen_header("content-length")): #Would be nice to avoid double-encoding here - self.write_header("Content-Length", len(self.encode(self._response.content))) + if not self.write_header("Content-Length", len(self.encode(self._response.content))): + return False + + return True def end_headers(self): """Finish writing headers and write the separator. Unless add_required_headers on the response is False, this will also add HTTP-mandated headers that have not yet been supplied - to the response headers""" + to the response headers. + :return: A boolean indicating whether the write succeeds + """ if self._response.add_required_headers: - self.write_default_headers() + if not self.write_default_headers(): + return False - self.write("\r\n") + if not self.write("\r\n"): + return False if not self._seen_header("content-length"): self._response.close_connection = True - if not self._response.explicit_flush: - self.flush() self._headers_complete = True + return True + def write_content(self, data): """Write the body of the response. - HTTP-mandated headers will be automatically added with status default to 200 if they have not been explicitly set.""" + HTTP-mandated headers will be automatically added with status default to 200 if they have + not been explicitly set. + :return: A boolean indicating whether the write succeeds + """ if not self._status_written: self.write_status(self.default_status) if not self._headers_complete: @@ -772,7 +775,9 @@ class ResponseWriter(object): def write(self, data): """Write directly to the response, converting unicode to bytes - according to response.encoding. Does not flush.""" + according to response.encoding. + :return: A boolean indicating whether the write succeeds + """ self.content_written = True try: self._wfile.write(self.encode(data)) @@ -782,8 +787,7 @@ class ResponseWriter(object): return False def write_content_file(self, data): - """Write a file-like object directly to the response in chunks. - Does not flush.""" + """Write a file-like object directly to the response in chunks.""" self.content_written = True success = True while True: @@ -807,13 +811,3 @@ class ResponseWriter(object): return data.encode(self._response.encoding) else: raise ValueError("data %r should be text or binary, but is %s" % (data, type(data))) - - def flush(self): - """Flush the output. Returns False if the flush failed due to - the socket being closed by the remote end.""" - try: - self._wfile.flush() - return True - except socket.error: - # This can happen if the socket got closed by the remote end - return False diff --git a/tests/wpt/web-platform-tests/web-bundle/README.md b/tests/wpt/web-platform-tests/web-bundle/README.md index 03b42ab340a..90c13069bac 100644 --- a/tests/wpt/web-platform-tests/web-bundle/README.md +++ b/tests/wpt/web-platform-tests/web-bundle/README.md @@ -6,4 +6,5 @@ This directory contains tests for the To install them, run: ``` go get -u github.com/WICG/webpackage/go/bundle/cmd/... +export PATH=$PATH:$(go env GOPATH)/bin ``` diff --git a/tests/wpt/web-platform-tests/web-bundle/resources/generate-test-wbns.sh b/tests/wpt/web-platform-tests/web-bundle/resources/generate-test-wbns.sh index 64a54bca3a4..7100e6a7772 100755 --- a/tests/wpt/web-platform-tests/web-bundle/resources/generate-test-wbns.sh +++ b/tests/wpt/web-platform-tests/web-bundle/resources/generate-test-wbns.sh @@ -5,6 +5,7 @@ set -e if ! command -v gen-bundle > /dev/null 2>&1; then echo "gen-bundle is not installed. Please run:" echo " go get -u github.com/WICG/webpackage/go/bundle/cmd/..." + echo ' export PATH=$PATH:$(go env GOPATH)/bin' exit 1 fi diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnectionIceErrorEvent.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnectionIceErrorEvent.html new file mode 100644 index 00000000000..4434cfd28b7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnectionIceErrorEvent.html @@ -0,0 +1,26 @@ +<!doctype html> +<meta charset="utf-8"> +<html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + +test(() => { + init = { + address: "168.3.4.5", + port: 4711, + url: "turn:turn.example.org", + errorCode: 703, + errorText: "Test error" + }; + event = new RTCPeerConnectionIceErrorEvent('type', init); + assert_equals(event.type, 'type'); + assert_equals(event.address, '168.3.4.5'); + assert_equals(event.port, 4711); + assert_equals(event.url, "turn:turn.example.org"); + assert_equals(event.errorCode, 703); + assert_equals(event.errorText, "Test error"); +}, 'RTCPeerConnectionIceErrorEvent constructed from init parameters'); + +</script> +</html> diff --git a/tests/wpt/web-platform-tests/websockets/unload-a-document/001-1.html b/tests/wpt/web-platform-tests/websockets/unload-a-document/001-1.html index 75d689e0b3d..c6ef23018b1 100644 --- a/tests/wpt/web-platform-tests/websockets/unload-a-document/001-1.html +++ b/tests/wpt/web-platform-tests/websockets/unload-a-document/001-1.html @@ -1,8 +1,6 @@ <!doctype html> <title>WebSockets: navigating top-level browsing context</title> <script src=../constants.js?pipe=sub></script> -<meta name="variant" content=""> -<meta name="variant" content="?wss"> <script> var controller = opener || parent; var t = controller.t; diff --git a/tests/wpt/web-platform-tests/websockets/unload-a-document/001.html b/tests/wpt/web-platform-tests/websockets/unload-a-document/001.html index 56e883c6492..52427b5d8d8 100644 --- a/tests/wpt/web-platform-tests/websockets/unload-a-document/001.html +++ b/tests/wpt/web-platform-tests/websockets/unload-a-document/001.html @@ -14,7 +14,7 @@ var w; var uuid; t.step(function() { uuid = token() - w = window.open("001-1.html"); + w = window.open("001-1.html" + location.search); add_result_callback(function() { w.close(); }); diff --git a/tests/wpt/web-platform-tests/websockets/unload-a-document/002-1.html b/tests/wpt/web-platform-tests/websockets/unload-a-document/002-1.html index 546de89dfee..04623ffc473 100644 --- a/tests/wpt/web-platform-tests/websockets/unload-a-document/002-1.html +++ b/tests/wpt/web-platform-tests/websockets/unload-a-document/002-1.html @@ -1,8 +1,6 @@ <!doctype html> <title>WebSockets: navigating top-level browsing context with closed websocket</title> <script src=../constants.js?pipe=sub></script> -<meta name="variant" content=""> -<meta name="variant" content="?wss"> <script> var controller = opener || parent; var t = controller.t; diff --git a/tests/wpt/web-platform-tests/websockets/unload-a-document/002.html b/tests/wpt/web-platform-tests/websockets/unload-a-document/002.html index 94028e70386..748da64ec7b 100644 --- a/tests/wpt/web-platform-tests/websockets/unload-a-document/002.html +++ b/tests/wpt/web-platform-tests/websockets/unload-a-document/002.html @@ -15,7 +15,7 @@ var w; var uuid; t.step(function() { uuid = token() - w = window.open("002-1.html"); + w = window.open("002-1.html" + location.search); add_result_callback(function() { w.close(); }); diff --git a/tests/wpt/web-platform-tests/websockets/unload-a-document/005-1.html b/tests/wpt/web-platform-tests/websockets/unload-a-document/005-1.html index fd70fc5bdde..1dbcef22bb3 100644 --- a/tests/wpt/web-platform-tests/websockets/unload-a-document/005-1.html +++ b/tests/wpt/web-platform-tests/websockets/unload-a-document/005-1.html @@ -1,8 +1,6 @@ <!doctype html> <title>WebSockets: navigating nested browsing context with a websocket in top-level</title> <script src=../constants.js?pipe=sub></script> -<meta name="variant" content=""> -<meta name="variant" content="?wss"> <script> var t = opener.t; var assert_unreached = opener.assert_unreached; diff --git a/tests/wpt/web-platform-tests/websockets/unload-a-document/005.html b/tests/wpt/web-platform-tests/websockets/unload-a-document/005.html index 81a05f48ead..588fd76765a 100644 --- a/tests/wpt/web-platform-tests/websockets/unload-a-document/005.html +++ b/tests/wpt/web-platform-tests/websockets/unload-a-document/005.html @@ -12,7 +12,7 @@ <script> var t = async_test(); t.step(function() { - var w = window.open("005-1.html"); + var w = window.open("005-1.html" + location.search); add_result_callback(function() { w.close(); }); diff --git a/tests/wpt/web-platform-tests/xhr/resources/echo-method.py b/tests/wpt/web-platform-tests/xhr/resources/echo-method.py index 7899c184b76..564c3db11f0 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/echo-method.py +++ b/tests/wpt/web-platform-tests/xhr/resources/echo-method.py @@ -14,4 +14,3 @@ Content-type: text/plain Content-Length: {} {}'''.format(len(content), content)) - response.writer.flush() diff --git a/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py b/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py index 36ef17488ce..72c1a7f1d7a 100644 --- a/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py +++ b/tests/wpt/web-platform-tests/xhr/resources/inspect-headers.py @@ -8,13 +8,14 @@ def get_response(raw_headers, filter_value, filter_name): # Python 3. <http.client.HTTPMessage> doesn't have 'headers" attribute or equivalent # [https://bugs.python.org/issue4773]. # In Python 2, variable raw_headers.headers returns a completely uninterpreted list of lines - # contained in the header. In Python 3, raw_headers.as_string() returns entire formatted - # message as a string. Here is to construct an equivalent "headers" variable to support tests - # in Python 3. + # contained in the header. In Python 3, raw_headers.raw_items() returns the (name, value) + # header pairs without modification. Here is to construct an equivalent "headers" variable to + # support tests in Python 3. if PY3: - header_list = [ - isomorphic_encode(s + u'\r\n') for s in raw_headers.as_string().splitlines() if s - ] + header_list = [] + for field in raw_headers.raw_items(): + header = b"%s: %s\r\n" % (isomorphic_encode(field[0]), isomorphic_encode(field[1])) + header_list.append(header) else: header_list = raw_headers.headers for line in header_list: |