diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 34e0beec70c..16fccc8cc4b 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -168499,6 +168499,18 @@ {} ] ], + "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002.xhtml": [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002.xhtml", + [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002-ref.xhtml", + "==" + ] + ], + {} + ] + ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001a.xhtml": [ [ "/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001a.xhtml", @@ -168523,6 +168535,18 @@ {} ] ], + "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002.xhtml": [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002.xhtml", + [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002-ref.xhtml", + "==" + ] + ], + {} + ] + ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-wmvert-001.xhtml": [ [ "/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-wmvert-001.xhtml", @@ -195411,6 +195435,21 @@ {} ] ], + "async-local-storage/helpers/als-tests.js": [ + [ + {} + ] + ], + "async-local-storage/helpers/class-assert.js": [ + [ + {} + ] + ], + "async-local-storage/helpers/equality-asserters.js": [ + [ + {} + ] + ], "audio-output/META.yml": [ [ {} @@ -271351,11 +271390,21 @@ {} ] ], + "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002-ref.xhtml": [ + [ + {} + ] + ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001-ref.xhtml": [ [ {} ] ], + "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002-ref.xhtml": [ + [ + {} + ] + ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-wmvert-001-ref.xhtml": [ [ {} @@ -274591,6 +274640,11 @@ {} ] ], + "docs/_appendix/reverting.md": [ + [ + {} + ] + ], "docs/_appendix/test-templates.md": [ [ {} @@ -288831,6 +288885,11 @@ {} ] ], + "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/global-variables-frame.html": [ + [ + {} + ] + ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/set-document-domain.html": [ [ {} @@ -291646,6 +291705,66 @@ {} ] ], + "network-error-logging/META.yml": [ + [ + {} + ] + ], + "network-error-logging/README.md": [ + [ + {} + ] + ], + "network-error-logging/support/clear-policy-pass.png": [ + [ + {} + ] + ], + "network-error-logging/support/clear-policy-pass.png.sub.headers": [ + [ + {} + ] + ], + "network-error-logging/support/lock.py": [ + [ + {} + ] + ], + "network-error-logging/support/nel.sub.js": [ + [ + {} + ] + ], + "network-error-logging/support/no-policy-pass.png": [ + [ + {} + ] + ], + "network-error-logging/support/pass.png": [ + [ + {} + ] + ], + "network-error-logging/support/pass.png.sub.headers": [ + [ + {} + ] + ], + "network-error-logging/support/report.py": [ + [ + {} + ] + ], + "network-error-logging/support/subdomains-pass.png": [ + [ + {} + ] + ], + "network-error-logging/support/subdomains-pass.png.sub.headers": [ + [ + {} + ] + ], "notifications/META.yml": [ [ {} @@ -297906,6 +298025,11 @@ {} ] ], + "service-workers/cache-storage/resources/vary.py": [ + [ + {} + ] + ], "service-workers/cache-storage/script-tests/cache-abort.js": [ [ {} @@ -309401,6 +309525,16 @@ {} ] ], + "webdriver/tests/get_window_handle/__init__.py": [ + [ + {} + ] + ], + "webdriver/tests/get_window_handles/__init__.py": [ + [ + {} + ] + ], "webdriver/tests/get_window_rect/__init__.py": [ [ {} @@ -321812,9 +321946,39 @@ {} ] ], - "async-local-storage/storage-smoke-test.https.tentative.html": [ + "async-local-storage/api-surface.tentative.https.html": [ [ - "/async-local-storage/storage-smoke-test.https.tentative.html", + "/async-local-storage/api-surface.tentative.https.html", + {} + ] + ], + "async-local-storage/key-types.tentative.https.html": [ + [ + "/async-local-storage/key-types.tentative.https.html", + {} + ] + ], + "async-local-storage/non-secure-context-dynamic-import.tentative.html": [ + [ + "/async-local-storage/non-secure-context-dynamic-import.tentative.html", + {} + ] + ], + "async-local-storage/non-secure-context-import-statement.tentative.html": [ + [ + "/async-local-storage/non-secure-context-import-statement.tentative.html", + {} + ] + ], + "async-local-storage/non-secure-context-script-element.tentative.html": [ + [ + "/async-local-storage/non-secure-context-script-element.tentative.html", + {} + ] + ], + "async-local-storage/storage-smoke-test.tentative.https.html": [ + [ + "/async-local-storage/storage-smoke-test.tentative.https.html", {} ] ], @@ -326248,33 +326412,51 @@ {} ] ], - "cookies/prefix/__host.document-cookie.non-secure.html": [ + "cookies/prefix/__host.document-cookie.html": [ [ - "/cookies/prefix/__host.document-cookie.non-secure.html", + "/cookies/prefix/__host.document-cookie.html", {} ] ], - "cookies/prefix/__host.http.non-secure.html": [ + "cookies/prefix/__host.document-cookie.https.html": [ [ - "/cookies/prefix/__host.http.non-secure.html", + "/cookies/prefix/__host.document-cookie.https.html", {} ] ], - "cookies/prefix/__secure.document-cookie.non-secure.html": [ + "cookies/prefix/__host.header.html": [ [ - "/cookies/prefix/__secure.document-cookie.non-secure.html", + "/cookies/prefix/__host.header.html", {} ] ], - "cookies/prefix/__secure.http.non-secure.html": [ + "cookies/prefix/__host.header.https.html": [ [ - "/cookies/prefix/__secure.http.non-secure.html", + "/cookies/prefix/__host.header.https.html", {} ] ], - "cookies/prefix/__secure.http.secure.html": [ + "cookies/prefix/__secure.document-cookie.html": [ [ - "/cookies/prefix/__secure.http.secure.html", + "/cookies/prefix/__secure.document-cookie.html", + {} + ] + ], + "cookies/prefix/__secure.document-cookie.https.html": [ + [ + "/cookies/prefix/__secure.document-cookie.https.html", + {} + ] + ], + "cookies/prefix/__secure.header.html": [ + [ + "/cookies/prefix/__secure.header.html", + {} + ] + ], + "cookies/prefix/__secure.header.https.html": [ + [ + "/cookies/prefix/__secure.header.https.html", {} ] ], @@ -326344,12 +326526,6 @@ {} ] ], - "cookies/secure/cookie-forcing.html": [ - [ - "/cookies/secure/cookie-forcing.html", - {} - ] - ], "cookies/secure/create-cookie-http.html": [ [ "/cookies/secure/create-cookie-http.html", @@ -330850,6 +331026,12 @@ {} ] ], + "css/css-scrollbars/scrollbar-width-keywords.html": [ + [ + "/css/css-scrollbars/scrollbar-width-keywords.html", + {} + ] + ], "css/css-shadow-parts/all-hosts.html": [ [ "/css/css-shadow-parts/all-hosts.html", @@ -363464,12 +363646,6 @@ {} ] ], - "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/001.html": [ - [ - "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/001.html", - {} - ] - ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/002.html": [ [ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/002.html", @@ -363494,18 +363670,6 @@ {} ] ], - "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/008.html": [ - [ - "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/008.html", - {} - ] - ], - "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/009.https.html": [ - [ - "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/009.https.html", - {} - ] - ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010.html": [ [ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010.html", @@ -363578,6 +363742,12 @@ {} ] ], + "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/beforeunload.window.js": [ + [ + "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/beforeunload.window.html", + {} + ] + ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/custom-element.window.js": [ [ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/custom-element.window.html", @@ -363626,6 +363796,12 @@ {} ] ], + "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.js": [ + [ + "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.html", + {} + ] + ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-basic.html": [ [ "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-basic.html", @@ -363650,6 +363826,12 @@ {} ] ], + "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.js": [ + [ + "/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.html", + {} + ] + ], "html/webappapis/microtask-queuing/queue-microtask-exceptions.any.js": [ [ "/html/webappapis/microtask-queuing/queue-microtask-exceptions.any.html", @@ -367510,6 +367692,54 @@ {} ] ], + "network-error-logging/no-report-on-failed-cors-preflight.https.html": [ + [ + "/network-error-logging/no-report-on-failed-cors-preflight.https.html", + {} + ] + ], + "network-error-logging/no-report-on-subdomain-404.https.html": [ + [ + "/network-error-logging/no-report-on-subdomain-404.https.html", + {} + ] + ], + "network-error-logging/no-report-on-subdomain-success.https.html": [ + [ + "/network-error-logging/no-report-on-subdomain-success.https.html", + {} + ] + ], + "network-error-logging/reports-are-not-observable.https.html": [ + [ + "/network-error-logging/reports-are-not-observable.https.html", + {} + ] + ], + "network-error-logging/sends-report-on-404.https.html": [ + [ + "/network-error-logging/sends-report-on-404.https.html", + {} + ] + ], + "network-error-logging/sends-report-on-subdomain-dns-failure.https.html": [ + [ + "/network-error-logging/sends-report-on-subdomain-dns-failure.https.html", + {} + ] + ], + "network-error-logging/sends-report-on-success-with-subdomain-policy.https.html": [ + [ + "/network-error-logging/sends-report-on-success-with-subdomain-policy.https.html", + {} + ] + ], + "network-error-logging/sends-report-on-success.https.html": [ + [ + "/network-error-logging/sends-report-on-success.https.html", + {} + ] + ], "notifications/constructor-basic.html": [ [ "/notifications/constructor-basic.html", @@ -391734,15 +391964,27 @@ {} ] ], - "trusted-types/DOMParser-requiresTrustedTypes.tentative.html": [ + "trusted-types/DOMParser-parseFromString.tentative.html": [ [ - "/trusted-types/DOMParser-requiresTrustedTypes.tentative.html", + "/trusted-types/DOMParser-parseFromString.tentative.html", {} ] ], - "trusted-types/DOMParser.tentative.html": [ + "trusted-types/Document-write.tentative.html": [ [ - "/trusted-types/DOMParser.tentative.html", + "/trusted-types/Document-write.tentative.html", + {} + ] + ], + "trusted-types/Element-insertAdjacentHTML.tentative.html": [ + [ + "/trusted-types/Element-insertAdjacentHTML.tentative.html", + {} + ] + ], + "trusted-types/Element-outerHTML.tentative.html": [ + [ + "/trusted-types/Element-outerHTML.tentative.html", {} ] ], @@ -391752,15 +391994,27 @@ {} ] ], - "trusted-types/TrustedHTML.tentative.html": [ + "trusted-types/Location-assign.tentative.html": [ [ - "/trusted-types/TrustedHTML.tentative.html", + "/trusted-types/Location-assign.tentative.html", {} ] ], - "trusted-types/TrustedScriptURL.tentative.html": [ + "trusted-types/Location-href.tentative.html": [ [ - "/trusted-types/TrustedScriptURL.tentative.html", + "/trusted-types/Location-href.tentative.html", + {} + ] + ], + "trusted-types/Location-replace.tentative.html": [ + [ + "/trusted-types/Location-replace.tentative.html", + {} + ] + ], + "trusted-types/Range-createContextualFragment.tentative.html": [ + [ + "/trusted-types/Range-createContextualFragment.tentative.html", {} ] ], @@ -391770,9 +392024,9 @@ {} ] ], - "trusted-types/TrustedURL.tentative.html": [ + "trusted-types/Window-open.tentative.html": [ [ - "/trusted-types/TrustedURL.tentative.html", + "/trusted-types/Window-open.tentative.html", {} ] ], @@ -391782,123 +392036,63 @@ {} ] ], + "trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html": [ + [ + "/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html", + {} + ] + ], + "trusted-types/block-string-assignment-to-Document-write.tentative.html": [ + [ + "/trusted-types/block-string-assignment-to-Document-write.tentative.html", + {} + ] + ], + "trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html": [ + [ + "/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html", + {} + ] + ], + "trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html": [ + [ + "/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html", + {} + ] + ], "trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [ [ "/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html", {} ] ], - "trusted-types/block-string-assignment-to-createContextualFragment.tentative.html": [ + "trusted-types/block-string-assignment-to-Location-assign.tentative.html": [ [ - "/trusted-types/block-string-assignment-to-createContextualFragment.tentative.html", + "/trusted-types/block-string-assignment-to-Location-assign.tentative.html", {} ] ], - "trusted-types/block-string-assignment-to-innerHTML.tentative.html": [ + "trusted-types/block-string-assignment-to-Location-href.tentative.html": [ [ - "/trusted-types/block-string-assignment-to-innerHTML.tentative.html", + "/trusted-types/block-string-assignment-to-Location-href.tentative.html", {} ] ], - "trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html": [ + "trusted-types/block-string-assignment-to-Location-replace.tentative.html": [ [ - "/trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html", + "/trusted-types/block-string-assignment-to-Location-replace.tentative.html", {} ] ], - "trusted-types/block-string-assignment-to-location-assign.tentative.html": [ + "trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html": [ [ - "/trusted-types/block-string-assignment-to-location-assign.tentative.html", + "/trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html", {} ] ], - "trusted-types/block-string-assignment-to-location-href.tentative.html": [ + "trusted-types/block-string-assignment-to-Window-open.tentative.html": [ [ - "/trusted-types/block-string-assignment-to-location-href.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-location-replace.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-location-replace.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-outerHTML.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-outerHTML.tentative.html", - {} - ] - ], - "trusted-types/block-string-assignment-to-window-open.tentative.html": [ - [ - "/trusted-types/block-string-assignment-to-window-open.tentative.html", - {} - ] - ], - "trusted-types/createContextualFragment.tentative.html": [ - [ - "/trusted-types/createContextualFragment.tentative.html", - {} - ] - ], - "trusted-types/document-write.tentative.html": [ - [ - "/trusted-types/document-write.tentative.html", - {} - ] - ], - "trusted-types/innerHTML.tentative.html": [ - [ - "/trusted-types/innerHTML.tentative.html", - {} - ] - ], - "trusted-types/insertAdjacentHTML.tentative.html": [ - [ - "/trusted-types/insertAdjacentHTML.tentative.html", - {} - ] - ], - "trusted-types/location-assign.tentative.html": [ - [ - "/trusted-types/location-assign.tentative.html", - {} - ] - ], - "trusted-types/location-href.tentative.html": [ - [ - "/trusted-types/location-href.tentative.html", - {} - ] - ], - "trusted-types/location-replace.tentative.html": [ - [ - "/trusted-types/location-replace.tentative.html", - {} - ] - ], - "trusted-types/outerHTML.tentative.html": [ - [ - "/trusted-types/outerHTML.tentative.html", - {} - ] - ], - "trusted-types/srcDoc-requiresTrustedTypes.tentative.html": [ - [ - "/trusted-types/srcDoc-requiresTrustedTypes.tentative.html", - {} - ] - ], - "trusted-types/srcDoc.tentative.html": [ - [ - "/trusted-types/srcDoc.tentative.html", - {} - ] - ], - "trusted-types/window-open.tentative.html": [ - [ - "/trusted-types/window-open.tentative.html", + "/trusted-types/block-string-assignment-to-Window-open.tentative.html", {} ] ], @@ -421476,6 +421670,34 @@ } ] ], + "webdriver/tests/get_window_handle/get.py": [ + [ + "/webdriver/tests/get_window_handle/get.py", + {} + ] + ], + "webdriver/tests/get_window_handle/user_prompts.py": [ + [ + "/webdriver/tests/get_window_handle/user_prompts.py", + { + "timeout": "long" + } + ] + ], + "webdriver/tests/get_window_handles/get.py": [ + [ + "/webdriver/tests/get_window_handles/get.py", + {} + ] + ], + "webdriver/tests/get_window_handles/user_prompts.py": [ + [ + "/webdriver/tests/get_window_handles/user_prompts.py", + { + "timeout": "long" + } + ] + ], "webdriver/tests/get_window_rect/get.py": [ [ "/webdriver/tests/get_window_rect/get.py", @@ -431299,8 +431521,40 @@ "1bbe9e5ac609aa33914ad79d4af7cb2fdf45b9c7", "support" ], - "async-local-storage/storage-smoke-test.https.tentative.html": [ - "b4d66dabc7a177742666377718b30f84a10de744", + "async-local-storage/api-surface.tentative.https.html": [ + "eea51abd539787f531cbf32e28737c135c63c8d7", + "testharness" + ], + "async-local-storage/helpers/als-tests.js": [ + "fd6d6844f72e39d16e070ec461b99ab62a0b4547", + "support" + ], + "async-local-storage/helpers/class-assert.js": [ + "31b25cab9f2d88d8df59a0b4ecb35eef3765e380", + "support" + ], + "async-local-storage/helpers/equality-asserters.js": [ + "ad4623c179d75c8d4ce8b1fa8503f943bf6a7c77", + "support" + ], + "async-local-storage/key-types.tentative.https.html": [ + "771ee2f9749a00ec4e33019512a9bf8d145a3ce6", + "testharness" + ], + "async-local-storage/non-secure-context-dynamic-import.tentative.html": [ + "9270f6c82fa2018d1d6c3a199cbe5f6ca2403b56", + "testharness" + ], + "async-local-storage/non-secure-context-import-statement.tentative.html": [ + "879729696dbb6a767530d77fbd94af0b42afe6b4", + "testharness" + ], + "async-local-storage/non-secure-context-script-element.tentative.html": [ + "feeddafc8daa02556eb0c5fe068dbde1d45642da", + "testharness" + ], + "async-local-storage/storage-smoke-test.tentative.https.html": [ + "f978480ff2b80ba5f892c2a2c429e882d655574d", "testharness" ], "audio-output/META.yml": [ @@ -431332,7 +431586,7 @@ "testharness" ], "background-fetch/fetch.https.window.js": [ - "843506947f7176761f0d47b9a7fa83ab187322b1", + "33c8124ffa4569c905e9243703cb245ef3f81ca3", "testharness" ], "background-fetch/get-ids.https.window.js": [ @@ -453547,32 +453801,44 @@ "14921d1d62c0d80349cf1149e55e3af0b51f77d5", "testharness" ], - "cookies/prefix/__host.document-cookie.non-secure.html": [ + "cookies/prefix/__host.document-cookie.html": [ "e1a272a23409b91bd80bdfe99f2f07129b4c6a0f", "testharness" ], - "cookies/prefix/__host.http.non-secure.html": [ - "3ce5873543887e7f241468a356a4ae75cf168ef3", + "cookies/prefix/__host.document-cookie.https.html": [ + "05ecdff358fd0d457f30d406be0956ebd4d128bd", "testharness" ], - "cookies/prefix/__secure.document-cookie.non-secure.html": [ - "bf898f4cebc0559994e88fd4d7aa52cdd86bc6c0", + "cookies/prefix/__host.header.html": [ + "5a522cbaa018aa607628070ab79278dd855735bd", "testharness" ], - "cookies/prefix/__secure.http.non-secure.html": [ - "af844a9587fdeb8169d854ca2568854eb219fe7c", + "cookies/prefix/__host.header.https.html": [ + "53d0dba65989164f5fcb77becd021f264822ebf7", "testharness" ], - "cookies/prefix/__secure.http.secure.html": [ - "4b413e9ce3ab5accf7b51844a8d963b810d751dd", + "cookies/prefix/__secure.document-cookie.html": [ + "a1b335b9816ff226f4568a74e5848452b9a49c6e", + "testharness" + ], + "cookies/prefix/__secure.document-cookie.https.html": [ + "89b146043807fd370dc7c4a57e658c77351e79d8", + "testharness" + ], + "cookies/prefix/__secure.header.html": [ + "431e0e1ec98923feae1f1f6948c7728e5e80b007", + "testharness" + ], + "cookies/prefix/__secure.header.https.html": [ + "d912babc239acfecef7afb6f7deac9fbfeaf50bd", "testharness" ], "cookies/prefix/document-cookie.non-secure.html": [ - "bc6832b15ea88463d0b0fdb5cea4b1987e6a6c0d", + "1b5edf76a298a18e40b3b4c3cb256b29b65f1a9a", "testharness" ], "cookies/resources/cookie-helper.sub.js": [ - "428cab042e4fd0ac3f67180587f4f42e42643049", + "49cf0b1fdbf46dc0b045d35abf32e16dcb40d184", "support" ], "cookies/resources/drop.py": [ @@ -453675,10 +453941,6 @@ "1aa8e5e80bbf4319bb3903b228416a994723b4db", "testharness" ], - "cookies/secure/cookie-forcing.html": [ - "3ea59e1369d0cf9885ed1c3f9e6548f1734a5463", - "testharness" - ], "cookies/secure/create-cookie-http.html": [ "425f66fde5cbdc231c0c96b2e2b1d4fb3f9571ba", "testharness" @@ -535612,7 +535874,7 @@ "testharness" ], "css/css-logical/resources/test-box-properties.js": [ - "9d73b5b8fc50149e52b76ae338db4f743d9976f5", + "1f17ff296ff2c3dcf81db1a112bda24ef04eb126", "support" ], "css/css-logical/resources/test-logical-values.js": [ @@ -538804,7 +539066,7 @@ "support" ], "css/css-properties-values-api/typedom.tentative.html": [ - "065280614cca9fa52b79c28e253c30ada188a1b9", + "69ebf7a13d8cf3d71413259db68336368e5032e7", "testharness" ], "css/css-properties-values-api/unit-cycles.html": [ @@ -541471,6 +541733,10 @@ "9209d5d1f4174d1e22258c0571db89b51f4f3a59", "support" ], + "css/css-scrollbars/scrollbar-width-keywords.html": [ + "94ccd6ef6d550c83c97ba9525135cc309cc35842", + "testharness" + ], "css/css-scrollbars/support/viewport-scrollbar-body-frame.html": [ "74c02f994e3103daabfaf40a7fb84d3169451d2c", "support" @@ -571608,27 +571874,43 @@ "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001-ref.xhtml": [ - "33057bf5f0f8e0182850a0ad272cdddaac66a6a3", + "517b7f465ddc9059053b84219b57247afc22b4b7", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001a.xhtml": [ - "bb0a8cda64b19b85c612a0609d35c400eefaa840", + "bb592b74a8b761230b1a4c56398d961c4619b066", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001b.xhtml": [ - "a1e192102ea9cbbdc5685085d47dfdd8b81d5023", + "3de740e9a3f8e59955d66de1771369eaf73b988c", + "reftest" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002-ref.xhtml": [ + "f0d286494e428fcc6afbe642da0ea6fd0ae1ccc8", + "support" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002.xhtml": [ + "902b26ba23e44659f5a111617439889c09875e32", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001-ref.xhtml": [ - "1bac2bcda1dfc8f919211c26841f55883c249180", + "f09e2a448da8a5466bffd31d505cd90cbc34fcc2", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001a.xhtml": [ - "c4236ef0406c48c5aec75d17d207cfb069591793", + "56bdd5fe4020ea641aa0c778fc49b500e4de2b6d", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001b.xhtml": [ - "54a8ed31f9637eb9781a5a1fafacec498f402cf9", + "002f20fb3335c7e0cb890dd267f36adeabab4f1b", + "reftest" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002-ref.xhtml": [ + "b514d840489dcc027be492ffd5081fe0a124b8e4", + "support" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002.xhtml": [ + "b4a8ccf3dd1f5890e5fad1cee0a49ba96f12d49f", "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-wmvert-001-ref.xhtml": [ @@ -573052,7 +573334,7 @@ "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/reftest.list": [ - "b51226706eae57ce44afdbbc24d5fb74e4225d34", + "ee725d99ed9c669b6010132c9ca91e3f78899886", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/support/Ahem.ttf": [ @@ -578811,6 +579093,10 @@ "12cfdfa13ade604dec791174ffcd2e3732c7a185", "support" ], + "docs/_appendix/reverting.md": [ + "1f549b3a341f2a78a16be835ae43e2d8da5b7137", + "support" + ], "docs/_appendix/test-templates.md": [ "39b599569876967d6de158c6497ecff59dd7bbef", "support" @@ -603899,10 +604185,6 @@ "0cc32be6a2368591de06759c92223941f380f9c2", "support" ], - "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/001.html": [ - "f82d80be7b6b50608699b73a6f8d1b592e0a55c6", - "testharness" - ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/002.html": [ "5584bf9afbff034f5ea68d769afa648e31fe1aaf", "testharness" @@ -603919,14 +604201,6 @@ "1dcb92615d085b28d3c9d2a22d744be849158d18", "testharness" ], - "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/008.html": [ - "36c0a3f3ea11b9f96522cbba22f1006ba42900bb", - "testharness" - ], - "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/009.https.html": [ - "0d104c9569b37355c24d60fdcad0ca9ed792dcd0", - "testharness" - ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/010-1.html": [ "317e13691d4a94e5861bbb85d7367591d7d1c624", "support" @@ -603972,11 +604246,11 @@ "testharness" ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/015-1.html": [ - "dffbac0c04116c67492bca5fee606e2c958afbae", + "c325bd08015fc66b0fe7a95a13da6fe461a9afa7", "support" ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/015.html": [ - "5ef06176ba0a1f253da0afe28fc0ea68e745ec30", + "cce9e65d4c30a13e11c334b89ff225cac45fbd39", "testharness" ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/016-1.html": [ @@ -604007,6 +604281,10 @@ "b3ea1fdf75455616c0e47772b0403bf434f76d36", "testharness" ], + "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/beforeunload.window.js": [ + "1e2f891c1766bb1bcf37855476d952b09e4faab2", + "testharness" + ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/custom-element.window.js": [ "be646d15b803d3fbe583a38d4524ad36e1a9b5d1", "testharness" @@ -604020,11 +604298,11 @@ "testharness" ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/document.open-03-frame.html": [ - "b5252dceab6b63bed93f4c0f6fd23d61097fe7a4", + "a4b370cea41fb2d379b0350639aaeec4f169191d", "support" ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/document.open-03.html": [ - "fc325d54db239d729a4b762367576494c9e93490", + "e446d7021992cfcac2752f5a63e5821f3d51b022", "testharness" ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/encoding.window.js": [ @@ -604043,6 +604321,10 @@ "4efbb863c6372a3ee04d11f38d7ee56a44a2ac7d", "testharness" ], + "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.js": [ + "d4a9296fca66d3017c267a8d8951bef2dcbee238", + "testharness" + ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/origin-check-in-document-open-basic.html": [ "118be71af19c88d5fed0a1efe010bbd6868eae9c", "testharness" @@ -604071,6 +604353,10 @@ "843c3a2c7988be0b9595bc69887fc75a5a7b304c", "support" ], + "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/global-variables-frame.html": [ + "0fe189914c3727f8071c4eaaa6cc740aeb7aab93", + "support" + ], "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/set-document-domain.html": [ "a92a7ae39f8351f97cd865dca5ebe8d4260aa229", "support" @@ -604087,6 +604373,10 @@ "9174008da33b7faeba91169efe3ace6e1dc87704", "testharness" ], + "html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.js": [ + "e275a4987a0859b160a0f91de6c8896b90bdab31", + "testharness" + ], "html/webappapis/microtask-queuing/queue-microtask-exceptions.any.js": [ "01f32ac9ba14962fa99d4b263a8ca0f5a0daa161", "testharness" @@ -605612,7 +605902,7 @@ "support" ], "interfaces/web-nfc.idl": [ - "cdb0e75684842a4263e69d207f18de3e90a31eb1", + "2728840b95f606c9ebf6353ae8e8e98cc9efa04e", "support" ], "interfaces/web-share.idl": [ @@ -609115,6 +609405,86 @@ "7d08e12280a881508c862ebaaeaa40a099cf8e35", "testharness" ], + "network-error-logging/META.yml": [ + "bc063177d1d14febb1c4bdb86e70cfdce8ca0b5b", + "support" + ], + "network-error-logging/README.md": [ + "7cf2c6fdceed95b3911deb69542a6820acda479d", + "support" + ], + "network-error-logging/no-report-on-failed-cors-preflight.https.html": [ + "3a35651b4ef549a0510a83df923fd6b9d642b97c", + "testharness" + ], + "network-error-logging/no-report-on-subdomain-404.https.html": [ + "462f99e842317cf36c4d7a76ad13af00b1692d15", + "testharness" + ], + "network-error-logging/no-report-on-subdomain-success.https.html": [ + "5fd6d4fb41231c5ca5f345b890927c5d1b9411ab", + "testharness" + ], + "network-error-logging/reports-are-not-observable.https.html": [ + "35ab4f3c23507617c4f26981339741d9b3c385be", + "testharness" + ], + "network-error-logging/sends-report-on-404.https.html": [ + "38bdc014501e90f5a99bae1ac0d433191f557afb", + "testharness" + ], + "network-error-logging/sends-report-on-subdomain-dns-failure.https.html": [ + "8913857af8acb01760589b6a7546a110a359f192", + "testharness" + ], + "network-error-logging/sends-report-on-success-with-subdomain-policy.https.html": [ + "fce12cd3e96cf327222faea4bdaeba5835f4f4ce", + "testharness" + ], + "network-error-logging/sends-report-on-success.https.html": [ + "68fddaa0c70b8dd0fd22194b351ba1157f836bdc", + "testharness" + ], + "network-error-logging/support/clear-policy-pass.png": [ + "2fa1e0ac0663a65deae6602621521cc2844b93de", + "support" + ], + "network-error-logging/support/clear-policy-pass.png.sub.headers": [ + "1085b8a987c56fd8b0412f4032f6957e58447ace", + "support" + ], + "network-error-logging/support/lock.py": [ + "8c88250bde00b4a62cc99131fdaa09e97f716369", + "support" + ], + "network-error-logging/support/nel.sub.js": [ + "c6b4783bd94c00579047627b6c2b137478ae1c2e", + "support" + ], + "network-error-logging/support/no-policy-pass.png": [ + "2fa1e0ac0663a65deae6602621521cc2844b93de", + "support" + ], + "network-error-logging/support/pass.png": [ + "2fa1e0ac0663a65deae6602621521cc2844b93de", + "support" + ], + "network-error-logging/support/pass.png.sub.headers": [ + "70796e913ace97d4d1a21ac0b1c19f6fbb6d01fc", + "support" + ], + "network-error-logging/support/report.py": [ + "7c05b51b9eb011f4d32bd5e774f6a0d3ead2cd9c", + "support" + ], + "network-error-logging/support/subdomains-pass.png": [ + "2fa1e0ac0663a65deae6602621521cc2844b93de", + "support" + ], + "network-error-logging/support/subdomains-pass.png.sub.headers": [ + "50124b8cfcdfd6efe91a0613ec34d3c8ca0a10dc", + "support" + ], "notifications/META.yml": [ "2cb7972705c7b9ef00375dfa4258e92edb15fb21", "support" @@ -628203,12 +628573,16 @@ "050ac0b542455ceb53ed36038af5b9b0810977cf", "support" ], + "service-workers/cache-storage/resources/vary.py": [ + "59e39bc2ae730a4cd3e1376dd003c9ffada4ed4a", + "support" + ], "service-workers/cache-storage/script-tests/cache-abort.js": [ "ec4130fded29e0070828092c2546dc46456d8fdc", "support" ], "service-workers/cache-storage/script-tests/cache-add.js": [ - "c03faeb0e83723eab64e648e600ba0612873d404", + "a482c42eaeb2a902a36b1d6aecd306e8ed4b4ebf", "support" ], "service-workers/cache-storage/script-tests/cache-delete.js": [ @@ -641611,126 +641985,102 @@ "15b2db735fd0d7a01d9e9bd3a1f3719f790d62e5", "testharness" ], - "trusted-types/DOMParser-requiresTrustedTypes.tentative.html": [ - "7e21feabd24c653cbe0b713d01e20aeade534b6e", + "trusted-types/DOMParser-parseFromString.tentative.html": [ + "2fe9b31b787e1fb458a3ed8996b2d79f7e14aa35", "testharness" ], - "trusted-types/DOMParser.tentative.html": [ - "53d2b44febd6510b4216bb21cb22a83ed6663e5b", + "trusted-types/Document-write.tentative.html": [ + "3a63e923543b999b05d1fab926ad33d7d2719dfa", + "testharness" + ], + "trusted-types/Element-insertAdjacentHTML.tentative.html": [ + "599ade44ec117ecb429659a9f969a2767bd95cbb", + "testharness" + ], + "trusted-types/Element-outerHTML.tentative.html": [ + "a0bb6c1a5e3fef47e4351353befbfc8eb105652f", "testharness" ], "trusted-types/HTMLElement-generic.tentative.html": [ - "486b008986bc4e3328c8b709674359538d408800", + "cea32a5a2df1d9b255f5aaf85ac5a694fdb3a618", + "testharness" + ], + "trusted-types/Location-assign.tentative.html": [ + "13cca5679488d0b3e12631d5f70408565ea1b065", + "testharness" + ], + "trusted-types/Location-href.tentative.html": [ + "d759d28593e67f25d8bc28d36cf0ff4912460dc0", + "testharness" + ], + "trusted-types/Location-replace.tentative.html": [ + "7d84905d19878d57634a8497b81ef86d8114b72e", "testharness" ], "trusted-types/META.yml": [ "d0743949b6a122d8bd0adf7b1ed0181f0c51429d", "support" ], - "trusted-types/TrustedHTML.tentative.html": [ - "a8d4e78b06d124b05aa640aad563b3d9e9003046", - "testharness" - ], - "trusted-types/TrustedScriptURL.tentative.html": [ - "92bc87f1e1da3eec8a0d597687e04857ad079359", + "trusted-types/Range-createContextualFragment.tentative.html": [ + "3d45b33486d3971c0c58180fa4034dbfae18f135", "testharness" ], "trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html": [ - "863fe847141f9705bb5bc02fcb8f0b6f923c4aa8", + "76e6d130b05dfba00911ad42eb7a162cd29b222e", "testharness" ], - "trusted-types/TrustedURL.tentative.html": [ - "5048326fad81af68915b9f83b56da375388fcbef", + "trusted-types/Window-open.tentative.html": [ + "c005fbba143f66a9540deebba7988fdea9661558", "testharness" ], "trusted-types/Window-trustedTypes.tentative.html": [ "ef4487749dd0c12a00bd3ab42c1353467a6eeb8f", "testharness" ], + "trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html": [ + "cc575dc0085bce3aa1370fb528e28003ad3c1c2b", + "testharness" + ], + "trusted-types/block-string-assignment-to-Document-write.tentative.html": [ + "28813d72e0e1833e25658e2210abb9b0a30b2137", + "testharness" + ], + "trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html": [ + "ad94b44e8fb7621ba4693ad65377872281f3e9a6", + "testharness" + ], + "trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html": [ + "47f1165b1a69366848dd5dd21a2ad2199b9c2e81", + "testharness" + ], "trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [ - "79bbb24f541b43123ef1d5f814fb3108275b974c", + "eae52626190746ad0a8b436f74981009e400232b", "testharness" ], - "trusted-types/block-string-assignment-to-createContextualFragment.tentative.html": [ - "1d67a51ff6ab1df879a59af5ee7c6ad9a0609be0", + "trusted-types/block-string-assignment-to-Location-assign.tentative.html": [ + "8079335bc5861fa723691a0f884cf249e6f63e24", "testharness" ], - "trusted-types/block-string-assignment-to-innerHTML.tentative.html": [ - "67faf6ea7d30ebb76bb857faf0faf04743917dfb", + "trusted-types/block-string-assignment-to-Location-href.tentative.html": [ + "4e393f92506e00276a4440e1023ac23e7a6138e8", "testharness" ], - "trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html": [ - "70bb803442f14cbdcb356be6f6cdceca83522008", + "trusted-types/block-string-assignment-to-Location-replace.tentative.html": [ + "872f14e144830ed87b51e352f93c32ce85438bfe", "testharness" ], - "trusted-types/block-string-assignment-to-location-assign.tentative.html": [ - "76725da7c72e2f137b15c065bf74a43fc95c1933", + "trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html": [ + "2afa2572c350071b791ee280bce0a1e5135dc2aa", "testharness" ], - "trusted-types/block-string-assignment-to-location-href.tentative.html": [ - "07cc4d5fe29f79ae0239035dba1430f326945d70", - "testharness" - ], - "trusted-types/block-string-assignment-to-location-replace.tentative.html": [ - "9736a84b3ada709ac7ea758ccca10b766130b9aa", - "testharness" - ], - "trusted-types/block-string-assignment-to-outerHTML.tentative.html": [ - "8cf6c4b065a87f83015e5519ce86ecb6e1115e12", - "testharness" - ], - "trusted-types/block-string-assignment-to-window-open.tentative.html": [ - "2c3a8ce056685a5306472ee2e1a87bcbfc4c11e9", - "testharness" - ], - "trusted-types/createContextualFragment.tentative.html": [ - "5e50acc80650e4cc66e045735b301df3cdcaa307", - "testharness" - ], - "trusted-types/document-write.tentative.html": [ - "12794199722f6e2f078efa9ce9f91146c8ae9219", - "testharness" - ], - "trusted-types/innerHTML.tentative.html": [ - "f9f32d42a766346f5fd4e5fd18d8e20f7acba810", - "testharness" - ], - "trusted-types/insertAdjacentHTML.tentative.html": [ - "a95dd6c0bacc9844d25e64453b66aab759c76ad7", - "testharness" - ], - "trusted-types/location-assign.tentative.html": [ - "07cb4a801966006065adca4a5635d798c5c8ef94", - "testharness" - ], - "trusted-types/location-href.tentative.html": [ - "2527fbf4847b767d0252c86bddce0ab8127fd15b", - "testharness" - ], - "trusted-types/location-replace.tentative.html": [ - "097c24d593aa1eb34d452dd1d2812f2cc72ae1ad", - "testharness" - ], - "trusted-types/outerHTML.tentative.html": [ - "1deb46bf5e3d102550575d5e79eaf05cdf9739f6", - "testharness" - ], - "trusted-types/srcDoc-requiresTrustedTypes.tentative.html": [ - "b957488bee42d17b3160144b1cdaccfdfb8f1689", - "testharness" - ], - "trusted-types/srcDoc.tentative.html": [ - "b23703e22329a088b9459bdbbda367b5debf184f", + "trusted-types/block-string-assignment-to-Window-open.tentative.html": [ + "f5712295d30d7b1d680ad6753dd401d21c0409f9", "testharness" ], "trusted-types/support/helper.sub.js": [ - "91112d8f239069a9f88fdcffc46f5b2d49e49321", + "b5435917bec607c97eaa5d75ee7fa2752999cb0a", "support" ], - "trusted-types/window-open.tentative.html": [ - "66ffbd78399c70cca883ac55b6f380587bffc9ab", - "testharness" - ], "uievents/META.yml": [ "2f1ec58efec10e0dd6374aac05cb926c8cffa3f1", "support" @@ -643636,7 +643986,7 @@ "testharness" ], "wake-lock/wakelock-api.https.html": [ - "7ec4fc2827a77421cc16838e2458443265c1dccf", + "45a906dfa1f23de34befdc68e9da17d179fb2474", "testharness" ], "wake-lock/wakelock-applicability-manual.https.html": [ @@ -643700,7 +644050,7 @@ "testharness" ], "wake-lock/wakelock-type.https.html": [ - "6f6413d1a916bd966ab3e82b49065672eaaa9372", + "2f9e1242614d57a79b2aada32cdd3d2cb3ae012d", "testharness" ], "wake-lock/wakelockrequest-is-independent.https.html": [ @@ -645508,7 +645858,7 @@ "support" ], "webdriver/tests/add_cookie/add.py": [ - "49b1d68e7d2baa5086d0b945e9d005c2d86234ea", + "48fdf64f2f9523979a7a79ca3f9541603c0e1d60", "wdspec" ], "webdriver/tests/back/__init__.py": [ @@ -645664,7 +646014,7 @@ "wdspec" ], "webdriver/tests/element_send_keys/send_keys.py": [ - "0d281d7f5cb3c2f3386504aedd66afa6269e65d3", + "03cc94850c6c9f65e8a70a931b4816d0bbf2d167", "wdspec" ], "webdriver/tests/element_send_keys/user_prompts.py": [ @@ -645680,7 +646030,7 @@ "wdspec" ], "webdriver/tests/execute_async_script/execute_async.py": [ - "2b6e61543176ea1ba15f4c399028ceb24878e3c9", + "7c454eaf4ac4f83d7594e58f99dbdb525ef7d687", "wdspec" ], "webdriver/tests/execute_async_script/user_prompts.py": [ @@ -645700,7 +646050,7 @@ "wdspec" ], "webdriver/tests/execute_script/execute.py": [ - "632d4ed8b3fddf3f75af18717b7e9dfe9f96fdfe", + "9e220d02687e885ebcd682606f7a673cf36b6db1", "wdspec" ], "webdriver/tests/execute_script/json_serialize_windowproxy.py": [ @@ -645716,7 +646066,7 @@ "support" ], "webdriver/tests/find_element/find.py": [ - "ad25e78e9e47fa7ef45bbd1546eae9c7da78f436", + "20cde541d11eebcce70493863fb55fcb1e81a908", "wdspec" ], "webdriver/tests/find_element_from_element/__init__.py": [ @@ -645724,7 +646074,7 @@ "support" ], "webdriver/tests/find_element_from_element/find.py": [ - "d44fbb3957bc7b3e0e47e0016ffae3d3bfdf3813", + "56e216bb646131bdcc9a0c3c28ea4142c2982897", "wdspec" ], "webdriver/tests/find_elements/__init__.py": [ @@ -645732,7 +646082,7 @@ "support" ], "webdriver/tests/find_elements/find.py": [ - "f6856e9ed6ed45fd6f40008ba4ee0309aff0d282", + "b31370ee0cd1b7c9cb307541728f4e736117181c", "wdspec" ], "webdriver/tests/find_elements_from_element/__init__.py": [ @@ -645740,7 +646090,7 @@ "support" ], "webdriver/tests/find_elements_from_element/find.py": [ - "bcc18642c8fd86285be4ab2520b6d16aeb516f19", + "5a48e9c76ef6add6e69952c58a23edbd5e87698d", "wdspec" ], "webdriver/tests/forward/__init__.py": [ @@ -645863,6 +646213,30 @@ "76d65c088a0b94e8cefb976e91edf5492a5aae20", "wdspec" ], + "webdriver/tests/get_window_handle/__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + "support" + ], + "webdriver/tests/get_window_handle/get.py": [ + "c6a90f93c1b693d59df7d0b0b12f5da821e73c7c", + "wdspec" + ], + "webdriver/tests/get_window_handle/user_prompts.py": [ + "0bd660cfa1fb31ba4fc93bb0ecb239fc4a6c136c", + "wdspec" + ], + "webdriver/tests/get_window_handles/__init__.py": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + "support" + ], + "webdriver/tests/get_window_handles/get.py": [ + "07ff9d4d26fd3b7cff5620b5295ebe386a226cf2", + "wdspec" + ], + "webdriver/tests/get_window_handles/user_prompts.py": [ + "217e9849b4417d7124e203f937270a9e4823666a", + "wdspec" + ], "webdriver/tests/get_window_rect/__init__.py": [ "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "support" @@ -645920,7 +646294,7 @@ "support" ], "webdriver/tests/navigate_to/navigate.py": [ - "9ac1be00b84eeae73aec8a1facb43b329bae6310", + "e478e10b76b0953d854416dffdc7a400087aee95", "wdspec" ], "webdriver/tests/new_session/__init__.py": [ @@ -646000,7 +646374,7 @@ "support" ], "webdriver/tests/send_alert_text/send.py": [ - "9d4532a190c717ad7997a5b9ccb6d8d32a2cb1fc", + "edc37d6edb483c232401676f6c11ab7512774605", "wdspec" ], "webdriver/tests/set_timeouts/__init__.py": [ @@ -646008,7 +646382,7 @@ "support" ], "webdriver/tests/set_timeouts/set.py": [ - "8dd0344dca561d50df6dd04a0d2507a015649e0c", + "e603e217ec7d73bf7bc59f1d2e8687a89c818c47", "wdspec" ], "webdriver/tests/set_window_rect/__init__.py": [ @@ -646016,7 +646390,7 @@ "support" ], "webdriver/tests/set_window_rect/set.py": [ - "17210af4f46a25a6f2484ba76a74cd5c54e31d6a", + "928fd622efc22f520f4c6a9f783f60ec270146e2", "wdspec" ], "webdriver/tests/set_window_rect/user_prompts.py": [ @@ -646040,11 +646414,11 @@ "support" ], "webdriver/tests/support/fixtures.py": [ - "daeccb70e948b2564f7d78106dbee919b9cd7436", + "64427b4670f72c9ea069d0f008d93ad63a9781c0", "support" ], "webdriver/tests/support/http_request.py": [ - "ae28a6486b1333acc472ab2d37ac3f890249f1a2", + "5e46d97017e14ba009d4d1ed6d62bb5012f48d15", "support" ], "webdriver/tests/support/inline.py": [ @@ -646064,7 +646438,7 @@ "support" ], "webdriver/tests/switch_to_frame/switch.py": [ - "403047958665981f5509e370e38897b8a463e2a7", + "10948102239df61f0fd35fc157fe31b1a3e2968a", "wdspec" ], "webdriver/tests/switch_to_parent_frame/__init__.py": [ @@ -646080,7 +646454,7 @@ "support" ], "webdriver/tests/switch_to_window/switch.py": [ - "17f7c4da328822fb342b7e3f510eb6ed007bce3f", + "907be66a149e8196c87760544140636d9625bbb9", "wdspec" ], "webgl/META.yml": [ diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/015.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/015.html.ini deleted file mode 100644 index 1036a206e92..00000000000 --- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/015.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[015.html] - [global scope unchanged] - expected: FAIL - diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.js.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.js.ini new file mode 100644 index 00000000000..38cbf536604 --- /dev/null +++ b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.js.ini @@ -0,0 +1,3 @@ +[no-new-global.window.html] + [BarProp maintains its prototype and properties through open()] + expected: FAIL diff --git a/tests/wpt/web-platform-tests/async-local-storage/api-surface.tentative.https.html b/tests/wpt/web-platform-tests/async-local-storage/api-surface.tentative.https.html new file mode 100644 index 00000000000..eea51abd539 --- /dev/null +++ b/tests/wpt/web-platform-tests/async-local-storage/api-surface.tentative.https.html @@ -0,0 +1,65 @@ + + +Async local storage API surface + + + + + diff --git a/tests/wpt/web-platform-tests/async-local-storage/helpers/als-tests.js b/tests/wpt/web-platform-tests/async-local-storage/helpers/als-tests.js new file mode 100644 index 00000000000..fd6d6844f72 --- /dev/null +++ b/tests/wpt/web-platform-tests/async-local-storage/helpers/als-tests.js @@ -0,0 +1,72 @@ +import { StorageArea, storage as defaultArea } from "std:async-local-storage"; +import { assertArrayCustomEquals } from "./equality-asserters.js"; + +export function testWithArea(testFn, description) { + promise_test(t => { + const area = new StorageArea(description); + t.add_cleanup(t => area.clear()); + + return testFn(area, t); + }, description); +} + +export function testWithDefaultArea(testFn, description) { + promise_test(t => { + t.add_cleanup(t => defaultArea.clear()); + + return testFn(defaultArea, t); + }, description); +} + +// These two functions take a key/value and use them to test +// set()/get()/delete()/has()/keys()/values()/entries(). The keyEqualityAsserter should be a +// function from ./equality-asserters.js. + +export function testVariousMethodsWithDefaultArea(label, key, value, keyEqualityAsserter) { + testWithDefaultArea(testVariousMethodsInner(key, value, keyEqualityAsserter), label); +} + +export function testVariousMethods(label, key, value, keyEqualityAsserter) { + testWithArea(testVariousMethodsInner(key, value, keyEqualityAsserter), label); +} + +function testVariousMethodsInner(key, value, keyEqualityAsserter) { + return async area => { + await assertPromiseEquals(area.set(key, value), undefined, "set()", "undefined"); + + await assertPromiseEquals(area.get(key), value, "get()", "the set value"); + await assertPromiseEquals(area.has(key), true, "has()", "true"); + + const keysPromise = area.keys(); + assertIsPromise(keysPromise, "keys()"); + assertArrayCustomEquals(await keysPromise, [key], keyEqualityAsserter, "keys() must have the key"); + + const valuesPromise = area.values(); + assertIsPromise(valuesPromise); + assert_array_equals(await valuesPromise, [value], "values() must have the value"); + + const entriesPromise = area.entries(); + assertIsPromise(entriesPromise, "entries()"); + const entries = await entriesPromise; + assert_true(Array.isArray(entries), "entries() must give an array"); + assert_equals(entries.length, 1, "entries() must have only one value"); + assert_true(Array.isArray(entries[0]), "entries() 0th element must be an array"); + assert_equals(entries[0].length, 2, "entries() 0th element must have 2 elements"); + keyEqualityAsserter(entries[0][0], key, "entries() 0th element's 0th element must be the key"); + assert_equals(entries[0][1], value, "entries() 0th element's 1st element must be the value"); + + await assertPromiseEquals(area.delete(key), undefined, "delete()", "undefined"); + + await assertPromiseEquals(area.get(key), undefined, "get()", "undefined after deleting"); + await assertPromiseEquals(area.has(key), false, "has()", "false after deleting"); + }; +} + +async function assertPromiseEquals(promise, expected, label, expectedLabel) { + assertIsPromise(promise, label); + assert_equals(await promise, expected, label + " must fulfill with " + expectedLabel); +} + +function assertIsPromise(promise, label) { + assert_equals(promise.constructor, Promise, label + " must return a promise"); +} diff --git a/tests/wpt/web-platform-tests/async-local-storage/helpers/class-assert.js b/tests/wpt/web-platform-tests/async-local-storage/helpers/class-assert.js new file mode 100644 index 00000000000..31b25cab9f2 --- /dev/null +++ b/tests/wpt/web-platform-tests/async-local-storage/helpers/class-assert.js @@ -0,0 +1,107 @@ +export function isConstructor(o) { + assert_equals(typeof o, "function", "Must be a function according to typeof"); + assert_true(isConstructorTest(o), "Must be a constructor according to the meta-object protocol"); + assert_throws(new TypeError(), () => o(), "Attempting to call (not construct) must throw"); +} + +export function functionLength(o, expected, label) { + const lengthExpected = { writable: false, enumerable: false, configurable: true }; + const { value } = propertyDescriptor(o, "length", lengthExpected); + + assert_equals(value, expected, `${formatLabel(label)}length value`); +} + +export function functionName(o, expected, label) { + const lengthExpected = { writable: false, enumerable: false, configurable: true }; + const { value } = propertyDescriptor(o, "name", lengthExpected); + + assert_equals(value, expected, `${formatLabel(label)}name value`); +} + +export function hasClassPrototype(o) { + const prototypeExpected = { writable: false, enumerable: false, configurable: false }; + const { value } = propertyDescriptor(o, "prototype", prototypeExpected); + assert_equals(typeof value, "object", "prototype must be an object"); + assert_not_equals(value, null, "prototype must not be null"); +} + +export function hasPrototypeConstructorLink(klass) { + const constructorExpected = { writable: true, enumerable: false, configurable: true }; + const { value } = propertyDescriptor(klass.prototype, "constructor", constructorExpected); + assert_equals(value, klass, "constructor property must match"); +} + +export function propertyKeys(o, expectedNames, expectedSymbols, label) { + label = formatLabel(label); + assert_array_equals(Object.getOwnPropertyNames(o), expectedNames, `${label}property names`); + assert_array_equals(Object.getOwnPropertySymbols(o), expectedSymbols, + `${label}property symbols`); +} + +export function methods(o, expectedMethods) { + for (const [name, length] of Object.entries(expectedMethods)) { + method(o, name, length); + } +} + +export function accessors(o, expectedAccessors) { + for (const [name, accessorTypes] of Object.entries(expectedAccessors)) { + accessor(o, name, accessorTypes); + } +} + +function method(o, prop, length) { + const methodExpected = { writable: true, enumerable: false, configurable: true }; + const { value } = propertyDescriptor(o, prop, methodExpected); + + assert_equals(typeof value, "function", `${prop} method must be a function according to typeof`); + assert_false(isConstructorTest(value), + `${prop} method must not be a constructor according to the meta-object protocol`); + functionLength(value, length, prop); + functionName(value, prop, prop); + propertyKeys(value, ["length", "name"], [], prop); +} + +function accessor(o, prop, expectedAccessorTypes) { + const accessorExpected = { enumerable: false, configurable: true }; + const propDesc = propertyDescriptor(o, prop, accessorExpected); + + for (const possibleType of ["get", "set"]) { + const accessorFunc = propDesc[possibleType]; + if (expectedAccessorTypes.includes(possibleType)) { + const label = `${prop}'s ${possibleType}ter`; + + assert_equals(typeof accessorFunc, "function", + `${label} must be a function according to typeof`); + assert_false(isConstructorTest(accessorFunc), + `${label} must not be a constructor according to the meta-object protocol`); + + functionLength(accessorFunc, possibleType === "get" ? 0 : 1, label); + functionName(accessorFunc, `${possibleType} ${prop}`, label); + propertyKeys(accessorFunc, ["length", "name"], [], label); + } else { + assert_equals(accessorFunc, undefined, `${prop} must not have a ${possibleType}ter`); + } + } +} + +function propertyDescriptor(obj, prop, mustMatch) { + const propDesc = Object.getOwnPropertyDescriptor(obj, prop); + for (const key in Object.keys(mustMatch)) { + assert_equals(propDesc[key], mustMatch[key], `${prop} ${key}`); + } + return propDesc; +} + +function isConstructorTest(o) { + try { + new (new Proxy(o, {construct: () => ({})})); + return true; + } catch (e) { + return false; + } +} + +function formatLabel(label) { + return label !== undefined ? ` ${label}` : ""; +} diff --git a/tests/wpt/web-platform-tests/async-local-storage/helpers/equality-asserters.js b/tests/wpt/web-platform-tests/async-local-storage/helpers/equality-asserters.js new file mode 100644 index 00000000000..ad4623c179d --- /dev/null +++ b/tests/wpt/web-platform-tests/async-local-storage/helpers/equality-asserters.js @@ -0,0 +1,37 @@ +export function assertEqualDates(actual, expected, label) { + assert_equals(expected.constructor, Date, + "assertEqualDates usage check: expected must be a Date"); + + const labelPart = label === undefined ? "" : `${label}: `; + assert_equals(actual.constructor, Date, `${labelPart}must be a Date`); + assert_equals(actual.valueOf(), expected.valueOf(), `${labelPart}timestamps must match`); +} + +export function assertEqualArrayBuffers(actual, expected, label) { + assert_equals(expected.constructor, ArrayBuffer, + "assertEqualArrayBuffers usage check: expected must be an ArrayBuffer"); + + const labelPart = label === undefined ? "" : `${label}: `; + assert_equals(actual.constructor, ArrayBuffer, `${labelPart}must be an ArrayBuffer`); + assert_array_equals(new Uint8Array(actual), new Uint8Array(expected), `${labelPart}must match`); +} + +export function assertArrayBufferEqualsABView(actual, expected, label) { + assert_true(ArrayBuffer.isView(expected), + "assertArrayBufferEqualsABView usage check: expected must be an ArrayBuffer view"); + + assertEqualArrayBuffers(actual, expected.buffer, label); +} + +export function assertArrayCustomEquals(actual, expected, equalityAsserter, label) { + assert_true(Array.isArray(expected), + "assertArrayCustomEquals usage check: expected must be an Array"); + + const labelPart = label === undefined ? "" : `${label}: `; + assert_true(Array.isArray(actual), `${labelPart}must be an array`); + assert_equals(actual.length, expected.length, `${labelPart}length must be as expected`); + + for (let i = 0; i < actual.length; ++i) { + equalityAsserter(actual[i], expected[i], `${labelPart}index ${i}`); + } +} diff --git a/tests/wpt/web-platform-tests/async-local-storage/key-types.tentative.https.html b/tests/wpt/web-platform-tests/async-local-storage/key-types.tentative.https.html new file mode 100644 index 00000000000..771ee2f9749 --- /dev/null +++ b/tests/wpt/web-platform-tests/async-local-storage/key-types.tentative.https.html @@ -0,0 +1,66 @@ + + +Async local storage: tests against various key types + + + + + diff --git a/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-dynamic-import.tentative.html b/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-dynamic-import.tentative.html new file mode 100644 index 00000000000..9270f6c82fa --- /dev/null +++ b/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-dynamic-import.tentative.html @@ -0,0 +1,18 @@ + + +Async local storage: should not work in non-secure contexts when included via import() + + + + + diff --git a/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-import-statement.tentative.html b/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-import-statement.tentative.html new file mode 100644 index 00000000000..879729696db --- /dev/null +++ b/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-import-statement.tentative.html @@ -0,0 +1,27 @@ + + +Async local storage: should not work in non-secure contexts when included via an import statement + + + + + + + diff --git a/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-script-element.tentative.html b/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-script-element.tentative.html new file mode 100644 index 00000000000..feeddafc8da --- /dev/null +++ b/tests/wpt/web-platform-tests/async-local-storage/non-secure-context-script-element.tentative.html @@ -0,0 +1,25 @@ + + +Async local storage: should not work in non-secure contexts when included via a script element + + + + + + + diff --git a/tests/wpt/web-platform-tests/async-local-storage/storage-smoke-test.https.tentative.html b/tests/wpt/web-platform-tests/async-local-storage/storage-smoke-test.tentative.https.html similarity index 52% rename from tests/wpt/web-platform-tests/async-local-storage/storage-smoke-test.https.tentative.html rename to tests/wpt/web-platform-tests/async-local-storage/storage-smoke-test.tentative.https.html index b4d66dabc7a..f978480ff2b 100644 --- a/tests/wpt/web-platform-tests/async-local-storage/storage-smoke-test.https.tentative.html +++ b/tests/wpt/web-platform-tests/async-local-storage/storage-smoke-test.tentative.https.html @@ -6,6 +6,7 @@ diff --git a/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js b/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js index 843506947f7..33c8124ffa4 100644 --- a/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js +++ b/tests/wpt/web-platform-tests/background-fetch/fetch.https.window.js @@ -84,3 +84,15 @@ backgroundFetchTest(async (test, backgroundFetch) => { assert_equals(results[0].text, 'Background Fetch'); }, 'Using Background Fetch to successfully fetch a single resource'); + +backgroundFetchTest(async (test, backgroundFetch) => { + const registrationId = uniqueId(); + + // Very large download total that will definitely exceed the quota. + const options = {downloadTotal: Number.MAX_SAFE_INTEGER}; + await promise_rejects( + test, "QUOTA_EXCEEDED_ERR", + backgroundFetch.fetch(registrationId, 'resources/feature-name.txt', options), + 'This fetch should have thrown a quota exceeded error'); + +}, 'Background Fetch that exceeds the quota throws a QuotaExceededError'); diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__host.document-cookie.non-secure.html b/tests/wpt/web-platform-tests/cookies/prefix/__host.document-cookie.html similarity index 100% rename from tests/wpt/web-platform-tests/cookies/prefix/__host.document-cookie.non-secure.html rename to tests/wpt/web-platform-tests/cookies/prefix/__host.document-cookie.html diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__host.document-cookie.https.html b/tests/wpt/web-platform-tests/cookies/prefix/__host.document-cookie.https.html new file mode 100644 index 00000000000..05ecdff358f --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/prefix/__host.document-cookie.https.html @@ -0,0 +1,42 @@ + + + + + diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__host.http.non-secure.html b/tests/wpt/web-platform-tests/cookies/prefix/__host.header.html similarity index 57% rename from tests/wpt/web-platform-tests/cookies/prefix/__host.http.non-secure.html rename to tests/wpt/web-platform-tests/cookies/prefix/__host.header.html index 3ce58735438..5a522cbaa01 100644 --- a/tests/wpt/web-platform-tests/cookies/prefix/__host.http.non-secure.html +++ b/tests/wpt/web-platform-tests/cookies/prefix/__host.header.html @@ -10,7 +10,7 @@ params: "Path=/;" + extraParams, shouldExistInDOM: false, shouldExistViaHTTP: false, - title: "__Host: Non-secure origin: 'Path=/;" + extraParams + "'" + title: "__Host: Non-secure origin: Does not set 'Path=/;" + extraParams + "'" }); // With 'secure' @@ -19,7 +19,16 @@ params: "Secure; Path=/;" + extraParams, shouldExistInDOM: false, shouldExistViaHTTP: false, - title: "__Host: Non-secure origin: 'Secure; Path=/;" + extraParams + "'" + title: "__Host: Non-secure origin: Does not set 'Secure; Path=/;" + extraParams + "'" + }); + + // With 'domain' + set_prefixed_cookie_via_http_test({ + prefix: "__Host-", + params: "Secure; Path=/; Domain=" + document.location.hostname + "; " + extraParams, + shouldExistInDOM: false, + shouldExistViaHTTP: false, + title: "__Host: Secure origin: Does not set 'Secure; Path=/; Domain=" + document.location.hostname + "; " + extraParams + "'" }); }); @@ -28,7 +37,7 @@ params: "Secure; Path=/cookies/resources/list.py", shouldExistInDOM: false, shouldExistViaHTTP: false, - title: "__Host: Non-secure origin: 'Secure; Path=/cookies/resources/list.py'" + title: "__Host: Non-secure origin: Does not set 'Secure; Path=/cookies/resources/list.py'" }); diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__host.header.https.html b/tests/wpt/web-platform-tests/cookies/prefix/__host.header.https.html new file mode 100644 index 00000000000..53d0dba6598 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/prefix/__host.header.https.html @@ -0,0 +1,43 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__secure.document-cookie.non-secure.html b/tests/wpt/web-platform-tests/cookies/prefix/__secure.document-cookie.html similarity index 69% rename from tests/wpt/web-platform-tests/cookies/prefix/__secure.document-cookie.non-secure.html rename to tests/wpt/web-platform-tests/cookies/prefix/__secure.document-cookie.html index bf898f4cebc..a1b335b9816 100644 --- a/tests/wpt/web-platform-tests/cookies/prefix/__secure.document-cookie.non-secure.html +++ b/tests/wpt/web-platform-tests/cookies/prefix/__secure.document-cookie.html @@ -3,14 +3,14 @@ diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__secure.document-cookie.https.html b/tests/wpt/web-platform-tests/cookies/prefix/__secure.document-cookie.https.html new file mode 100644 index 00000000000..89b14604380 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookies/prefix/__secure.document-cookie.https.html @@ -0,0 +1,25 @@ + + + + + diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__secure.http.non-secure.html b/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.html similarity index 71% rename from tests/wpt/web-platform-tests/cookies/prefix/__secure.http.non-secure.html rename to tests/wpt/web-platform-tests/cookies/prefix/__secure.header.html index af844a9587f..431e0e1ec98 100644 --- a/tests/wpt/web-platform-tests/cookies/prefix/__secure.http.non-secure.html +++ b/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.html @@ -8,18 +8,16 @@ set_prefixed_cookie_via_http_test({ prefix: "__Secure-", params: "Path=/;" + extraParams, - shouldExistInDOM: false, shouldExistViaHTTP: false, - title: "__Secure: Non-secure origin: 'Path=/;" + extraParams + "'" + title: "__Secure: Non-secure origin: Should not set 'Path=/;" + extraParams + "'" }); // With 'secure' set_prefixed_cookie_via_http_test({ prefix: "__Secure-", params: "Secure; Path=/;" + extraParams, - shouldExistInDOM: false, - shouldExistViaHTTP: false, - title: "__Secure: Non-secure origin: 'Secure; Path=/;" + extraParams + "'" + shouldExistViaHTTP: true, + title: "__Secure: Non-secure origin: Should set 'Secure; Path=/;" + extraParams + "'" }); }); diff --git a/tests/wpt/web-platform-tests/cookies/prefix/__secure.http.secure.html b/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.https.html similarity index 69% rename from tests/wpt/web-platform-tests/cookies/prefix/__secure.http.secure.html rename to tests/wpt/web-platform-tests/cookies/prefix/__secure.header.https.html index 4b413e9ce3a..d912babc239 100644 --- a/tests/wpt/web-platform-tests/cookies/prefix/__secure.http.secure.html +++ b/tests/wpt/web-platform-tests/cookies/prefix/__secure.header.https.html @@ -6,22 +6,18 @@ ["", "domain="+CROSS_SITE_HOST, "MaxAge=10", "HttpOnly"].forEach(extraParams => { // Without 'secure' set_prefixed_cookie_via_http_test({ - origin: SECURE_CROSS_SITE_ORIGIN, prefix: "__Secure-", params: "Path=/;" + extraParams, - shouldExistInDOM: false, shouldExistViaHTTP: false, - title: "__Secure: secure origin: 'Path=/;" + extraParams + "'" + title: "__Secure: secure origin: Should not set 'Path=/;" + extraParams + "'" }); // With 'secure' set_prefixed_cookie_via_http_test({ - origin: SECURE_CROSS_SITE_ORIGIN, prefix: "__Secure-", params: "Secure;Path=/;" + extraParams, - shouldExistInDOM: false, shouldExistViaHTTP: true, - title: "__Secure: secure origin: 'Secure;Path=/;" + extraParams + "'" + title: "__Secure: secure origin: Should set 'Secure;Path=/;" + extraParams + "'" }); }); diff --git a/tests/wpt/web-platform-tests/cookies/prefix/document-cookie.non-secure.html b/tests/wpt/web-platform-tests/cookies/prefix/document-cookie.non-secure.html index bc6832b15ea..1b5edf76a29 100644 --- a/tests/wpt/web-platform-tests/cookies/prefix/document-cookie.non-secure.html +++ b/tests/wpt/web-platform-tests/cookies/prefix/document-cookie.non-secure.html @@ -12,7 +12,7 @@ assert_dom_cookie(name, value, shouldExistInDOM); - return credFetch("/cookies/rfx6265bis/resources/list.py") + return credFetch("/cookies/resources/list.py") .then(r => r.json()) .then(cookies => assert_equals(cookies[name], shouldExistViaHTTP ? value : undefined)); }, title); 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 428cab042e4..49cf0b1fdbf 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 @@ -180,27 +180,13 @@ return credFetch(origin + "/cookies/resources/dropSecure.py") } // -// DOM based cookie manipulation API's +// DOM based cookie manipulation APIs // -// borrowed from http://www.quirksmode.org/js/cookies.html -function create_cookie_from_js(name, value, days, secure_flag) { - if (days) { - var date = new Date(); - date.setTime(date.getTime()+(days*24*60*60*1000)); - var expires = "; expires="+date.toGMTString(); - } - else var expires = ""; - - var secure = ""; - if (secure_flag == true) { - secure = "secure; "; - } - document.cookie = name+"="+value+expires+"; "+secure+"path=/"; -} - // erase cookie value and set for expiration function erase_cookie_from_js(name) { - create_cookie_from_js(name,"",-1); - assert_dom_cookie(name, "", false); + let secure = self.location.protocol == "https:" ? "Secure" : ""; + document.cookie = `${name}=0; path=/; expires=${new Date(0).toUTCString()}; ${secure}`; + var re = new RegExp("(?:^|; )" + name); + assert_equals(re.test(document.cookie), false, "Sanity check: " + name + " has been deleted."); } diff --git a/tests/wpt/web-platform-tests/cookies/secure/cookie-forcing.html b/tests/wpt/web-platform-tests/cookies/secure/cookie-forcing.html deleted file mode 100644 index 3ea59e1369d..00000000000 --- a/tests/wpt/web-platform-tests/cookies/secure/cookie-forcing.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-logical/resources/test-box-properties.js b/tests/wpt/web-platform-tests/css/css-logical/resources/test-box-properties.js index 9d73b5b8fc5..1f17ff296ff 100644 --- a/tests/wpt/web-platform-tests/css/css-logical/resources/test-box-properties.js +++ b/tests/wpt/web-platform-tests/css/css-logical/resources/test-box-properties.js @@ -23,9 +23,10 @@ const testValues = { * inlineStart: "margin-inline-start", inlineEnd: "margin-inline-end", * blockStart: "margin-block-start", blockEnd: "margin-block-end", * }, shorthands: { - * inline: ["margin-inline-start", "margin-inline-end"], - * block: ["margin-block-start", "margin-block-end"], - * }, type: ["length"], prerequisites: "...", property: "'margin-*'" } + * "margin": ["margin-top", "margin-right", "margin-bottom", "margin-left"], + * "margin-inline": ["margin-inline-start", "margin-inline-end"], + * "margin-block": ["margin-block-start", "margin-block-end"], + * }, type: ["length"], prerequisites: "...", property: "margin-*" } * * @param {string} property * A string representing the property names, like "margin-*". @@ -59,8 +60,10 @@ export function createBoxPropertyGroup(property, descriptor) { physical[physicalSide] = isInset ? physicalSide : property.replace("*", physicalSide); prerequisites += makeDeclaration(descriptor.prerequisites, physicalSide); } + shorthands[property.replace("-*", "")] = + ["top", "right", "bottom", "left"].map(physicalSide => physical[physicalSide]); const type = [].concat(descriptor.type); - return {name, logical, physical, shorthands, type, prerequisites, property}; + return {logical, physical, shorthands, type, prerequisites, property}; } /** @@ -109,6 +112,29 @@ export function runTests(group) { }, `Test that logical ${group.property} properties are supported.`); testElement.style.cssText = ""; + const shorthandValues = {}; + for (const [shorthand, longhands] of shorthands || []) { + let valueArray; + if (group.type.length > 1) { + valueArray = [values[0]]; + } else { + valueArray = testValues[group.type].slice(0, longhands.length); + } + shorthandValues[shorthand] = valueArray; + const value = valueArray.join(" "); + const expected = [[shorthand, value]]; + for (let [i, longhand] of longhands.entries()) { + expected.push([longhand, valueArray[group.type.length > 1 ? 0 : i]]); + } + test(function() { + testElement.style.setProperty(shorthand, value); + testCSSValues("shorthand in inline style", testElement.style, expected); + const stylesheet = `.test { ${group.prerequisites} }`; + testComputedValues("shorthand in computed style", stylesheet, expected); + }, `Test that ${shorthand} shorthand sets longhands and serializes correctly.`); + testElement.style.cssText = ""; + } + for (const writingMode of writingModes) { for (const style of writingMode.styles) { const writingModeDecl = makeDeclaration(style); @@ -141,21 +167,15 @@ export function runTests(group) { }, `Test that logical ${group.property} properties share computed values ` + `with their physical associates, with '${writingModeDecl}'.`); - // Test logical shorthand properties. if (shorthands) { test(function() { for (const [shorthand, longhands] of shorthands) { - let shorthandValues; - if (group.type.length > 1) { - shorthandValues = [values[0]]; - } else { - shorthandValues = testValues[group.type].slice(0, longhands.length); - } - const decl = group.prerequisites + `${shorthand}: ${shorthandValues.join(" ")}; `; + let valueArray = shorthandValues[shorthand]; + const decl = group.prerequisites + `${shorthand}: ${valueArray.join(" ")}; `; const expected = []; for (let [i, longhand] of longhands.entries()) { - const longhandValue = shorthandValues[group.type.length > 1 ? 0 : i]; + const longhandValue = valueArray[group.type.length > 1 ? 0 : i]; expected.push([longhand, longhandValue]); expected.push([associated[longhand], longhandValue]); } diff --git a/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html b/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html index 065280614cc..69ebf7a13d8 100644 --- a/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-properties-values-api/typedom.tentative.html @@ -1,11 +1,13 @@ - + - +
diff --git a/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-keywords.html b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-keywords.html new file mode 100644 index 00000000000..94ccd6ef6d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scrollbars/scrollbar-width-keywords.html @@ -0,0 +1,38 @@ + + + + + + + + +
+
+
+ diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001-ref.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001-ref.xhtml index 33057bf5f0f..517b7f465dd 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001-ref.xhtml +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001-ref.xhtml @@ -144,13 +144,13 @@
-
+
-
-
+
+
@@ -158,13 +158,13 @@
-
-
+
+
-
+
-
+
diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001a.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001a.xhtml index bb0a8cda64b..bb592b74a8b 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001a.xhtml +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001a.xhtml @@ -149,28 +149,28 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001b.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001b.xhtml index a1e192102ea..3de740e9a3f 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001b.xhtml +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-001b.xhtml @@ -150,28 +150,28 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002-ref.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002-ref.xhtml new file mode 100644 index 00000000000..f0d286494e4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002-ref.xhtml @@ -0,0 +1,170 @@ + + + + + CSS Reftest Reference + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002.xhtml new file mode 100644 index 00000000000..902b26ba23e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-horiz-002.xhtml @@ -0,0 +1,179 @@ + + + + + + CSS Test: Testing 'align-content' in a row wrap-reverse flex container + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001-ref.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001-ref.xhtml index 1bac2bcda1d..f09e2a448da 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001-ref.xhtml +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001-ref.xhtml @@ -147,13 +147,13 @@
-
+
-
-
+
+
@@ -161,13 +161,13 @@
-
-
+
+
-
+
-
+
diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001a.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001a.xhtml index c4236ef0406..56bdd5fe402 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001a.xhtml +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001a.xhtml @@ -149,28 +149,28 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001b.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001b.xhtml index 54a8ed31f96..002f20fb333 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001b.xhtml +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-001b.xhtml @@ -150,28 +150,28 @@
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002-ref.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002-ref.xhtml new file mode 100644 index 00000000000..b514d840489 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002-ref.xhtml @@ -0,0 +1,173 @@ + + + + + CSS Reftest Reference + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002.xhtml b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002.xhtml new file mode 100644 index 00000000000..b4a8ccf3dd1 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-content-vert-002.xhtml @@ -0,0 +1,179 @@ + + + + + + CSS Test: Testing 'align-content' in a column wrap-reverse flex container + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/reftest.list b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/reftest.list index b51226706ea..ee725d99ed9 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/reftest.list +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/reftest.list @@ -9,8 +9,10 @@ # Tests for alignment of flex lines (align-content property) == flexbox-align-content-horiz-001a.xhtml flexbox-align-content-horiz-001-ref.xhtml == flexbox-align-content-horiz-001b.xhtml flexbox-align-content-horiz-001-ref.xhtml +== flexbox-align-content-horiz-002.xhtml flexbox-align-content-horiz-002-ref.xhtml == flexbox-align-content-vert-001a.xhtml flexbox-align-content-vert-001-ref.xhtml == flexbox-align-content-vert-001b.xhtml flexbox-align-content-vert-001-ref.xhtml +== flexbox-align-content-vert-002.xhtml flexbox-align-content-vert-002-ref.xhtml == flexbox-align-content-wmvert-001.xhtml flexbox-align-content-wmvert-001-ref.xhtml # Tests for cross-axis alignment (align-self / align-items properties) diff --git a/tests/wpt/web-platform-tests/docs/_appendix/reverting.md b/tests/wpt/web-platform-tests/docs/_appendix/reverting.md new file mode 100644 index 00000000000..1f549b3a341 --- /dev/null +++ b/tests/wpt/web-platform-tests/docs/_appendix/reverting.md @@ -0,0 +1,31 @@ +--- +layout: page +title: Reverting Changes +order: 3 +--- +Testing is imperfect and from time to time changes are merged into master which +break things for users of web-platform-tests. Such breakage can include: + + * Failures in Travis or Taskcluster runs for this repository, either on the + master branch or on pull requests following the breaking change. + + * Breakage in browser engine repositories which import and run + web-platform-tests, such as Chromium, Edge, Gecko, Servo and WebKit. + + * Breakage in results collections systems for results dashboards, such as + [wpt.fyi](https://wpt.fyi). + + * Breakage in supplemental tooling used by working groups, such as the + [CSS build system][]. + +When such breakage happens, if the maintainers of the affected systems request +it, pull requests to revert the original change should normally be approved and +merged as soon as possible. (When the original change itself was fixing a +serious problem, it's a judgement call, but prefer the fastest path to a stable +state acceptable to everyone.) + +Once a revert has happened, the maintainers of the affected systems are +expected to work with the original patch author to resolve the problem so that +the change can be relanded. A reasonable timeframe to do so is within one week. + +[CSS build system]: https://github.com/web-platform-tests/wpt/tree/master/css/tools diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/001.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/001.html deleted file mode 100644 index f82d80be7b6..00000000000 --- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/001.html +++ /dev/null @@ -1,20 +0,0 @@ - -Replacement of window object after document.open - - -
- - diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/008.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/008.html deleted file mode 100644 index 36c0a3f3ea1..00000000000 --- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/008.html +++ /dev/null @@ -1,20 +0,0 @@ - -Replacement of document prototype object after document.open - - -
- - diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/009.https.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/009.https.html deleted file mode 100644 index 0d104c9569b..00000000000 --- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/009.https.html +++ /dev/null @@ -1,34 +0,0 @@ - -document.open replacing singleton - - -
- - diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/015-1.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/015-1.html index dffbac0c041..c325bd08015 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/015-1.html +++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/015-1.html @@ -5,7 +5,7 @@ onload = function() { parent.tests[0].step(function() {parent.assert_equals(document.open(), document)}); document.write(" diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.js new file mode 100644 index 00000000000..d4a9296fca6 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/no-new-global.window.js @@ -0,0 +1,57 @@ +// In an earlier version of the HTML Standard, document open steps created a +// new JavaScript realm and migrated the existing objects to use the new realm. +// Test that this no longer happens. + +async_test(t => { + const frame = document.body.appendChild(document.createElement("iframe")); + // Ensure a load event gets dispatched to unblock testharness + t.add_cleanup(() => frame.remove()); + frame.src = "resources/global-variables-frame.html"; + frame.onload = t.step_func_done(() => { + assert_equals(frame.contentWindow.hey, "You", "precondition"); + frame.contentDocument.open(); + assert_equals(frame.contentWindow.hey, "You", "actual check"); + }); +}, "Obtaining a variable from a global whose document had open() invoked"); + +function testIdentity(desc, frameToObject, frameToConstructor) { + async_test(t => { + const frame = document.body.appendChild(document.createElement("iframe")); + // Ensure a load event gets dispatched to unblock testharness + t.add_cleanup(() => frame.remove()); + frame.src = "/common/blank.html"; + frame.onload = t.step_func_done(() => { + const obj = frameToObject(frame); + frame.contentDocument.open(); + assert_equals(frameToObject(frame), obj); + }); + }, `${desc} maintains object identity through open()`); + + async_test(t => { + const frame = document.body.appendChild(document.createElement("iframe")); + // Ensure a load event gets dispatched to unblock testharness + t.add_cleanup(() => frame.remove()); + frame.src = "/common/blank.html"; + frame.onload = t.step_func_done(() => { + const obj = frameToObject(frame); + const origProto = Object.getPrototypeOf(obj); + const origCtor = frameToConstructor(frame); + const sym = Symbol(); + obj[sym] = "foo"; + frame.contentDocument.open(); + assert_equals(frameToObject(frame)[sym], "foo"); + assert_true(frameToObject(frame) instanceof origCtor); + assert_equals(Object.getPrototypeOf(frameToObject(frame)), origProto); + assert_equals(frameToConstructor(frame), origCtor); + }); + }, `${desc} maintains its prototype and properties through open()`); +} + +testIdentity("Document", frame => frame.contentDocument, frame => frame.contentWindow.Document); +testIdentity("WindowProxy", frame => frame.contentWindow, frame => frame.contentWindow.Window); +testIdentity("BarProp", frame => frame.contentWindow.locationbar, frame => frame.contentWindow.BarProp); +testIdentity("History", frame => frame.contentWindow.history, frame => frame.contentWindow.History); +testIdentity("localStorage", frame => frame.contentWindow.localStorage, frame => frame.contentWindow.Storage); +testIdentity("Location", frame => frame.contentWindow.location, frame => frame.contentWindow.Location); +testIdentity("sessionStorage", frame => frame.contentWindow.sessionStorage, frame => frame.contentWindow.Storage); +testIdentity("Navigator", frame => frame.contentWindow.navigator, frame => frame.contentWindow.Navigator); diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/global-variables-frame.html b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/global-variables-frame.html new file mode 100644 index 00000000000..0fe189914c3 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/global-variables-frame.html @@ -0,0 +1,4 @@ + + diff --git a/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.js b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.js new file mode 100644 index 00000000000..e275a4987a0 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/unload.window.js @@ -0,0 +1,19 @@ +// In an earlier version of the HTML Standard, document open steps had "unload +// document" as a step. Test that this no longer happens. + +async_test(t => { + const frame = document.body.appendChild(document.createElement("iframe")); + t.add_cleanup(() => frame.remove()); + frame.src = "/common/blank.html"; + frame.onload = t.step_func(() => { + frame.contentWindow.onpagehide = t.unreached_func("onpagehide got called"); + frame.contentDocument.onvisibilitychange = t.unreached_func("onvisibilitychange got called"); + frame.contentWindow.onunload = t.unreached_func("onunload got called"); + frame.contentDocument.open(); + t.step_timeout(t.step_func_done(() => { + // If none of the three events have been fired by this point, we consider + // the test a success. `frame.remove()` above will allow the `load` event + // to be fired on the top-level Window, thus unblocking testharness. + }), 500); + }); +}, "document.open(): Do not fire pagehide, visibilitychange, or unload events"); diff --git a/tests/wpt/web-platform-tests/interfaces/web-nfc.idl b/tests/wpt/web-platform-tests/interfaces/web-nfc.idl index cdb0e756848..2728840b95f 100644 --- a/tests/wpt/web-platform-tests/interfaces/web-nfc.idl +++ b/tests/wpt/web-platform-tests/interfaces/web-nfc.idl @@ -54,7 +54,7 @@ enum NFCPushTarget { dictionary NFCWatchOptions { USVString url = ""; - NFCRecordType? recordType; + NFCRecordType recordType; USVString mediaType = ""; NFCWatchMode mode = "web-nfc-only"; }; diff --git a/tests/wpt/web-platform-tests/network-error-logging/META.yml b/tests/wpt/web-platform-tests/network-error-logging/META.yml new file mode 100644 index 00000000000..bc063177d1d --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/META.yml @@ -0,0 +1,2 @@ +suggested_reviewers: + - dcreager diff --git a/tests/wpt/web-platform-tests/network-error-logging/README.md b/tests/wpt/web-platform-tests/network-error-logging/README.md new file mode 100644 index 00000000000..7cf2c6fdcee --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/README.md @@ -0,0 +1,74 @@ +# Network Error Logging + +The tests in this directory exercise the user agent's implementation of [Network +Error Logging](https://w3c.github.io/network-error-logging/) and +[Reporting](https://w3c.github.io/reporting/). + +## Collector + +Each test case generates a unique `reportID` that is used to distinguish the NEL +reports generated by that test case. + +The [support/report.py][] file is a [Python file handler][] that can be used as +a Reporting collector. Its default operation is to save any reports that it +receives into the [stash][]. If you pass in the optional `op` URL parameter, +with a value of `retrieve_report`, it will instead return a list of all of the +reports received for a particular `reportID`. + +[Python file handler]: https://wptserve.readthedocs.io/en/latest/handlers.html#python-file-handlers +[stash]: https://wptserve.readthedocs.io/en/latest/stash.html +[support/report.py]: support/report.py + +## Installing NEL policies + +NEL reports are only generated if the user agent has received a NEL policy for +the origin of the request. The current request counts; if its response contains +a policy, that policy is used for the current request and all future requests, +modulo the policy's `max_age` field. + +Most of the test cases will therefore make a request or two to install NEL +policies, and then make another request that should or should not be covered by +those policies. It will then assert that NEL reports were or were not created, +as required by the spec. + +The [support][] directory contains several images, each of which defines a +particular "kind" of NEL policy (e.g., `include_subdomains` set vs unset, no +policy at all, etc.). The [support/nel.sub.js][] file contains helper +JavaScript methods for requesting those images, so that the test cases +themselves are more descriptive. + +[support]: support +[support/nel.sub.js]: support/nel.sub.js + +## Avoiding spurious reports + +NEL policies apply to **all** future requests to the origin. We therefore serve +all of the test case's "infrastructure" (the test case itself, +[support/report.py][] and [support/nel.sub.js][]) on a different origin than +the requests that exercise the NEL implementation. That ensures that we don't +have to wade through NEL reports about the infrastructure when verifying the NEL +reports about the requests that we care about. + +## Browser configuration + +You must configure your browser's Reporting implementation to upload reports for +a request immediately. The test cases do not currently have any timeouts; they +assume that as soon as the Fetch API promise resolves, any NEL reports for the +request have already been uploaded. + +## Test parallelism + +Because NEL policies are stored in a global cache in the user agent, we need to +run the tests in this directory serially instead of in parallel. We implement a +simple spin-lock in [support/lock.py][] to ensure that only one test is allowed +to perform any NEL-related requests at a time. + +[support/lock.py]: support/lock.py + +## CORS preflights + +Reporting uploads are subject to CORS preflights. We want to test normal +operation (when preflight requests succeed) as well as failures of the CORS +preflight logic in the user agent. To support this, our test collector is +configured to always reject the CORS preflight for a single domain (www2), and +to always grant the CORS preflight for all other test subdomains. diff --git a/tests/wpt/web-platform-tests/network-error-logging/no-report-on-failed-cors-preflight.https.html b/tests/wpt/web-platform-tests/network-error-logging/no-report-on-failed-cors-preflight.https.html new file mode 100644 index 00000000000..3a35651b4ef --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/no-report-on-failed-cors-preflight.https.html @@ -0,0 +1,26 @@ + + + + + Test that NEL reports are not sent if the CORS preflight fails + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/network-error-logging/no-report-on-subdomain-404.https.html b/tests/wpt/web-platform-tests/network-error-logging/no-report-on-subdomain-404.https.html new file mode 100644 index 00000000000..462f99e8423 --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/no-report-on-subdomain-404.https.html @@ -0,0 +1,30 @@ + + + + + Test that include_subdomains policies do NOT report HTTP errors + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/network-error-logging/no-report-on-subdomain-success.https.html b/tests/wpt/web-platform-tests/network-error-logging/no-report-on-subdomain-success.https.html new file mode 100644 index 00000000000..5fd6d4fb412 --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/no-report-on-subdomain-success.https.html @@ -0,0 +1,30 @@ + + + + + Test that include_subdomains policies do NOT report successful requests + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/network-error-logging/reports-are-not-observable.https.html b/tests/wpt/web-platform-tests/network-error-logging/reports-are-not-observable.https.html new file mode 100644 index 00000000000..35ab4f3c235 --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/reports-are-not-observable.https.html @@ -0,0 +1,29 @@ + + + + + Test that NEL reports are not observable from JavaScript + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-404.https.html b/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-404.https.html new file mode 100644 index 00000000000..38bdc014501 --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-404.https.html @@ -0,0 +1,42 @@ + + + + + Test that NEL reports are sent for HTTP errors + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-subdomain-dns-failure.https.html b/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-subdomain-dns-failure.https.html new file mode 100644 index 00000000000..8913857af8a --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-subdomain-dns-failure.https.html @@ -0,0 +1,46 @@ + + + + + Test that include_subdomains policies report DNS failures for subdomains + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-success-with-subdomain-policy.https.html b/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-success-with-subdomain-policy.https.html new file mode 100644 index 00000000000..fce12cd3e96 --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-success-with-subdomain-policy.https.html @@ -0,0 +1,40 @@ + + + + + Test that NEL reports are sent for successful requests + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-success.https.html b/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-success.https.html new file mode 100644 index 00000000000..68fddaa0c70 --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/sends-report-on-success.https.html @@ -0,0 +1,37 @@ + + + + + Test that NEL reports are sent for successful requests + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/clear-policy-pass.png b/tests/wpt/web-platform-tests/network-error-logging/support/clear-policy-pass.png new file mode 100644 index 00000000000..2fa1e0ac066 Binary files /dev/null and b/tests/wpt/web-platform-tests/network-error-logging/support/clear-policy-pass.png differ diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/clear-policy-pass.png.sub.headers b/tests/wpt/web-platform-tests/network-error-logging/support/clear-policy-pass.png.sub.headers new file mode 100644 index 00000000000..1085b8a987c --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/support/clear-policy-pass.png.sub.headers @@ -0,0 +1,6 @@ +Expires: Mon, 26 Jul 1997 05:00:00 GMT +Cache-Control: no-store, no-cache, must-revalidate +Cache-Control: post-check=0, pre-check=0, false +Pragma: no-cache +Report-To: { "group": "nel-group", "max_age": 0, "endpoints": [] } +NEL: {"max_age": 0} diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/lock.py b/tests/wpt/web-platform-tests/network-error-logging/support/lock.py new file mode 100644 index 00000000000..8c88250bde0 --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/support/lock.py @@ -0,0 +1,38 @@ +_LOCK_KEY = "network-error-logging:lock" +_TIMEOUT = 5 # seconds + +def wait_for_lock(request): + t0 = time.time() + while time.time() - t0 < _TIMEOUT: + time.sleep(0.5) + value = request.server.stash.take(key=_LOCK_KEY) + if value is None: + return True + return False + +def lock(request, report_id): + with request.server.stash.lock: + # Loop until the lock is free + if not wait_for_lock(request): + return (503, [], "Cannot obtain lock") + request.server.stash.put(key=_LOCK_KEY, value=report_id) + return "Obtained lock for %s" % report_id + +def unlock(request, report_id): + with request.server.stash.lock: + lock_holder = request.server.stash.take(key=_LOCK_KEY) + if lock_holder != request_id: + # Return the lock holder to the stash + request.server.stash.put(key=_LOCK_KEY, value=lock_holder) + return (503, [], "Cannot release lock held by %s" % lock_holder) + return "Released lock for %s" % report_id + +def main(request, response): + op = request.GET.first("op") + report_id = request.GET.first("reportID") + if op == "lock": + return lock(request, report_id) + elif op == "unlock": + return unlock(request, report_id) + else: + return (400, [], "Invalid op") diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/nel.sub.js b/tests/wpt/web-platform-tests/network-error-logging/support/nel.sub.js new file mode 100644 index 00000000000..c6b4783bd94 --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/support/nel.sub.js @@ -0,0 +1,169 @@ +const reportID = "{{$id:uuid()}}"; + +/* + * NEL tests have to run serially, since the user agent maintains a global cache + * of Reporting and NEL policies, and we don't want the policies for multiple + * tests to interfere with each other. These functions (along with a Python + * handler in lock.py) implement a simple spin lock. + */ + +function obtainNELLock() { + return fetch("/network-error-logging/support/lock.py?op=lock&reportID=" + reportID); +} + +function releaseNELLock() { + return fetch("/network-error-logging/support/lock.py?op=unlock&reportID=" + reportID); +} + +function nel_test(callback, name, properties) { + promise_test(async t => { + await obtainNELLock(); + await clearReportingAndNELConfigurations(); + await callback(t); + await releaseNELLock(); + }, name, properties); +} + +/* + * Helper functions for constructing domain names that contain NEL policies. + */ +function _monitoredDomain(subdomain) { + if (subdomain == "www") { + return "{{hosts[alt][www]}}" + } else if (subdomain == "www1") { + return "{{hosts[alt][www1]}}" + } else if (subdomain == "www2") { + return "{{hosts[alt][www2]}}" + } else if (subdomain == "nonexistent") { + return "{{hosts[alt][nonexistent]}}" + } else { + return "{{hosts[alt][]}}" + } +} + +function _getNELResourceURL(subdomain, suffix) { + return "https://" + _monitoredDomain(subdomain) + + ":{{ports[https][0]}}/network-error-logging/support/" + suffix; +} + +/* + * Fetches a resource whose headers define a basic NEL policy (i.e., with no + * include_subdomains flag). We ensure that we request the resource from a + * different origin than is used for the main test case HTML file or for report + * uploads. This minimizes the number of reports that are generated for this + * policy. + */ + +function getURLForResourceWithBasicPolicy(subdomain) { + return _getNELResourceURL(subdomain, "pass.png?id="+reportID); +} + +function fetchResourceWithBasicPolicy(subdomain) { + const url = getURLForResourceWithBasicPolicy(subdomain); + return fetch(url, {mode: "no-cors"}); +} + +/* + * Fetches a resource whose headers define an include_subdomains NEL policy. + */ + +function getURLForResourceWithIncludeSubdomainsPolicy(subdomain) { + return _getNELResourceURL(subdomain, "subdomains-pass.png?id="+reportID); +} + +function fetchResourceWithIncludeSubdomainsPolicy(subdomain) { + const url = getURLForResourceWithIncludeSubdomainsPolicy(subdomain); + return fetch(url, {mode: "no-cors"}); +} + +/* + * Fetches a resource whose headers do NOT define a NEL policy. This may or may + * not generate a NEL report, depending on whether you've already successfully + * requested a resource from the same origin that included a NEL policy. + */ + +function getURLForResourceWithNoPolicy(subdomain) { + return _getNELResourceURL(subdomain, "no-policy-pass.png"); +} + +function fetchResourceWithNoPolicy(subdomain) { + const url = getURLForResourceWithNoPolicy(subdomain); + return fetch(url, {mode: "no-cors"}); +} + +/* + * Fetches a resource that doesn't exist. This may or may not generate a NEL + * report, depending on whether you've already successfully requested a resource + * from the same origin that included a NEL policy. + */ + +function getURLForMissingResource(subdomain) { + return _getNELResourceURL(subdomain, "nonexistent.png"); +} + +function fetchMissingResource(subdomain) { + const url = getURLForMissingResource(subdomain); + return fetch(url, {mode: "no-cors"}); +} + +/* + * Fetches resources that clear out any existing Reporting or NEL configurations + * for all origins that any test case might use. + */ + +function getURLForClearingConfiguration(subdomain) { + return _getNELResourceURL(subdomain, "clear-pass.png?id="+reportID); +} + +async function clearReportingAndNELConfigurations(subdomain) { + await Promise.all([ + fetch(getURLForClearingConfiguration(""), {mode: "no-cors"}), + fetch(getURLForClearingConfiguration("www"), {mode: "no-cors"}), + fetch(getURLForClearingConfiguration("www1"), {mode: "no-cors"}), + fetch(getURLForClearingConfiguration("www2"), {mode: "no-cors"}), + ]); + return; +} + +/* + * Returns whether all of the fields in obj1 also exist in obj2 with the same + * values. (Put another way, returns whether obj1 and obj2 are equal, ignoring + * any extra fields in obj2.) + */ + +function _isSubsetOf(obj1, obj2) { + for (const prop in obj1) { + if (typeof obj1[prop] === 'object') { + if (typeof obj2[prop] !== 'object') { + return false; + } + if (!_isSubsetOf(obj1[prop], obj2[prop])) { + return false; + } + } else if (obj1[prop] != obj2[prop]) { + return false; + } + } + return true; +} + +/* + * Verifies that a report was uploaded that contains all of the fields in + * expected. + */ + +async function reportExists(expected) { + var timeout = + document.querySelector("meta[name=timeout][content=long]") ? 50 : 1; + var reportLocation = + "/network-error-logging/support/report.py?op=retrieve_report&timeout=" + + timeout + "&reportID=" + reportID; + const response = await fetch(reportLocation); + const json = await response.json(); + for (const report of json) { + if (_isSubsetOf(expected, report)) { + return true; + } + } + return false; +} diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/no-policy-pass.png b/tests/wpt/web-platform-tests/network-error-logging/support/no-policy-pass.png new file mode 100644 index 00000000000..2fa1e0ac066 Binary files /dev/null and b/tests/wpt/web-platform-tests/network-error-logging/support/no-policy-pass.png differ diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/pass.png b/tests/wpt/web-platform-tests/network-error-logging/support/pass.png new file mode 100644 index 00000000000..2fa1e0ac066 Binary files /dev/null and b/tests/wpt/web-platform-tests/network-error-logging/support/pass.png differ diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/pass.png.sub.headers b/tests/wpt/web-platform-tests/network-error-logging/support/pass.png.sub.headers new file mode 100644 index 00000000000..70796e913ac --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/support/pass.png.sub.headers @@ -0,0 +1,6 @@ +Expires: Mon, 26 Jul 1997 05:00:00 GMT +Cache-Control: no-store, no-cache, must-revalidate +Cache-Control: post-check=0, pre-check=0, false +Pragma: no-cache +Report-To: { "group": "nel-group", "max_age": 10886400, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/network-error-logging/support/report.py?op=put&reportID={{GET[id]}}" }] } +NEL: {"report_to": "nel-group", "max_age": 10886400, "success_fraction": 1.0} diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/report.py b/tests/wpt/web-platform-tests/network-error-logging/support/report.py new file mode 100644 index 00000000000..7c05b51b9eb --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/support/report.py @@ -0,0 +1,52 @@ +import time +import json +import re + +def retrieve_from_stash(request, key, timeout, default_value): + t0 = time.time() + while time.time() - t0 < timeout: + time.sleep(0.5) + value = request.server.stash.take(key=key) + if value is not None: + return json.dumps(value) + + return default_value + +def main(request, response): + # Handle CORS preflight requests + if request.method == 'OPTIONS': + # Always reject preflights for one subdomain + if "www2" in request.headers["Origin"]: + return (400, [], "CORS preflight rejected for www2") + return [ + ("Content-Type", "text/plain"), + ("Access-Control-Allow-Origin", "*"), + ("Access-Control-Allow-Methods", "post"), + ("Access-Control-Allow-Headers", "Content-Type"), + ], "CORS allowed" + + op = request.GET.first("op"); + key = request.GET.first("reportID") + + if op == "retrieve_report": + try: + timeout = float(request.GET.first("timeout")) + except: + timeout = 0.5 + return [("Content-Type", "application/json")], retrieve_from_stash(request, key, timeout, '[]') + + # append new reports + new_reports = json.loads(request.body) + for report in new_reports: + report["metadata"] = { + "content_type": request.headers["Content-Type"], + } + with request.server.stash.lock: + reports = request.server.stash.take(key=key) + if reports is None: + reports = [] + reports.extend(new_reports) + request.server.stash.put(key=key, value=reports) + + # return acknowledgement report + return [("Content-Type", "text/plain")], "Recorded report" diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/subdomains-pass.png b/tests/wpt/web-platform-tests/network-error-logging/support/subdomains-pass.png new file mode 100644 index 00000000000..2fa1e0ac066 Binary files /dev/null and b/tests/wpt/web-platform-tests/network-error-logging/support/subdomains-pass.png differ diff --git a/tests/wpt/web-platform-tests/network-error-logging/support/subdomains-pass.png.sub.headers b/tests/wpt/web-platform-tests/network-error-logging/support/subdomains-pass.png.sub.headers new file mode 100644 index 00000000000..50124b8cfcd --- /dev/null +++ b/tests/wpt/web-platform-tests/network-error-logging/support/subdomains-pass.png.sub.headers @@ -0,0 +1,6 @@ +Expires: Mon, 26 Jul 1997 05:00:00 GMT +Cache-Control: no-store, no-cache, must-revalidate +Cache-Control: post-check=0, pre-check=0, false +Pragma: no-cache +Report-To: { "group": "nel-group", "max_age": 10886400, "include_subdomains": true, "endpoints": [{ "url": "https://{{hosts[][www]}}:{{ports[https][0]}}/network-error-logging/support/report.py?op=put&reportID={{GET[id]}}" }] } +NEL: {"report_to": "nel-group", "max_age": 10886400, "include_subdomains": true, "success_fraction": 1.0} diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/vary.py b/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/vary.py new file mode 100644 index 00000000000..59e39bc2ae7 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/vary.py @@ -0,0 +1,25 @@ +def main(request, response): + if "clear-vary-value-override-cookie" in request.GET: + response.unset_cookie("vary-value-override") + return "vary cookie cleared" + + set_cookie_vary = request.GET.first("set-vary-value-override-cookie", + default="") + if set_cookie_vary: + response.set_cookie("vary-value-override", set_cookie_vary) + return "vary cookie set" + + # If there is a vary-value-override cookie set, then use its value + # for the VARY header no matter what the query string is set to. This + # override is necessary to test the case when two URLs are identical + # (including query), but differ by VARY header. + cookie_vary = request.cookies.get("vary-value-override"); + if cookie_vary: + response.headers.set("vary", cookie_vary) + else: + # If there is no cookie, then use the query string value, if present. + query_vary = request.GET.first("vary", default="") + if query_vary: + response.headers.set("vary", query_vary) + + return "vary response" diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-add.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-add.js index c03faeb0e83..a482c42eaeb 100644 --- a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-add.js +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-add.js @@ -267,4 +267,84 @@ cache_test(function(cache, test) { 'twice.'); }, 'Cache.addAll called with the same Request object specified twice'); +cache_test(async function(cache, test) { + const url = '../resources/vary.py?vary=x-shape'; + let requests = [ + new Request(url, { headers: { 'x-shape': 'circle' }}), + new Request(url, { headers: { 'x-shape': 'square' }}), + ]; + let result = await cache.addAll(requests); + assert_equals(result, undefined, 'Cache.addAll() should succeed'); + }, 'Cache.addAll should succeed when entries differ by vary header'); + +cache_test(async function(cache, test) { + const url = '../resources/vary.py?vary=x-shape'; + let requests = [ + new Request(url, { headers: { 'x-shape': 'circle' }}), + new Request(url, { headers: { 'x-shape': 'circle' }}), + ]; + await promise_rejects( + test, + 'InvalidStateError', + cache.addAll(requests), + 'Cache.addAll() should reject when entries are duplicate by vary header'); + }, 'Cache.addAll should reject when entries are duplicate by vary header'); + +// VARY header matching is asymmetric. Determining if two entries are duplicate +// depends on which entry's response is used in the comparison. The target +// response's VARY header determines what request headers are examined. This +// test verifies that Cache.addAll() duplicate checking handles this asymmetric +// behavior correctly. +cache_test(async function(cache, test) { + const base_url = '../resources/vary.py'; + + // Define a request URL that sets a VARY header in the + // query string to be echoed back by the server. + const url = base_url + '?vary=x-size'; + + // Set a cookie to override the VARY header of the response + // when the request is made with credentials. This will + // take precedence over the query string vary param. This + // is a bit confusing, but it's necessary to construct a test + // where the URL is the same, but the VARY headers differ. + // + // Note, the test could also pass this information in additional + // request headers. If the cookie approach becomes too unwieldy + // this test could be rewritten to use that technique. + await fetch(base_url + '?set-vary-value-override-cookie=x-shape'); + test.add_cleanup(_ => fetch(base_url + '?clear-vary-value-override-cookie')); + + let requests = [ + // This request will result in a Response with a "Vary: x-shape" + // header. This *will not* result in a duplicate match with the + // other entry. + new Request(url, { headers: { 'x-shape': 'circle', + 'x-size': 'big' }, + credentials: 'same-origin' }), + + // This request will result in a Response with a "Vary: x-size" + // header. This *will* result in a duplicate match with the other + // entry. + new Request(url, { headers: { 'x-shape': 'square', + 'x-size': 'big' }, + credentials: 'omit' }), + ]; + await promise_rejects( + test, + 'InvalidStateError', + cache.addAll(requests), + 'Cache.addAll() should reject when one entry has a vary header ' + + 'matching an earlier entry.'); + + // Test the reverse order now. + await promise_rejects( + test, + 'InvalidStateError', + cache.addAll(requests.reverse()), + 'Cache.addAll() should reject when one entry has a vary header ' + + 'matching a later entry.'); + + }, 'Cache.addAll should reject when one entry has a vary header ' + + 'matching another entry'); + done(); diff --git a/tests/wpt/web-platform-tests/trusted-types/DOMParser-parseFromString.tentative.html b/tests/wpt/web-platform-tests/trusted-types/DOMParser-parseFromString.tentative.html new file mode 100644 index 00000000000..2fe9b31b787 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/DOMParser-parseFromString.tentative.html @@ -0,0 +1,22 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/DOMParser-requiresTrustedTypes.tentative.html b/tests/wpt/web-platform-tests/trusted-types/DOMParser-requiresTrustedTypes.tentative.html deleted file mode 100644 index 7e21feabd24..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/DOMParser-requiresTrustedTypes.tentative.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/DOMParser.tentative.html b/tests/wpt/web-platform-tests/trusted-types/DOMParser.tentative.html deleted file mode 100644 index 53d2b44febd..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/DOMParser.tentative.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/Document-write.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Document-write.tentative.html new file mode 100644 index 00000000000..3a63e923543 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/Document-write.tentative.html @@ -0,0 +1,15 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/Element-insertAdjacentHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Element-insertAdjacentHTML.tentative.html new file mode 100644 index 00000000000..599ade44ec1 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/Element-insertAdjacentHTML.tentative.html @@ -0,0 +1,38 @@ + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/trusted-types/Element-outerHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Element-outerHTML.tentative.html new file mode 100644 index 00000000000..a0bb6c1a5e3 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/Element-outerHTML.tentative.html @@ -0,0 +1,24 @@ + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/trusted-types/HTMLElement-generic.tentative.html b/tests/wpt/web-platform-tests/trusted-types/HTMLElement-generic.tentative.html index 486b008986b..cea32a5a2df 100644 --- a/tests/wpt/web-platform-tests/trusted-types/HTMLElement-generic.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/HTMLElement-generic.tentative.html @@ -6,7 +6,7 @@ diff --git a/tests/wpt/web-platform-tests/trusted-types/Location-assign.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Location-assign.tentative.html new file mode 100644 index 00000000000..13cca567948 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/Location-assign.tentative.html @@ -0,0 +1,15 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/Location-href.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Location-href.tentative.html new file mode 100644 index 00000000000..d759d28593e --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/Location-href.tentative.html @@ -0,0 +1,15 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/Location-replace.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Location-replace.tentative.html new file mode 100644 index 00000000000..7d84905d198 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/Location-replace.tentative.html @@ -0,0 +1,15 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/Range-createContextualFragment.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Range-createContextualFragment.tentative.html new file mode 100644 index 00000000000..3d45b33486d --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/Range-createContextualFragment.tentative.html @@ -0,0 +1,17 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedHTML.tentative.html deleted file mode 100644 index a8d4e78b06d..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/TrustedHTML.tentative.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedScriptURL.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedScriptURL.tentative.html deleted file mode 100644 index 92bc87f1e1d..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/TrustedScriptURL.tentative.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html index 863fe847141..76e6d130b05 100644 --- a/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/TrustedTypePolicyFactory-createPolicy.tentative.html @@ -4,11 +4,296 @@ diff --git a/tests/wpt/web-platform-tests/trusted-types/TrustedURL.tentative.html b/tests/wpt/web-platform-tests/trusted-types/TrustedURL.tentative.html deleted file mode 100644 index 5048326fad8..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/TrustedURL.tentative.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/Window-open.tentative.html b/tests/wpt/web-platform-tests/trusted-types/Window-open.tentative.html new file mode 100644 index 00000000000..c005fbba143 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/Window-open.tentative.html @@ -0,0 +1,27 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html new file mode 100644 index 00000000000..cc575dc0085 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html new file mode 100644 index 00000000000..28813d72e0e --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Document-write.tentative.html @@ -0,0 +1,35 @@ + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html new file mode 100644 index 00000000000..ad94b44e8fb --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html @@ -0,0 +1,97 @@ + + + + + + + + + + +
+ + + diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-outerHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html similarity index 55% rename from tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-outerHTML.tentative.html rename to tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html index 8cf6c4b065a..47f1165b1a6 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-outerHTML.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html @@ -12,6 +12,22 @@ diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html index 79bbb24f541..eae52626190 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html @@ -9,7 +9,7 @@ diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-location-assign.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html similarity index 55% rename from tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-location-assign.tentative.html rename to tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html index 76725da7c72..8079335bc58 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-location-assign.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-assign.tentative.html @@ -9,18 +9,15 @@ + + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-location-replace.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html similarity index 55% rename from tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-location-replace.tentative.html rename to tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html index 9736a84b3ad..872f14e1448 100644 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-location-replace.tentative.html +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Location-replace.tentative.html @@ -9,18 +9,15 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html new file mode 100644 index 00000000000..f5712295d30 --- /dev/null +++ b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-Window-open.tentative.html @@ -0,0 +1,63 @@ + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-createContextualFragment.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-createContextualFragment.tentative.html deleted file mode 100644 index 1d67a51ff6a..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-createContextualFragment.tentative.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-innerHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-innerHTML.tentative.html deleted file mode 100644 index 67faf6ea7d3..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-innerHTML.tentative.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html deleted file mode 100644 index 70bb803442f..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-insertAdjacentHTML.tentative.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - -
- - - diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-location-href.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-location-href.tentative.html deleted file mode 100644 index 07cc4d5fe29..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-location-href.tentative.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-window-open.tentative.html b/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-window-open.tentative.html deleted file mode 100644 index 2c3a8ce0566..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/block-string-assignment-to-window-open.tentative.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/createContextualFragment.tentative.html b/tests/wpt/web-platform-tests/trusted-types/createContextualFragment.tentative.html deleted file mode 100644 index 5e50acc8065..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/createContextualFragment.tentative.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/document-write.tentative.html b/tests/wpt/web-platform-tests/trusted-types/document-write.tentative.html deleted file mode 100644 index 12794199722..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/document-write.tentative.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/innerHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/innerHTML.tentative.html deleted file mode 100644 index f9f32d42a76..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/innerHTML.tentative.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/insertAdjacentHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/insertAdjacentHTML.tentative.html deleted file mode 100644 index a95dd6c0bac..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/insertAdjacentHTML.tentative.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - -
- diff --git a/tests/wpt/web-platform-tests/trusted-types/location-assign.tentative.html b/tests/wpt/web-platform-tests/trusted-types/location-assign.tentative.html deleted file mode 100644 index 07cb4a80196..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/location-assign.tentative.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/location-href.tentative.html b/tests/wpt/web-platform-tests/trusted-types/location-href.tentative.html deleted file mode 100644 index 2527fbf4847..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/location-href.tentative.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/location-replace.tentative.html b/tests/wpt/web-platform-tests/trusted-types/location-replace.tentative.html deleted file mode 100644 index 097c24d593a..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/location-replace.tentative.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/outerHTML.tentative.html b/tests/wpt/web-platform-tests/trusted-types/outerHTML.tentative.html deleted file mode 100644 index 1deb46bf5e3..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/outerHTML.tentative.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - -
- diff --git a/tests/wpt/web-platform-tests/trusted-types/srcDoc-requiresTrustedTypes.tentative.html b/tests/wpt/web-platform-tests/trusted-types/srcDoc-requiresTrustedTypes.tentative.html deleted file mode 100644 index b957488bee4..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/srcDoc-requiresTrustedTypes.tentative.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/srcDoc.tentative.html b/tests/wpt/web-platform-tests/trusted-types/srcDoc.tentative.html deleted file mode 100644 index b23703e2232..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/srcDoc.tentative.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - diff --git a/tests/wpt/web-platform-tests/trusted-types/support/helper.sub.js b/tests/wpt/web-platform-tests/trusted-types/support/helper.sub.js index 91112d8f239..b5435917bec 100644 --- a/tests/wpt/web-platform-tests/trusted-types/support/helper.sub.js +++ b/tests/wpt/web-platform-tests/trusted-types/support/helper.sub.js @@ -1,70 +1,88 @@ -var STRINGS = { - unescapedHTML: "This has ', \", >, <, & & characters!", - escapedHTML: "<html>This has ', ", >, <, &amp; & characters!</html>", - unescapedText: "This has ', \", >, <, & & characters!", +var INPUTS = { + HTML: "Hi, I want to be transformed!", + SCRIPT: "Hi, I want to be transformed!", + SCRIPTURL: "http://this.is.a.scripturl.test/", + URL: "http://hello.i.am.an.url/" }; -var URLS = { - safe: "http://{{host}}:{{ports[http][0]}}/", - javascript: "javascript:'scripted'", - external: "custom-handler:whatever", - sanitized: "about:invalid" +var RESULTS = { + HTML: "Quack, I want to be a duck!", + SCRIPT: "Meow, I want to be a cat!", + SCRIPTURL: "http://this.is.a.successful.test/", + URL: "http://hooray.i.am.successfully.transformed/" }; -function createFrameAndWrite(html) { - return new Promise((resolve, reject) => { - var i = document.createElement('iframe'); - i.onload = e => { - i.contentDocument.open(); - try { - i.contentDocument.write(html); - } catch (e) { - i.remove(); - reject(e); - } - i.contentDocument.close(); - resolve(i); - }; - document.body.appendChild(i); - }); +function createHTMLJS(html) { + return html.replace("Hi", "Quack") + .replace("transformed", "a duck"); } -function createFrameAndHref(href) { - return new Promise((resolve, reject) => { - var i = document.createElement('iframe'); - i.onload = _ => { - i.onload = null; - try { - i.onload = _ => resolve(i); - i.contentWindow.location.href = href; - } catch (ex) { - i.remove(); - reject(ex); - } - }; - document.body.appendChild(i); - }); +function createScriptJS(script) { + return script.replace("Hi", "Meow") + .replace("transformed", "a cat"); } -let trustedHTML = TrustedHTML.escape(STRINGS.unescapedHTML); -function assert_accepts_trusted_html(tag, attribute) { +function createScriptURLJS(scripturl) { + return scripturl.replace("scripturl", "successful"); +} + +function createURLJS(url) { + return url.replace("hello", "hooray") + .replace("an.url", "successfully.transformed"); +} + +function createHTML_policy(win) { + return win.trustedTypes.createPolicy('SomeName', { createHTML: createHTMLJS }); +} + +function createScript_policy(win) { + return win.trustedTypes.createPolicy('SomeName', { createScript: createScriptJS }); +} + +function createScriptURL_policy(win) { + return win.trustedTypes.createPolicy('SomeName', { createScriptURL: createScriptURLJS }); +} + +function createURL_policy(win) { + return win.trustedTypes.createPolicy('SomeName', { createURL: createURLJS }); +} + +function assert_element_accepts_trusted_html(win, t, tag, attribute, expected) { + createHTML_policy(win) + .then(t.step_func_done(p => { + let html = p.createHTML(INPUTS.HTML); + assert_element_accepts_trusted_type(tag, attribute, html, expected); + })); +} + +function assert_element_accepts_trusted_script(win, t, tag, attribute, expected) { + createScript_policy(win) + .then(t.step_func_done(p => { + let script = p.createScript(INPUTS.SCRIPT); + assert_element_accepts_trusted_type(tag, attribute, script, expected); + })); +} + +function assert_element_accepts_trusted_script_url(win, t, tag, attribute, expected) { + createScriptURL_policy(win) + .then(t.step_func_done(p => { + let scripturl = p.createScriptURL(INPUTS.SCRIPTURL); + assert_element_accepts_trusted_type(tag, attribute, scripturl, expected); + })); +} + +function assert_element_accepts_trusted_url(win, t, tag, attribute, expected) { + createURL_policy(win) + .then(t.step_func_done(p => { + let url = p.createURL(INPUTS.URL); + assert_element_accepts_trusted_type(tag, attribute, url, expected); + })); +} + +function assert_element_accepts_trusted_type(tag, attribute, value, expected) { let elem = document.createElement(tag); - elem[attribute] = trustedHTML; - assert_equals(elem[attribute] + "", STRINGS.unescapedHTML); -} - -let trustedURL = TrustedURL.create(URLS.safe); -function assert_accepts_trusted_url(tag, attribute) { - let elem = document.createElement(tag); - elem[attribute] = trustedURL; - assert_equals(elem[attribute] + "", URLS.safe); -} - -let trustedScriptURL = TrustedScriptURL.unsafelyCreate(URLS.safe); -function assert_accepts_trusted_script_url(tag, attribute) { - let elem = document.createElement(tag); - elem[attribute] = trustedScriptURL; - assert_equals(elem[attribute] + "", URLS.safe); + elem[attribute] = value; + assert_equals(elem[attribute] + "", expected); } function assert_throws_no_trusted_type(tag, attribute, value) { diff --git a/tests/wpt/web-platform-tests/trusted-types/window-open.tentative.html b/tests/wpt/web-platform-tests/trusted-types/window-open.tentative.html deleted file mode 100644 index 66ffbd78399..00000000000 --- a/tests/wpt/web-platform-tests/trusted-types/window-open.tentative.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - diff --git a/tests/wpt/web-platform-tests/wake-lock/wakelock-api.https.html b/tests/wpt/web-platform-tests/wake-lock/wakelock-api.https.html index 7ec4fc2827a..45a906dfa1f 100644 --- a/tests/wpt/web-platform-tests/wake-lock/wakelock-api.https.html +++ b/tests/wpt/web-platform-tests/wake-lock/wakelock-api.https.html @@ -12,7 +12,7 @@ promise_test(async t => { const wakeLock = await navigator.getWakeLock("screen"); const request = wakeLock.createRequest(); assert_true(wakeLock instanceof WakeLock, "wakeLock is a WakeLock"); - assert_true(wakeLock.type instanceof WakeLockType, "wakeLock.type is a WakeLockType"); + assert_equals(typeof wakeLock.type, "string", "the type of wakeLock.type is string"); assert_equals(typeof wakeLock.active, "boolean", "the type of wakeLock.active is boolean"); assert_true(request instanceof WakeLockRequest, "request is a WakeLockRequest"); }, "Test that the Wake Lock API is correct"); diff --git a/tests/wpt/web-platform-tests/wake-lock/wakelock-type.https.html b/tests/wpt/web-platform-tests/wake-lock/wakelock-type.https.html index 6f6413d1a91..2f9e1242614 100644 --- a/tests/wpt/web-platform-tests/wake-lock/wakelock-type.https.html +++ b/tests/wpt/web-platform-tests/wake-lock/wakelock-type.https.html @@ -18,11 +18,11 @@ promise_test(async t => { }, "Test that wakeLock.type is 'system' when system wake lock is invoked"); promise_test(t => { - return promise_rejects(t, new DOMException("", "NotSupportedError"), navigator.getWakeLock()); -}, "'NotSupportedError' is thrown when set an empty wake lock type"); + return promise_rejects(t, new TypeError(), navigator.getWakeLock()); +}, "'TypeError' is thrown when set an empty wake lock type"); promise_test(t => { - return promise_rejects(t, new DOMException("", "NotSupportedError"), navigator.getWakeLock("unsupported")); -}, "'NotSupportedError' is thrown when set an unsupported wake lock type"); + return promise_rejects(t, new TypeError(), navigator.getWakeLock("unsupported")); +}, "'TypeError' is thrown when set an unsupported wake lock type"); diff --git a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py b/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py index 49b1d68e7d2..48fdf64f2f9 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/add_cookie/add.py @@ -1,5 +1,7 @@ from datetime import datetime, timedelta +from webdriver.transport import Response + from tests.support.asserts import assert_error, assert_success from tests.support.fixtures import clear_all_cookies @@ -10,6 +12,12 @@ def add_cookie(session, cookie): {"cookie": cookie}) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/cookie".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_null_response_value(session, url): new_cookie = { "name": "hello", diff --git a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/send_keys.py b/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/send_keys.py index 0d281d7f5cb..03cc94850c6 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/send_keys.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/element_send_keys/send_keys.py @@ -1,6 +1,7 @@ import pytest from webdriver import Element +from webdriver.transport import Response from tests.support.asserts import assert_error, assert_success from tests.support.inline import inline @@ -14,6 +15,16 @@ def element_send_keys(session, element, text): {"text": text}) +def test_null_parameter_value(session, http): + session.url = inline("") + element = session.find.css("input", all=False) + + path = "/session/{session_id}/element/{element_id}/value".format( + session_id=session.session_id, element_id=element.id) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_null_response_value(session): session.url = inline("") element = session.find.css("input", all=False) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/execute_async.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/execute_async.py index 2b6e6154317..7c454eaf4ac 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/execute_async.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_async_script/execute_async.py @@ -1,5 +1,7 @@ import pytest +from webdriver.transport import Response + from tests.support.asserts import assert_error, assert_success @@ -13,6 +15,12 @@ def execute_async_script(session, script, args=None): body) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/execute/async".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_no_browsing_context(session, closed_window): response = execute_async_script(session, "argument[0](1);") assert_error(response, "no such window") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py index 632d4ed8b3f..9e220d02687 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/execute_script/execute.py @@ -1,5 +1,7 @@ import pytest +from webdriver.transport import Response + from tests.support.asserts import assert_error, assert_success @@ -14,6 +16,12 @@ def execute_script(session, script, args=None): body) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/execute/sync".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_no_browsing_context(session, closed_window): response = execute_script(session, "return 1;") assert_error(response, "no such window") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element/find.py b/tests/wpt/web-platform-tests/webdriver/tests/find_element/find.py index ad25e78e9e4..20cde541d11 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/find_element/find.py @@ -1,5 +1,7 @@ import pytest +from webdriver.transport import Response + from tests.support.asserts import assert_error, assert_same_element, assert_success from tests.support.inline import inline @@ -10,6 +12,12 @@ def find_element(session, using, value): {"using": using, "value": value}) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/element".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_no_browsing_context(session, closed_window): response = find_element(session, "css selector", "foo") assert_error(response, "no such window") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/find.py b/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/find.py index d44fbb3957b..56e216bb646 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/find.py @@ -1,5 +1,7 @@ import pytest +from webdriver.transport import Response + from tests.support.asserts import assert_error, assert_same_element, assert_success from tests.support.inline import inline @@ -12,6 +14,16 @@ def find_element(session, element_id, using, value): {"using": using, "value": value}) +def test_null_parameter_value(session, http): + session.url = inline("") + element = session.find.css("div", all=False) + + path = "/session/{session_id}/element/{element_id}/element".format( + session_id=session.session_id, element_id=element.id) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_no_browsing_context(session, closed_window): response = find_element(session, "notReal", "css selector", "foo") assert_error(response, "no such window") @@ -80,7 +92,7 @@ def test_find_element_partial_link_text(session, document, value): assert_success(response) -@pytest.mark.parametrize("using,value",[("css selector", "#wontExist")]) +@pytest.mark.parametrize("using,value", [("css selector", "#wontExist")]) def test_no_element(session, using, value): # Step 8 - 9 session.url = inline("
") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements/find.py b/tests/wpt/web-platform-tests/webdriver/tests/find_elements/find.py index f6856e9ed6e..b31370ee0cd 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/find_elements/find.py @@ -1,5 +1,7 @@ import pytest +from webdriver.transport import Response + from tests.support.asserts import assert_error, assert_same_element, assert_success from tests.support.inline import inline @@ -10,6 +12,12 @@ def find_elements(session, using, value): {"using": using, "value": value}) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/elements".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_no_browsing_context(session, closed_window): response = find_elements(session, "css selector", "foo") assert_error(response, "no such window") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_element/find.py b/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_element/find.py index bcc18642c8f..5a48e9c76ef 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_element/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/find_elements_from_element/find.py @@ -1,5 +1,7 @@ import pytest +from webdriver.transport import Response + from tests.support.asserts import assert_error, assert_same_element, assert_success from tests.support.inline import inline @@ -12,6 +14,16 @@ def find_elements(session, element_id, using, value): {"using": using, "value": value}) +def test_null_parameter_value(session, http): + session.url = inline("") + element = session.find.css("div", all=False) + + path = "/session/{session_id}/element/{element_id}/elements".format( + session_id=session.session_id, element_id=element.id) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_no_browsing_context(session, closed_window): response = find_elements(session, "notReal", "css selector", "foo") assert_error(response, "no such window") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/get.py b/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/get.py new file mode 100644 index 00000000000..c6a90f93c1b --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/get.py @@ -0,0 +1,16 @@ +from tests.support.asserts import assert_error, assert_success + + +def get_window_handle(session): + return session.transport.send( + "GET", "session/{session_id}/window".format(**vars(session))) + + +def test_no_browsing_context(session, closed_window): + response = get_window_handle(session) + assert_error(response, "no such window") + + +def test_basic(session): + response = get_window_handle(session) + assert_success(response, session.window_handle) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/user_prompts.py new file mode 100644 index 00000000000..0bd660cfa1f --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_window_handle/user_prompts.py @@ -0,0 +1,61 @@ +# META: timeout=long + +import pytest + +from tests.support.asserts import assert_success + + +def get_window_handle(session): + return session.transport.send( + "GET", "session/{session_id}/window".format(**vars(session))) + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog): + def check_user_prompt_not_closed_but_exception(dialog_type): + window_handle = session.window_handle + + create_dialog(dialog_type, text=dialog_type) + + response = get_window_handle(session) + assert_success(response, window_handle) + + assert session.alert.text == dialog_type + session.alert.dismiss() + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_accept(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_accept_and_notify(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_dismiss(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_dismiss_and_notify(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_default(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/get.py b/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/get.py new file mode 100644 index 00000000000..07ff9d4d26f --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/get.py @@ -0,0 +1,38 @@ +from tests.support.asserts import assert_success + + +def get_window_handles(session): + return session.transport.send( + "GET", "session/{session_id}/window/handles".format(**vars(session))) + + +def test_no_browsing_context(session, create_window): + window_handles = session.handles + + new_handle = create_window() + session.window_handle = new_handle + session.close() + + response = get_window_handles(session) + assert_success(response, window_handles) + + +def test_single_window(session): + response = get_window_handles(session) + value = assert_success(response) + + assert len(value) == 1 + assert value == session.handles + assert value[0] == session.window_handle + + +def test_multiple_windows(session, create_window): + original_handle = session.window_handle + new_handle = create_window() + + response = get_window_handles(session) + value = assert_success(response) + + assert len(value) == 2 + assert original_handle in value + assert new_handle in value diff --git a/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/user_prompts.py b/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/user_prompts.py new file mode 100644 index 00000000000..217e9849b44 --- /dev/null +++ b/tests/wpt/web-platform-tests/webdriver/tests/get_window_handles/user_prompts.py @@ -0,0 +1,61 @@ +# META: timeout=long + +import pytest + +from tests.support.asserts import assert_success + + +def get_window_handles(session): + return session.transport.send( + "GET", "session/{session_id}/window/handles".format(**vars(session))) + + +@pytest.fixture +def check_user_prompt_not_closed_but_exception(session, create_dialog): + def check_user_prompt_not_closed_but_exception(dialog_type): + window_handles = session.handles + + create_dialog(dialog_type, text=dialog_type) + + response = get_window_handles(session) + assert_success(response, window_handles) + + assert session.alert.text == dialog_type + session.alert.dismiss() + + return check_user_prompt_not_closed_but_exception + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_accept(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "accept and notify"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_accept_and_notify(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_dismiss(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "dismiss and notify"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_dismiss_and_notify(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.capabilities({"unhandledPromptBehavior": "ignore"}) +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_ignore(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) + + +@pytest.mark.parametrize("dialog_type", ["alert", "confirm", "prompt"]) +def test_default(check_user_prompt_not_closed_but_exception, dialog_type): + check_user_prompt_not_closed_but_exception(dialog_type) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/navigate.py b/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/navigate.py index 9ac1be00b84..e478e10b76b 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/navigate.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/navigate_to/navigate.py @@ -1,3 +1,5 @@ +from webdriver.transport import Response + from tests.support.asserts import assert_error, assert_success from tests.support.inline import inline @@ -8,6 +10,12 @@ def navigate_to(session, url): {"url": url}) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/url".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_null_response_value(session): response = navigate_to(session, inline("
")) value = assert_success(response) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py b/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py index 9d4532a190c..edc37d6edb4 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/send_alert_text/send.py @@ -1,5 +1,7 @@ import pytest +from webdriver.transport import Response + from tests.support.asserts import assert_error, assert_success from tests.support.inline import inline @@ -10,6 +12,12 @@ def send_alert_text(session, text=None): {"text": text}) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/alert/text".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_null_response_value(session, url): session.url = inline("") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py b/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py index 8dd0344dca5..e603e217ec7 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/set_timeouts/set.py @@ -1,4 +1,6 @@ -from tests.support.asserts import assert_success +from webdriver.transport import Response + +from tests.support.asserts import assert_error, assert_success def set_timeouts(session, timeouts): @@ -7,6 +9,12 @@ def set_timeouts(session, timeouts): timeouts) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/timeouts".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_null_response_value(session): response = set_timeouts(session, {"implicit": 1000}) value = assert_success(response) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/set_window_rect/set.py b/tests/wpt/web-platform-tests/webdriver/tests/set_window_rect/set.py index 17210af4f46..928fd622efc 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/set_window_rect/set.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/set_window_rect/set.py @@ -2,6 +2,8 @@ import pytest +from webdriver.transport import Response + from tests.support.asserts import assert_error, assert_success @@ -22,6 +24,12 @@ def is_fullscreen(session): """) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/window/rect".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_no_browsing_context(session, closed_window): response = set_window_rect(session, {}) assert_error(response, "no such window") diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py b/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py index daeccb70e94..64427b4670f 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/support/fixtures.py @@ -294,10 +294,11 @@ def clear_all_cookies(session): def closed_window(session, create_window): - new_handle = create_window() original_handle = session.window_handle + new_handle = create_window() session.window_handle = new_handle + session.close() assert new_handle not in session.handles, "Unable to close window {}".format(new_handle) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/support/http_request.py b/tests/wpt/web-platform-tests/webdriver/tests/support/http_request.py index ae28a6486b1..5e46d97017e 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/support/http_request.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/support/http_request.py @@ -1,5 +1,8 @@ import contextlib import httplib +import json + +from six import text_type class HTTPRequest(object): @@ -13,11 +16,26 @@ class HTTPRequest(object): def get(self, path): return self._request("GET", path) + def post(self, path, body): + return self._request("POST", path, body) + @contextlib.contextmanager - def _request(self, method, path): + def _request(self, method, path, body=None): + payload = None + + if body is not None: + try: + payload = json.dumps(body) + except ValueError: + raise ValueError("Failed to encode request body as JSON: {}".format( + json.dumps(body, indent=2))) + + if isinstance(payload, text_type): + payload = body.encode("utf-8") + conn = httplib.HTTPConnection(self.host, self.port) try: - conn.request(method, path) + conn.request(method, path, payload) yield conn.getresponse() finally: conn.close() diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/switch.py b/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/switch.py index 40304795866..10948102239 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/switch.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/switch_to_frame/switch.py @@ -1,4 +1,5 @@ import webdriver.protocol as protocol +from webdriver.transport import Response from tests.support.asserts import assert_error, assert_success from tests.support.inline import inline, iframe @@ -12,6 +13,12 @@ def switch_to_frame(session, frame): session=session) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/frame".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_null_response_value(session): session.url = inline(iframe("

foo")) frame_element = session.find.css("iframe", all=False) diff --git a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_window/switch.py b/tests/wpt/web-platform-tests/webdriver/tests/switch_to_window/switch.py index 17f7c4da328..907be66a149 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/switch_to_window/switch.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/switch_to_window/switch.py @@ -1,4 +1,6 @@ -from tests.support.asserts import assert_success +from webdriver.transport import Response + +from tests.support.asserts import assert_error, assert_success def switch_to_window(session, handle): @@ -7,6 +9,12 @@ def switch_to_window(session, handle): {"handle": handle}) +def test_null_parameter_value(session, http): + path = "/session/{session_id}/window".format(**vars(session)) + with http.post(path, None) as response: + assert_error(Response.from_http(response), "invalid argument") + + def test_null_response_value(session, create_window): new_handle = create_window()