diff options
145 files changed, 2703 insertions, 365 deletions
diff --git a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini index 3a3d15b8406..947e223fb28 100644 --- a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini @@ -14,9 +14,6 @@ [Revoke blob URL after creating Request, will fetch] expected: FAIL - [Revoke blob URL after calling fetch, fetch should succeed] - expected: FAIL - [url-with-fetch.any.html] [Untitled] @@ -37,6 +34,3 @@ [Revoke blob URL after creating Request, will fetch] expected: FAIL - [Revoke blob URL after calling fetch, fetch should succeed] - expected: FAIL - diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index bd2e474e4c9..19099fce0f9 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -130303,6 +130303,18 @@ {} ] ], + "css/css-lists/list-marker-symbol-bidi.html": [ + [ + "css/css-lists/list-marker-symbol-bidi.html", + [ + [ + "/css/css-lists/list-marker-symbol-bidi-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-lists/list-marker-with-lineheight-and-overflow-hidden-001.html": [ [ "css/css-lists/list-marker-with-lineheight-and-overflow-hidden-001.html", @@ -154223,6 +154235,18 @@ {} ] ], + "css/css-text/word-break/word-break-break-all-inline-008.html": [ + [ + "css/css-text/word-break/word-break-break-all-inline-008.html", + [ + [ + "/css/css-text/word-break/reference/word-break-break-all-010-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-text/word-break/word-break-break-word-overflow-wrap-interactions.html": [ [ "css/css-text/word-break/word-break-break-word-overflow-wrap-interactions.html", @@ -154331,6 +154355,78 @@ {} ] ], + "css/css-text/word-break/word-break-min-content-001.html": [ + [ + "css/css-text/word-break/word-break-min-content-001.html", + [ + [ + "/css/css-text/overflow-wrap/reference/overflow-wrap-min-content-size-001-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-text/word-break/word-break-min-content-002.html": [ + [ + "css/css-text/word-break/word-break-min-content-002.html", + [ + [ + "/css/css-text/overflow-wrap/reference/overflow-wrap-min-content-size-003-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-text/word-break/word-break-min-content-003.html": [ + [ + "css/css-text/word-break/word-break-min-content-003.html", + [ + [ + "/css/css-text/word-break/reference/word-break-break-all-010-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-text/word-break/word-break-min-content-004.html": [ + [ + "css/css-text/word-break/word-break-min-content-004.html", + [ + [ + "/css/css-text/word-break/reference/word-break-break-all-010-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-text/word-break/word-break-min-content-005.html": [ + [ + "css/css-text/word-break/word-break-min-content-005.html", + [ + [ + "/css/css-text/overflow-wrap/reference/overflow-wrap-min-content-size-003-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-text/word-break/word-break-min-content-006.html": [ + [ + "css/css-text/word-break/word-break-min-content-006.html", + [ + [ + "/css/css-text/overflow-wrap/reference/overflow-wrap-min-content-size-002-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-text/word-break/word-break-normal-001.html": [ [ "css/css-text/word-break/word-break-normal-001.html", @@ -237198,6 +237294,9 @@ "css/CSS2/positioning/left-offset-percentage-002-ref.xht": [ [] ], + "css/CSS2/positioning/line-break-after-leading-oof-001-ref.html": [ + [] + ], "css/CSS2/positioning/position-006-ref.xht": [ [] ], @@ -251568,6 +251667,9 @@ "css/css-lists/list-item-definition-ref.html": [ [] ], + "css/css-lists/list-marker-symbol-bidi-ref.html": [ + [] + ], "css/css-lists/list-marker-with-lineheight-and-overflow-hidden-001-ref.html": [ [] ], @@ -264423,6 +264525,12 @@ "docs/assets/reftest_graph_example.svg": [ [] ], + "docs/assets/testharness-tutorial-test-screenshot-1.png": [ + [] + ], + "docs/assets/testharness-tutorial-test-screenshot-2.png": [ + [] + ], "docs/conf.py": [ [] ], @@ -264555,6 +264663,9 @@ "docs/writing-tests/testharness-api.md": [ [] ], + "docs/writing-tests/testharness-tutorial.md": [ + [] + ], "docs/writing-tests/testharness.md": [ [] ], @@ -268161,6 +268272,9 @@ "html/browsers/sandboxing/noscript-iframe.html": [ [] ], + "html/browsers/sandboxing/sandbox-new-execution-context-iframe.html": [ + [] + ], "html/browsers/sandboxing/sandbox-parse-noscript-ref.html": [ [] ], @@ -280668,9 +280782,6 @@ "service-workers/service-worker/ServiceWorkerGlobalScope/resources/update-worker.py": [ [] ], - "service-workers/service-worker/fetch-error-worker.js": [ - [] - ], "service-workers/service-worker/multi-globals/current/current.https.html": [ [] ], @@ -280968,6 +281079,9 @@ "service-workers/service-worker/resources/fetch-csp-iframe.html.sub.headers": [ [] ], + "service-workers/service-worker/resources/fetch-error-worker.js": [ + [] + ], "service-workers/service-worker/resources/fetch-event-add-async-worker.js": [ [] ], @@ -334466,6 +334580,12 @@ {} ] ], + "dom/collections/HTMLCollection-own-props.html": [ + [ + "dom/collections/HTMLCollection-own-props.html", + {} + ] + ], "dom/collections/HTMLCollection-supported-property-indices.html": [ [ "dom/collections/HTMLCollection-supported-property-indices.html", @@ -336023,6 +336143,12 @@ {} ] ], + "dom/nodes/aria-attribute-reflection.tentative.html": [ + [ + "dom/nodes/aria-attribute-reflection.tentative.html", + {} + ] + ], "dom/nodes/aria-element-reflection.tentative.html": [ [ "dom/nodes/aria-element-reflection.tentative.html", @@ -353800,6 +353926,12 @@ {} ] ], + "html/browsers/sandboxing/sandbox-new-execution-context.html": [ + [ + "html/browsers/sandboxing/sandbox-new-execution-context.html", + {} + ] + ], "html/browsers/the-window-object/BarProp.window.js": [ [ "html/browsers/the-window-object/BarProp.window.html", @@ -360466,6 +360598,14 @@ {} ] ], + "html/semantics/forms/historical-search-event.html": [ + [ + "html/semantics/forms/historical-search-event.html", + { + "testdriver": true + } + ] + ], "html/semantics/forms/historical.html": [ [ "html/semantics/forms/historical.html", @@ -360818,6 +360958,12 @@ {} ] ], + "html/semantics/forms/the-input-element/checkbox-detached-change-event.html": [ + [ + "html/semantics/forms/the-input-element/checkbox-detached-change-event.html", + {} + ] + ], "html/semantics/forms/the-input-element/checkbox.html": [ [ "html/semantics/forms/the-input-element/checkbox.html", @@ -361022,6 +361168,12 @@ {} ] ], + "html/semantics/forms/the-input-element/radio-detached-change-event.html": [ + [ + "html/semantics/forms/the-input-element/radio-detached-change-event.html", + {} + ] + ], "html/semantics/forms/the-input-element/radio-groupname-case.html": [ [ "html/semantics/forms/the-input-element/radio-groupname-case.html", @@ -421179,15 +421331,15 @@ } ] ], - "web-animations/interfaces/Document/getAnimations.html": [ + "web-animations/interfaces/Document/timeline.html": [ [ - "web-animations/interfaces/Document/getAnimations.html", + "web-animations/interfaces/Document/timeline.html", {} ] ], - "web-animations/interfaces/Document/timeline.html": [ + "web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html": [ [ - "web-animations/interfaces/Document/timeline.html", + "web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html", {} ] ], @@ -443344,6 +443496,12 @@ {} ] ], + "css/CSS2/positioning/line-break-after-leading-oof-001.html": [ + [ + "css/CSS2/positioning/line-break-after-leading-oof-001.html", + {} + ] + ], "css/CSS2/positioning/position-001.xht": [ [ "css/CSS2/positioning/position-001.xht", @@ -464972,7 +465130,7 @@ "testharness" ], "animation-worklet/stateful-animator.https.html": [ - "b83590650b19756872c95de8117a248d65c764b0", + "be29fa109cba3b2117d5029f4a70f091a440b324", "testharness" ], "animation-worklet/worklet-animation-animator-name.https.html": [ @@ -469040,7 +469198,7 @@ "support" ], "conformance-checkers/html-aria/_functional/tree/js/prototype.js": [ - "b0e0675867afd4374b2d72935eee422d55c84770", + "c14b177230a50e661b04ff43aefb5a333a54f41b", "support" ], "conformance-checkers/html-aria/accessible-name-input/checkbox-title.html": [ @@ -528839,6 +528997,14 @@ "12c00cf82a57380cdcf5001dcbfc09841a6edfc5", "reftest" ], + "css/CSS2/positioning/line-break-after-leading-oof-001-ref.html": [ + "50c682eddc782d1539a097d2da2fc0f44c44f573", + "support" + ], + "css/CSS2/positioning/line-break-after-leading-oof-001.html": [ + "b00c48156edbfb87a7cdbc2137cda8197c4e9eda", + "visual" + ], "css/CSS2/positioning/position-001.xht": [ "2e5b573ab527eb8f73cd66652b9f06482e8a43e7", "visual" @@ -552828,7 +552994,7 @@ "manual" ], "css/css-animations/animation-fill-mode-001-manual.html": [ - "7c38164b2d825f5a5491a73ea43b8f13daac8e7c", + "2176672367274201489bb5885d3cd00d3bb01fc9", "manual" ], "css/css-animations/animation-fill-mode-002-manual.html": [ @@ -552836,7 +553002,7 @@ "manual" ], "css/css-animations/animation-fill-mode-003-manual.html": [ - "bd5a93245b39979f61c294c9ddaf5111c8947eed", + "561237d2673624b0d11b44e41a36df6b19bb582c", "manual" ], "css/css-animations/animation-fill-mode-004-manual.html": [ @@ -578211,6 +578377,14 @@ "14e351f9ecd34356087fc5ec7361d8e4d9b542e0", "reftest" ], + "css/css-lists/list-marker-symbol-bidi-ref.html": [ + "cf213d731f33201fc6863544f18bf97c51eb2a3c", + "support" + ], + "css/css-lists/list-marker-symbol-bidi.html": [ + "e82d9ae1567111038ee9927bda124956df1ebf03", + "reftest" + ], "css/css-lists/list-marker-with-lineheight-and-overflow-hidden-001-ref.html": [ "ae6486147e28502db80f6b887b1a6b16c30184f2", "support" @@ -578296,7 +578470,7 @@ "reftest" ], "css/css-lists/nested-list-with-list-style-type-none.html": [ - "e103113c3f4d98ed34b4cdda04bd436469d01f54", + "325459df8a2bdb5e23083fe6ee3961dde0fd2027", "testharness" ], "css/css-lists/nested-marker-dynamic.html": [ @@ -584240,7 +584414,7 @@ "reftest" ], "css/css-pseudo/parsing/tree-abiding-pseudo-elements.html": [ - "4997ae4f564d382fafd03e742a4b706d7e98fc80", + "05c23a3bc143ce2a005b3686af2eae2cb60cb7ba", "testharness" ], "css/css-pseudo/placeholder-input-number-notref.html": [ @@ -597967,6 +598141,10 @@ "bc5a08d38a505b1b08f204e6d243b43fa3dd34bc", "reftest" ], + "css/css-text/word-break/word-break-break-all-inline-008.html": [ + "930ae436fe4f1c91b60e9a84c0925e679b6ddfc0", + "reftest" + ], "css/css-text/word-break/word-break-break-word-crash-001.html": [ "894a6f3aa0ce257a92926158b75a29986a98e079", "testharness" @@ -598011,6 +598189,30 @@ "6532e41609ff6eb2870003ad6761b45f2b60fdae", "reftest" ], + "css/css-text/word-break/word-break-min-content-001.html": [ + "20b610180b359bfdf7da5720d2e962af2ba6343f", + "reftest" + ], + "css/css-text/word-break/word-break-min-content-002.html": [ + "0f5d18ff4b262a8716864c401f2e7f223adbcab3", + "reftest" + ], + "css/css-text/word-break/word-break-min-content-003.html": [ + "84e7cfe872f9af121f5836638db51a306e119c52", + "reftest" + ], + "css/css-text/word-break/word-break-min-content-004.html": [ + "efa61b9cd8af65bdb354ef7b07e7008f8a3b6511", + "reftest" + ], + "css/css-text/word-break/word-break-min-content-005.html": [ + "ccbf9887054c24dc1ddc32cd73945cad087c08b8", + "reftest" + ], + "css/css-text/word-break/word-break-min-content-006.html": [ + "0d772a2d88cfc1f4a9b4ae482fa64a38279b04f2", + "reftest" + ], "css/css-text/word-break/word-break-normal-001.html": [ "61ccba2465f772c46a771a8868e9036ff4a93b9d", "reftest" @@ -612636,11 +612838,11 @@ "reftest" ], "css/css-writing-modes/sizing-orthog-htb-in-vlr-004-ref.xht": [ - "5f971974b8dd0998fddc71a33b5c0020e09f6c8d", + "a7557f928237c68c9e9717feb0be8c0e75e7e8de", "support" ], "css/css-writing-modes/sizing-orthog-htb-in-vlr-004.xht": [ - "cd1529ce42116abbc68c1a1a25170607ec8021b1", + "b7322a0083cbd04a20083b5ddf07ef767dd6da5b", "reftest" ], "css/css-writing-modes/sizing-orthog-htb-in-vlr-006-ref.xht": [ @@ -612764,7 +612966,7 @@ "reftest" ], "css/css-writing-modes/sizing-orthog-htb-in-vrl-001-ref.xht": [ - "297457f62c2c575a931be4a21cc1158014aa7ee1", + "e423259f0dbba089c9f3865684b48e853849569e", "support" ], "css/css-writing-modes/sizing-orthog-htb-in-vrl-001.xht": [ @@ -615268,11 +615470,11 @@ "reftest" ], "css/css-writing-modes/wm-propagation-body-scroll-offset-vertical-lr.html": [ - "8c59532b1a50777337007c2b932b1df42067e18f", + "ecab4a84e224ca8f099107af452a6d8746e77816", "testharness" ], "css/css-writing-modes/wm-propagation-body-scroll-offset-vertical-rl.html": [ - "523928f9ad8e40e4f539e81724cb905b1b18159f", + "eb327b00c093239024ef64ace7e76b6bf7cf92aa", "testharness" ], "css/css-writing-modes/wm-propagation-svg-root-scrollbar.svg": [ @@ -630767,6 +630969,14 @@ "48e6488dbb47dc8fccab9193bb34871f2bb930a2", "support" ], + "docs/assets/testharness-tutorial-test-screenshot-1.png": [ + "5195ba25ae647acdc1dc9cd3877d1204abab95df", + "support" + ], + "docs/assets/testharness-tutorial-test-screenshot-2.png": [ + "0010a57173121330bae8df3c3f851db10cffcb67", + "support" + ], "docs/conf.py": [ "e425667ce888dabed639ff29a7e051d3aedcdd0f", "support" @@ -630888,7 +631098,7 @@ "support" ], "docs/writing-tests/index.md": [ - "c4da79c0d8a4832c690fd64cffdebb8da4c23869", + "88e279b0ad128d168efc9be3d25209c8ebfec21e", "support" ], "docs/writing-tests/lint-tool.md": [ @@ -630943,8 +631153,12 @@ "5883308cc66957b1b7215825fd0ea6c7aa1ca74a", "support" ], + "docs/writing-tests/testharness-tutorial.md": [ + "dceb674ac4d643f420a0fdd84da2e37051f4b474", + "support" + ], "docs/writing-tests/testharness.md": [ - "7d38742a7402beeaa011da3bbc0231692c550268", + "17ee097ce185d07ac7353a1541c5c30593b9c387", "support" ], "docs/writing-tests/tools.md": [ @@ -630979,6 +631193,10 @@ "4fc34db7f5f245933013a76335f71e9f4cffe115", "testharness" ], + "dom/collections/HTMLCollection-own-props.html": [ + "1f21c0837ec92bf48b6f497da22e60a435913a06", + "testharness" + ], "dom/collections/HTMLCollection-supported-property-indices.html": [ "62ee6bb6abf69e1a4f1b24937c184f86815aca79", "testharness" @@ -632219,6 +632437,10 @@ "8d9ce2e3ff604ee43807ee0eb1962870439725a9", "testharness" ], + "dom/nodes/aria-attribute-reflection.tentative.html": [ + "0a3a66bdf435ebef64a282eaec8f7a471096daaf", + "testharness" + ], "dom/nodes/aria-element-reflection.tentative.html": [ "848828810f160d5ac01f11bf41b27230b9738800", "testharness" @@ -633552,7 +633774,7 @@ "testharness" ], "element-timing/scroll-to-text.html": [ - "a86dd85ce9c8b8bb2709e2078eff02dd5e19484f", + "ed332740323b076f160121dbd14390f246413c36", "testharness" ], "element-timing/supported-element-type.html": [ @@ -637568,7 +637790,7 @@ "testharness" ], "fetch/api/request/request-init-stream.any.js": [ - "22e3f41bc2d8a38dd097e61145e213e3febbd108", + "df5fb26a0d8fc0d77ea967102be33035b780cea2", "testharness" ], "fetch/api/request/request-keepalive-quota.html": [ @@ -637768,7 +637990,7 @@ "testharness" ], "fetch/api/response/response-static-error.html": [ - "6e927a8bf6267bb9cc7a6f0ad38d332480f5c9ab", + "b2d6e82d4279b7c911f38e4fe8294d03b51ec9f3", "testharness" ], "fetch/api/response/response-static-redirect.html": [ @@ -639656,7 +639878,7 @@ "manual" ], "fullscreen/api/element-ready-check-containing-iframe-manual.tentative.html": [ - "66d9c4316137115a9e29644985c835cb029c8fd9", + "08c420ec0243d67c831124f825e39be492513129", "manual" ], "fullscreen/api/element-ready-check-fullscreen-element-sibling-manual.html": [ @@ -640828,7 +641050,7 @@ "testharness" ], "html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-function-parent.html": [ - "bd2d9dfdb1e58b72b258047793be1bc4f07a3cf4", + "2efc3a6b4a64a8d0e7ded64e7f1eb3f95b3dc634", "testharness" ], "html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-function-src.html": [ @@ -640840,7 +641062,7 @@ "testharness" ], "html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-src-about-blank.html": [ - "dce6ab2f6934b93d3d6fb9bda5e6c3eb7fc72366", + "0f8a633f1df345ca13937f35fc62d1538695b080", "testharness" ], "html/browsers/browsing-the-web/navigating-across-documents/source/support/dummy.html": [ @@ -640920,7 +641142,7 @@ "testharness" ], "html/browsers/browsing-the-web/scroll-to-fragid/scroll-frag-percent-encoded.html": [ - "e8a1e9fd767ce3c744cb6f7e09beb33ab45e1540", + "aa179425c5bb6e8e521ac9871a2afe06829ca518", "testharness" ], "html/browsers/browsing-the-web/scroll-to-fragid/scroll-position-vertical-lr.html": [ @@ -640944,7 +641166,7 @@ "testharness" ], "html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-top.html": [ - "3265a71bf7ca88cc9c4d867be48b3318c59c683c", + "bf62e4cd55c3d15a29b918bdff596ce941a7d8af", "testharness" ], "html/browsers/browsing-the-web/unloading-documents/001.html": [ @@ -642259,6 +642481,14 @@ "1bc116ada46d39b0e7b17dc448cab0c33707057a", "testharness" ], + "html/browsers/sandboxing/sandbox-new-execution-context-iframe.html": [ + "dc15d57c6a352e045ef59d6103ac1540ebc3ad82", + "support" + ], + "html/browsers/sandboxing/sandbox-new-execution-context.html": [ + "6692257bc416114df6c29a2b63586646f5113925", + "testharness" + ], "html/browsers/sandboxing/sandbox-parse-noscript-ref.html": [ "9cf92768f78d2c82df18e3cdb34f8692933439a1", "support" @@ -648924,7 +649154,7 @@ "testharness" ], "html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/tabindex-getter.html": [ - "773739804b3aeaea268080317cd0cb79fba486d7", + "785e8c91ffa55d9bba670bccb979225f7af91a1a", "testharness" ], "html/interaction/focus/tabindex-focus-flag.html": [ @@ -648968,7 +649198,7 @@ "testharness" ], "html/interaction/focus/the-autofocus-attribute/not-on-first-task.html": [ - "50efc176935c710f43a42c31ecc0b7676e96b833", + "ab27342f4fea4eca9138539a119dc47159908ae8", "testharness" ], "html/interaction/focus/the-autofocus-attribute/queue-non-focusable.html": [ @@ -649172,7 +649402,7 @@ "support" ], "html/rendering/non-replaced-elements/flow-content-0/dialog-display.html": [ - "19f8d54df8242940dc0c1a06e0995ab590ec857f", + "48b0e33d9445aef98dd3ff6d5f03fca1fc5eb6e9", "testharness" ], "html/rendering/non-replaced-elements/flow-content-0/dialog.html": [ @@ -649360,7 +649590,7 @@ "reftest" ], "html/rendering/non-replaced-elements/margin-collapsing-quirks/compare-computed-style.js": [ - "b25993fb7303b82469b3dffcc8846c3a54298ca5", + "496bae3a101924975b6a6be3a0d1bf91d78bbd2e", "support" ], "html/rendering/non-replaced-elements/margin-collapsing-quirks/multicol-quirks-mode.html": [ @@ -649520,11 +649750,11 @@ "testharness" ], "html/rendering/non-replaced-elements/tables/table-vspace-hspace-s.html": [ - "dae70b394a5a8415429eb10c4dcf70c947bbe10b", + "9f462b5768621858ce152b96c835f8c737b3be02", "testharness" ], "html/rendering/non-replaced-elements/tables/table-vspace-hspace.html": [ - "9a951954e28b2fe634dd17954b42618cdaa8ec6d", + "c081775b8736b618dbad45525ce6b16bfb81a6aa", "testharness" ], "html/rendering/non-replaced-elements/tables/table-width-150percent-ref.html": [ @@ -649980,7 +650210,7 @@ "testharness" ], "html/rendering/non-replaced-elements/the-page/iframe-marginwidth-marginheight.html": [ - "b5b49d1b86787c5bbc35e960927e008c26cfa0fc", + "b09cafbbe4252b735860e21bd9830bd82f639b03", "testharness" ], "html/rendering/non-replaced-elements/the-page/support/body-marginwidth-marginheight.html": [ @@ -650524,19 +650754,19 @@ "support" ], "html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html": [ - "09454a13b20343df287fa530ed90738fa0f0ae27", + "3bf8cfb6cc8949ec30f3491660f01fb452307ccb", "testharness" ], "html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2.html": [ - "f5c4e991829535e739f4a543ba9c6e2a7f1ec7b1", + "cc7eb5e5e0298c1a3edeaef55c0103c14e8372d9", "testharness" ], "html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/dynamic-append.html": [ - "e0896269f308b206db8fc5cf4226311ccbded520", + "4d2fa7894037361075b20097df491bac953bc958", "testharness" ], "html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree.html": [ - "ec979732e6f032d5a2c4ce6099bc02a34732c7f6", + "2a9f301fffb81da7a764cd7d9b8a99c1269316ee", "testharness" ], "html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html": [ @@ -650544,7 +650774,7 @@ "testharness" ], "html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document.html": [ - "66a067fcd84fa5453813b59fa0995d8e35be8f63", + "1e608a3456bbef3c65c1402a23cd7884830f2753", "testharness" ], "html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/support/;url=foo": [ @@ -651268,7 +651498,7 @@ "testharness" ], "html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks.html": [ - "cf1b98c2bceafb32652da39197a4da31d7ea9694", + "930d9cbd5b7059ca7c89f2bd3460828fc924ab1d", "testharness" ], "html/semantics/embedded-content/media-elements/ready-states/autoplay.html": [ @@ -653228,19 +653458,19 @@ "testharness" ], "html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_01.html": [ - "efd563f51ac0544ddeb842895d5dbeea62e58de1", + "900d8cd02268dd53f9cb1a8ac2fba16ca4b889d8", "testharness" ], "html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_02.html": [ - "dbe266b2930a67b7e6af7f0386327d0d74a8f8d6", + "d82dafe3ceccfe1dfe2f1c42bc6dd86bdd6bff6d", "testharness" ], "html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_03.html": [ - "c07dd42dc81359a9223033c98ec64cabf30c2cdb", + "5db77ad8902ac8bea17cbd3b131479c3a87d0a96", "testharness" ], "html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_04.html": [ - "755cd45d34b7c174e9e8a81bf055bee6f0975a3d", + "bd076948abe43e00a3bd4252c4fc41aa7f914ddb", "testharness" ], "html/semantics/embedded-content/the-iframe-element/same_origin_child.html": [ @@ -653388,7 +653618,7 @@ "testharness" ], "html/semantics/embedded-content/the-iframe-element/srcdoc_change_hash.html": [ - "457a07f9e2fb3340f7f874d7e434d38b1dd788d0", + "fe72333d1a638966e14e46fdb6b0bdf21beaa75d", "testharness" ], "html/semantics/embedded-content/the-iframe-element/srcdoc_process_attributes.html": [ @@ -653624,7 +653854,7 @@ "testharness" ], "html/semantics/embedded-content/the-img-element/data-url.html": [ - "2fa630043907676d031f3da3c0bc85f56131347d", + "808b5c884c564e52beec9e42437ed5fff4264748", "testharness" ], "html/semantics/embedded-content/the-img-element/decode/image-decode-iframe.html": [ @@ -653792,7 +654022,7 @@ "support" ], "html/semantics/embedded-content/the-img-element/srcset/avoid-reload-on-resize.html": [ - "a8038e5605760b4bcdd4c8bdca47cede880ad7a9", + "52366dcaa7f7638b27adabe1b1007c5baca98580", "testharness" ], "html/semantics/embedded-content/the-img-element/srcset/common.js": [ @@ -653828,7 +654058,7 @@ "testharness" ], "html/semantics/embedded-content/the-img-element/update-src-complete.html": [ - "267c008298309a41e80edad911cfc626b5f301ea", + "de3926a2964598bb73e5257e99b6ce196e2bbecd", "testharness" ], "html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html": [ @@ -654215,8 +654445,12 @@ "0fa9774ce4f15be8909a0aceaa4879e9c5ab39c1", "support" ], + "html/semantics/forms/historical-search-event.html": [ + "b7a089a68e4fd9e22c2bdbd107ee41ef355786cc", + "testharness" + ], "html/semantics/forms/historical.html": [ - "6873ecd251741fb8436a377081d5a6d3de53b7ab", + "277e12416104b0d2171ed7c4eb735e0ca2067988", "testharness" ], "html/semantics/forms/resetting-a-form/reset-event.html": [ @@ -654583,6 +654817,10 @@ "5051fdd4e6f825526ab2de418ce426a81e6dddc2", "testharness" ], + "html/semantics/forms/the-input-element/checkbox-detached-change-event.html": [ + "43420790fdb5434a74df08fa51caf6997a2d77c8", + "testharness" + ], "html/semantics/forms/the-input-element/checkbox.html": [ "c48083d685538c61414b6dc9ca6d40aed964dfe9", "testharness" @@ -654755,6 +654993,10 @@ "ef01c29727758db5832aae37040e0b1aa9c0fd26", "testharness" ], + "html/semantics/forms/the-input-element/radio-detached-change-event.html": [ + "d1b18014981932209f1e65a73f35523bb18e04f4", + "testharness" + ], "html/semantics/forms/the-input-element/radio-groupname-case.html": [ "3c54aca3e76bafe4c409ed33b7833dc982fea693", "testharness" @@ -658752,7 +658994,7 @@ "testharness" ], "html/user-activation/activation-api-iframe-no-activate.tenative.html": [ - "8c7610e28b0be7cb876e2706d712d82db15bfb69", + "bd34518ba883d923067ff0921883387e73a42595", "testharness" ], "html/user-activation/activation-api-iframe.tenative.html": [ @@ -660080,19 +660322,19 @@ "testharness" ], "html/webappapis/timers/negative-setinterval.html": [ - "430d13c58aab69b4a57317bbfc9acfec7a6e3ab1", + "663872cd1f3850ffccbc199f6e92267bfcf65652", "testharness" ], "html/webappapis/timers/negative-settimeout.html": [ - "57e88ee701d80714098b6c710aa661048dbe2182", + "b59fc8f22984c8329119763ea68214d2e46fa8a1", "testharness" ], "html/webappapis/timers/type-long-setinterval.html": [ - "af0299599846680f1fa4106c5f3f6a2fe26d0e1e", + "7fb81ff29ac3a99e2408b51e4cfe7c7b5bd49e17", "testharness" ], "html/webappapis/timers/type-long-settimeout.html": [ - "31fa4f1264211e050864147db24216465e1ac62f", + "4dc7d17ea5f13f9bb379d4acae89263da138c0c9", "testharness" ], "html/webappapis/update-rendering/child-document-raf-order.html": [ @@ -661824,7 +662066,7 @@ "support" ], "interfaces/web-nfc.idl": [ - "b13d047c551db4c74bb8467dda287d5e004d8cb3", + "d2ec623e864141152f9ca2ac79b5252b246257bf", "support" ], "interfaces/web-share.idl": [ @@ -661888,7 +662130,7 @@ "support" ], "interfaces/webxr.idl": [ - "262fa2423afbe2ebb80a0db33994c8520c0d6c52", + "1dab90eff4901a6cf493ae08593e0832f1be548c", "support" ], "interfaces/worklets.idl": [ @@ -667764,11 +668006,11 @@ "testharness" ], "mixed-content/spec.src.json": [ - "e4844a8016b6f3242a1b8dc1110461cd39ff1e33", + "c272bb3f642bfd71ace5e4bcab4a66cadaf732c5", "support" ], "mixed-content/spec_json.js": [ - "009a853077b5c37c6eeae9f87f0be75109c584fd", + "00428b1fa5e6396b82484d33cf36589a8c64dd9a", "support" ], "mst-content-hint/META.yml": [ @@ -676024,7 +676266,7 @@ "testharness" ], "pointerevents/pointerevent_capture_mouse.html": [ - "d8d54db6ba302eff8e2df5c5fe13c209b3183a55", + "32056f09cc1fade179f2528205920b61479b9783", "testharness" ], "pointerevents/pointerevent_capture_suppressing_mouse-manual.html": [ @@ -689568,11 +689810,11 @@ "testharness" ], "referrer-policy/spec.src.json": [ - "ab02dcc1b16e0621ef241b375654a3cd41345e31", + "2674a45d6db37fdd2fed84bf08fea51b5432f456", "support" ], "referrer-policy/spec_json.js": [ - "1b507dbcf14ed32abdf0953f0e0abdaecd73efe9", + "8a15eaee1ebd7886a1f80dc7dc0bac46b08f595d", "support" ], "remote-playback/META.yml": [ @@ -690388,7 +690630,7 @@ "support" ], "resources/chromium/nfc-mock.js": [ - "d279fcf40d82525ec8e7ee628d267c2168ed7cd7", + "811c0aeafceed8e16148ae4c678b55733fc6c8b8", "support" ], "resources/chromium/sensor.mojom.js": [ @@ -690836,7 +691078,7 @@ "support" ], "resources/testharness.js": [ - "9f7426b7d36a093806790fc35aad28e29ff34e06", + "a44185c1eaf97d89dd023d75354da588873905a4", "support" ], "resources/testharness.js.headers": [ @@ -692575,12 +692817,8 @@ "4f176220d6100c4efb1bfda817b84cf5f53a4f3d", "testharness" ], - "service-workers/service-worker/fetch-error-worker.js": [ - "788252cf3b3b3e5aaaf7013abd2d6940f298a40e", - "support" - ], "service-workers/service-worker/fetch-error.https.html": [ - "901c158f60197e92ec7eaa78989a8ce799e2d8c0", + "ca2f884a9b391acf273a877f5a47338b3fe1130f", "testharness" ], "service-workers/service-worker/fetch-event-add-async.https.html": [ @@ -693427,6 +693665,10 @@ "300efe049b5de8810f7c44863e11c280ca2926f3", "support" ], + "service-workers/service-worker/resources/fetch-error-worker.js": [ + "788252cf3b3b3e5aaaf7013abd2d6940f298a40e", + "support" + ], "service-workers/service-worker/resources/fetch-event-add-async-worker.js": [ "a5a44a57c99cb3a289f0015168609852729d50a5", "support" @@ -694684,7 +694926,7 @@ "testharness" ], "shadow-dom/focus/focus-method-delegatesFocus.html": [ - "babe1760c70fcc4faeba096d7640165e4d0ccab8", + "9c61f663f88a177e1a0c1c6be6a35a40b120d8d7", "testharness" ], "shadow-dom/focus/focus-selector-delegatesFocus.html": [ @@ -701240,7 +701482,7 @@ "support" ], "tools/ci/azure/cleanup_win10.yml": [ - "195cdee8edfb3bd8cd58ac2dc132b63bcb7d531a", + "76852b58cd39f057ae4441b26fd423714b07f445", "support" ], "tools/ci/azure/com.apple.Safari.plist": [ @@ -701360,7 +701602,7 @@ "support" ], "tools/ci/website_build.sh": [ - "d23829f0bcdab7cd4c3b966c8a3fea711737a0d8", + "f6b26310aabce200fc0d77844f5f3ad28de0bb7f", "support" ], "tools/conftest.py": [ @@ -701660,7 +701902,7 @@ "support" ], "tools/manifest/vcs.py": [ - "d87e804c35918ad336acd6800a037676e95b1ee1", + "d4f47f6bf0ab35c9da514edb4c4b779644ff90dd", "support" ], "tools/mypy.ini": [ @@ -706304,7 +706546,7 @@ "support" ], "tools/wptrunner/requirements_webkit.txt": [ - "25cc5846ee7204923217396191996e15fd23dc13", + "f85779a40bd50db1e24dc032ec43a7444341905b", "support" ], "tools/wptrunner/setup.py": [ @@ -706552,7 +706794,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/executormarionette.py": [ - "77fe297194012a6f1313cc2ef9b4382d30185d8b", + "14f456aa4767d86eccd330f1ee691d4ef87f44ba", "support" ], "tools/wptrunner/wptrunner/executors/executoropera.py": [ @@ -706564,7 +706806,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/executorselenium.py": [ - "5246a26fcbf47917ced9ea52b6efa3271544f2d3", + "913a5e6d54225b9c1c77f2b5518955fa726c4fce", "support" ], "tools/wptrunner/wptrunner/executors/executorservo.py": [ @@ -706572,11 +706814,11 @@ "support" ], "tools/wptrunner/wptrunner/executors/executorservodriver.py": [ - "12a750fa0a34e6a74fe0e18671e5c85fe45a06e0", + "67a433d9a588245138f97fb8028a5a349f308f1d", "support" ], "tools/wptrunner/wptrunner/executors/executorwebdriver.py": [ - "65b6723cb82609fea5aa81e523d7639b610c92f4", + "a2601978b578aa546fd5d38c1bb997719ae27d41", "support" ], "tools/wptrunner/wptrunner/executors/executorwebkit.py": [ @@ -706708,7 +706950,7 @@ "support" ], "tools/wptrunner/wptrunner/testrunner.py": [ - "c2cb5c4d26b2866c069537ceb5a96da623d11bb6", + "56fbf08111994ca449949b38a6bed2ce9a7a2fb4", "support" ], "tools/wptrunner/wptrunner/tests/__init__.py": [ @@ -706792,7 +707034,7 @@ "support" ], "tools/wptrunner/wptrunner/webdriver_server.py": [ - "8b711272c7befe890fab4824868118fc13275eca", + "162ffae3fc93aeeb29a2535e829af45b9e15c1f3", "support" ], "tools/wptrunner/wptrunner/wptcommandline.py": [ @@ -710824,7 +711066,7 @@ "support" ], "url/resources/setters_tests.json": [ - "6b7d19b10164a38901abc70345663a550d4ee737", + "d54335f1badecac9d01594ec6e631d6d11e68328", "support" ], "url/resources/toascii.json": [ @@ -712779,14 +713021,14 @@ "5124e5095724521c721b8781dcfc92ff573f48e8", "testharness" ], - "web-animations/interfaces/Document/getAnimations.html": [ - "f6a6c3edd447ccf42da4598db7e771a0ab99b04f", - "testharness" - ], "web-animations/interfaces/Document/timeline.html": [ "b8b4d74d5e536a111449fd0268424ac06a151b95", "testharness" ], + "web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html": [ + "4730f186b34a426b6dd657b113b6e408e0a08b55", + "testharness" + ], "web-animations/interfaces/DocumentTimeline/constructor.html": [ "ca0997ac8f9012b7d019760be97e09fa0f837179", "testharness" @@ -713108,7 +713350,7 @@ "testharness" ], "web-nfc/NDEFReader_scan.https.html": [ - "0a3610099486c6d61c4f9171a2d87950e75cd4e5", + "3fe95cc91478aea7426e882743814723c4517ec6", "testharness" ], "web-nfc/NDEFReader_scan_iframe.https.html": [ @@ -713128,11 +713370,11 @@ "manual" ], "web-nfc/NDEFWriter_push.https.html": [ - "b909bee3171dcfa56af951f2d4a351487bd9705e", + "0d5722bfa019610633cef78d0d2164b2e55de8bb", "testharness" ], "web-nfc/README.md": [ - "87145b0e3ec0064457dfdcaa6bc6cd2595b88afb", + "0787f1f6712e669e1c858940a11da9b22c9c565b", "support" ], "web-nfc/idlharness.https.window.js": [ diff --git a/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-001.html.ini b/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-001.html.ini new file mode 100644 index 00000000000..3ba7eb5584f --- /dev/null +++ b/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-001.html.ini @@ -0,0 +1,2 @@ +[word-break-min-content-001.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-002.html.ini b/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-002.html.ini new file mode 100644 index 00000000000..a99d99d6ec9 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-002.html.ini @@ -0,0 +1,2 @@ +[word-break-min-content-002.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-004.html.ini b/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-004.html.ini new file mode 100644 index 00000000000..5e0ed296c95 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-004.html.ini @@ -0,0 +1,2 @@ +[word-break-min-content-004.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-005.html.ini b/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-005.html.ini new file mode 100644 index 00000000000..50024d9fcfc --- /dev/null +++ b/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-005.html.ini @@ -0,0 +1,2 @@ +[word-break-min-content-005.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-006.html.ini b/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-006.html.ini new file mode 100644 index 00000000000..505329f9ad9 --- /dev/null +++ b/tests/wpt/metadata/css/css-text/word-break/word-break-min-content-006.html.ini @@ -0,0 +1,2 @@ +[word-break-min-content-006.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/css-transforms/animation/perspective-interpolation.html.ini b/tests/wpt/metadata/css/css-transforms/animation/perspective-interpolation.html.ini index c511d92d674..03f2f3fe9d1 100644 --- a/tests/wpt/metadata/css/css-transforms/animation/perspective-interpolation.html.ini +++ b/tests/wpt/metadata/css/css-transforms/animation/perspective-interpolation.html.ini @@ -1,4 +1,5 @@ [perspective-interpolation.html] + expected: CRASH [ perspective interpolation] expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini b/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini index 0269091c011..41fde289810 100644 --- a/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini +++ b/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-handleEvent.html.ini @@ -3,9 +3,6 @@ [throws if handleEvent is falsy and not callable] expected: NOTRUN - [looks up handleEvent method on every event dispatch] - expected: FAIL - [rethrows errors when getting handleEvent] expected: TIMEOUT diff --git a/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini b/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini index c884dc82eab..7fe95a6c291 100644 --- a/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini +++ b/tests/wpt/metadata/css/cssom-view/MediaQueryList-addListener-removeListener.html.ini @@ -2,6 +2,6 @@ [listeners are called when <iframe> is resized] expected: FAIL - [listeners are called correct number of times] + [listener that was added twice is called only once] expected: FAIL diff --git a/tests/wpt/metadata/dom/collections/HTMLCollection-own-props.html.ini b/tests/wpt/metadata/dom/collections/HTMLCollection-own-props.html.ini new file mode 100644 index 00000000000..de00e9f62ca --- /dev/null +++ b/tests/wpt/metadata/dom/collections/HTMLCollection-own-props.html.ini @@ -0,0 +1,4 @@ +[HTMLCollection-own-props.html] + [Setting array index while indexed property doesn't exist (strict)] + expected: FAIL + diff --git a/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini new file mode 100644 index 00000000000..c3916f8555d --- /dev/null +++ b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini @@ -0,0 +1,2 @@ +[contenttype_txt.html] + expected: CRASH diff --git a/tests/wpt/metadata/dom/nodes/aria-attribute-reflection.tentative.html.ini b/tests/wpt/metadata/dom/nodes/aria-attribute-reflection.tentative.html.ini new file mode 100644 index 00000000000..dcba3565fbe --- /dev/null +++ b/tests/wpt/metadata/dom/nodes/aria-attribute-reflection.tentative.html.ini @@ -0,0 +1,112 @@ +[aria-attribute-reflection.tentative.html] + [aria-relevant attribute reflects.] + expected: FAIL + + [aria-required attribute reflects.] + expected: FAIL + + [aria-busy attribute reflects.] + expected: FAIL + + [aria-current attribute reflects.] + expected: FAIL + + [aria-valuetext attribute reflects.] + expected: FAIL + + [aria-atomic attribute reflects.] + expected: FAIL + + [aria-label attribute reflects.] + expected: FAIL + + [aria-setsize attribute reflects.] + expected: FAIL + + [aria-rowcount attribute reflects.] + expected: FAIL + + [aria-valuemax attribute reflects.] + expected: FAIL + + [role attribute reflects.] + expected: FAIL + + [aria-sort attribute reflects.] + expected: FAIL + + [aria-placeholder attribute reflects.] + expected: FAIL + + [aria-live attribute reflects.] + expected: FAIL + + [aria-valuenow attribute reflects.] + expected: FAIL + + [aria-colcount attribute reflects.] + expected: FAIL + + [aria-checked attribute reflects.] + expected: FAIL + + [aria-rowspan attribute reflects.] + expected: FAIL + + [aria-pressed attribute reflects.] + expected: FAIL + + [aria-hidden attribute reflects.] + expected: FAIL + + [aria-multiselectable attribute reflects.] + expected: FAIL + + [aria-autocomplete attribute reflects.] + expected: FAIL + + [aria-posinset attribute reflects.] + expected: FAIL + + [aria-rowindex attribute reflects.] + expected: FAIL + + [aria-valuemin attribute reflects.] + expected: FAIL + + [aria-level attribute reflects.] + expected: FAIL + + [aria-disabled attribute reflects.] + expected: FAIL + + [aria-orientation attribute reflects.] + expected: FAIL + + [aria-colspan attribute reflects.] + expected: FAIL + + [aria-colindex attribute reflects.] + expected: FAIL + + [aria-roledescription attribute reflects.] + expected: FAIL + + [aria-haspopup attribute reflects.] + expected: FAIL + + [aria-readonly attribute reflects.] + expected: FAIL + + [aria-expanded attribute reflects.] + expected: FAIL + + [aria-modal attribute reflects.] + expected: FAIL + + [aria-keyshortcuts attribute reflects.] + expected: FAIL + + [aria-multiline attribute reflects.] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini index c2d790b5256..47935172860 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -318,21 +318,18 @@ [<iframe>: separate response Content-Type: text/plain */*;charset=gbk] expected: FAIL - [<iframe>: separate response Content-Type: text/html;" text/plain] - expected: FAIL - [<iframe>: separate response Content-Type: text/html */*] expected: FAIL - [<iframe>: combined response Content-Type: */* text/html] + [<iframe>: combined response Content-Type: text/html;" text/plain] expected: FAIL - [<iframe>: separate response Content-Type: text/html */*;charset=gbk] + [<iframe>: combined response Content-Type: text/html */*] expected: FAIL - [<iframe>: separate response Content-Type: text/plain */*] + [<iframe>: separate response Content-Type: text/html;x=" text/plain] expected: FAIL - [<iframe>: combined response Content-Type: text/html;" \\" text/plain] + [<iframe>: combined response Content-Type: text/html;x=" text/plain] expected: FAIL diff --git a/tests/wpt/metadata/fetch/content-type/script.window.js.ini b/tests/wpt/metadata/fetch/content-type/script.window.js.ini index 279734168dc..a5b9b3752be 100644 --- a/tests/wpt/metadata/fetch/content-type/script.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/script.window.js.ini @@ -53,9 +53,6 @@ [combined text/javascript ] expected: FAIL - [separate text/javascript x/x] - expected: FAIL - [separate text/javascript;charset=windows-1252 text/javascript] expected: FAIL diff --git a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini index 87c807a49ff..a63e414f43a 100644 --- a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,3 +11,6 @@ [X-Content-Type-Options%3A%20nosniff%0C] expected: FAIL + [X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/security/embedded-credentials.tentative.sub.html.ini b/tests/wpt/metadata/fetch/security/embedded-credentials.tentative.sub.html.ini index a3a600c5846..6bd06899fdd 100644 --- a/tests/wpt/metadata/fetch/security/embedded-credentials.tentative.sub.html.ini +++ b/tests/wpt/metadata/fetch/security/embedded-credentials.tentative.sub.html.ini @@ -1,5 +1,6 @@ [embedded-credentials.tentative.sub.html] type: testharness + expected: TIMEOUT [Embedded credentials are treated as network errors.] expected: FAIL @@ -10,5 +11,11 @@ expected: FAIL [Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.] - expected: FAIL + expected: TIMEOUT + + [Embedded credentials matching the top-level are not treated as network errors for same-origin URLs.] + expected: TIMEOUT + + [Embedded credentials matching the top-level are not treated as network errors for relative URLs.] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini deleted file mode 100644 index e495b626d2e..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[navigation-unload-same-origin-fragment.html] - [Tests that a fragment navigation in the unload handler will not block the initial navigation] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-top.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-top.html.ini new file mode 100644 index 00000000000..d2551ba514c --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-top.html.ini @@ -0,0 +1,4 @@ +[scroll-to-top.html] + [Fragment Navigation: When fragid is TOP scroll to the top of the document] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini deleted file mode 100644 index 87b07c3e670..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse_the_history_1.html] - [Multiple history traversals from the same task] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_2.html.ini index 51f8272a6de..75d75b4cda2 100644 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_2.html.ini @@ -1,4 +1,4 @@ -[traverse_the_history_3.html] +[traverse_the_history_2.html] [Multiple history traversals, last would be aborted] expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/sandboxing/sandbox-new-execution-context.html.ini b/tests/wpt/metadata/html/browsers/sandboxing/sandbox-new-execution-context.html.ini new file mode 100644 index 00000000000..49f4d547be4 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/sandboxing/sandbox-new-execution-context.html.ini @@ -0,0 +1,4 @@ +[sandbox-new-execution-context.html] + [iframe with sandbox should load with new execution context] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html.ini new file mode 100644 index 00000000000..16fa2c5cfc1 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/creating_browsing_context_test_01.html.ini @@ -0,0 +1,4 @@ +[creating_browsing_context_test_01.html] + [first argument: absolute url] + expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html.ini index bf50d59df41..e02f179ec25 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-innerwidth-innerheight.html.ini @@ -1,5 +1,24 @@ [open-features-negative-innerwidth-innerheight.html] type: testharness + expected: TIMEOUT [HTML: window.open `features`: negative values for legacy `innerwidth`, `innerheight`] expected: FAIL + [features "innerheight=-404.5" should NOT set "height=404"] + expected: TIMEOUT + + [features "innerwidth=-404.5" should NOT set "width=404"] + expected: TIMEOUT + + [features "innerwidth=-404" should NOT set "width=404"] + expected: TIMEOUT + + [features "innerheight=-404e1" should NOT set "height=404"] + expected: TIMEOUT + + [features "innerheight=-404" should NOT set "height=404"] + expected: TIMEOUT + + [features "innerwidth=-404e1" should NOT set "width=404"] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-width-height.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-width-height.html.ini index d1ed9088b2b..9027336b453 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-width-height.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-negative-width-height.html.ini @@ -1,5 +1,24 @@ [open-features-negative-width-height.html] type: testharness + expected: TIMEOUT [HTML: window.open `features`: negative values for `width`, `height`] expected: FAIL + [features "height=-404" should NOT set "height=404"] + expected: TIMEOUT + + [features "height=-404e1" should NOT set "height=404"] + expected: TIMEOUT + + [features "height=-404.5" should NOT set "height=404"] + expected: TIMEOUT + + [features "width=-404" should NOT set "width=404"] + expected: TIMEOUT + + [features "width=-404e1" should NOT set "width=404"] + expected: TIMEOUT + + [features "width=-404.5" should NOT set "width=404"] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html.ini index a70e9dbad4d..4e44584b123 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-height.html.ini @@ -1,32 +1,48 @@ [open-features-non-integer-height.html] type: testharness + expected: TIMEOUT [HTML: window.open `features`: non-integer values for feature `height`] expected: FAIL [features "height=405*3" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "height=405.32" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "height=405e1" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "height=405/5" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "height=405^4" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "height=405.5" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "height=405e-1" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "height=405 " should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "height=405LLl" should set "height=405"] - expected: FAIL + expected: TIMEOUT + + [features "height=/404" should NOT set "height=404"] + expected: TIMEOUT + + [top=0,left=0,width=401,: absence of feature "height" should be treated same as "height=0"] + expected: TIMEOUT + + [top=0,left=0: absence of feature "height" should be treated same as "height=0"] + expected: TIMEOUT + + [features "height=_404" should NOT set "height=404"] + expected: TIMEOUT + + [features "height=L404" should NOT set "height=404"] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerheight.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerheight.html.ini index 779531b4a98..fcaeae5336d 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerheight.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerheight.html.ini @@ -1,32 +1,42 @@ [open-features-non-integer-innerheight.html] type: testharness + expected: TIMEOUT [HTML: window.open `features`: non-integer values for legacy feature `innerheight`] expected: FAIL [features "innerheight=405e-1" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "innerheight=405LLl" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "innerheight=405^4" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "innerheight=405e1" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "innerheight=405 " should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "innerheight=405/5" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "innerheight=405.32" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "innerheight=405.5" should set "height=405"] - expected: FAIL + expected: TIMEOUT [features "innerheight=405*3" should set "height=405"] - expected: FAIL + expected: TIMEOUT + + [features "innerheight=_404" should NOT set "height=404"] + expected: TIMEOUT + + [features "innerheight=L404" should NOT set "height=404"] + expected: TIMEOUT + + [features "innerheight=/404" should NOT set "height=404"] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerwidth.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerwidth.html.ini index 7a1b258d52e..42327fedd27 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerwidth.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-innerwidth.html.ini @@ -1,32 +1,42 @@ [open-features-non-integer-innerwidth.html] type: testharness + expected: TIMEOUT [HTML: window.open `features`: non-integer values for legacy feature `innerwidth`] expected: FAIL [features "innerwidth=405e-1" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "innerwidth=405*3" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "innerwidth=405.5" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "innerwidth=405e1" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "innerwidth=405.32" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "innerwidth=405 " should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "innerwidth=405LLl" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "innerwidth=405/5" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "innerwidth=405^4" should set "width=405"] - expected: FAIL + expected: TIMEOUT + + [features "innerwidth=/404" should NOT set "width=404"] + expected: TIMEOUT + + [features "innerwidth=_404" should NOT set "width=404"] + expected: TIMEOUT + + [features "innerwidth=L404" should NOT set "width=404"] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-left.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-left.html.ini index caba4124f0b..a8e4fe06618 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-left.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-left.html.ini @@ -1,32 +1,42 @@ [open-features-non-integer-left.html] type: testharness + expected: TIMEOUT [HTML: window.open `features`: non-integer values for feature `left`] expected: FAIL [features "left=105e1" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "left=105 " should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "left=105/5" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "left=105e-1" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "left=105^4" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "left=105LLl" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "left=105.32" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "left=105*3" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "left=105.5" should set "left=105"] - expected: FAIL + expected: TIMEOUT + + [features "left=L104" should NOT set "left=104"] + expected: TIMEOUT + + [features "left=/104" should NOT set "left=104"] + expected: TIMEOUT + + [features "left=_104" should NOT set "left=104"] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-screenx.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-screenx.html.ini index 9ace8a4cbdb..e6b978f0b83 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-screenx.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-screenx.html.ini @@ -1,16 +1,17 @@ [open-features-non-integer-screenx.html] type: testharness + expected: TIMEOUT [HTML: window.open `features`: non-integer values for legacy feature `screenx`] expected: FAIL [features "screenx=105.5" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "screenx=105e1" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "screenx=105 " should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "screenx=105*3" should set "left=105"] expected: FAIL @@ -19,14 +20,20 @@ expected: FAIL [features "screenx=105^4" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "screenx=105LLl" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "screenx=105/5" should set "left=105"] - expected: FAIL + expected: TIMEOUT [features "screenx=105.32" should set "left=105"] expected: FAIL + [features "screenx=L104" should NOT set "left=104"] + expected: TIMEOUT + + [features "screenx=/104" should NOT set "left=104"] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-top.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-top.html.ini index 10f617db69e..8540f53d8d6 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-top.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-top.html.ini @@ -1,32 +1,42 @@ [open-features-non-integer-top.html] type: testharness + expected: TIMEOUT [HTML: window.open `features`: non-integer values for feature `top`] expected: FAIL [features "top=105/5" should set "top=105"] - expected: FAIL + expected: TIMEOUT [features "top=105*3" should set "top=105"] - expected: FAIL + expected: TIMEOUT [features "top=105LLl" should set "top=105"] - expected: FAIL + expected: TIMEOUT [features "top=105e-1" should set "top=105"] - expected: FAIL + expected: TIMEOUT [features "top=105.32" should set "top=105"] - expected: FAIL + expected: TIMEOUT [features "top=105e1" should set "top=105"] - expected: FAIL + expected: TIMEOUT [features "top=105 " should set "top=105"] - expected: FAIL + expected: TIMEOUT [features "top=105^4" should set "top=105"] - expected: FAIL + expected: TIMEOUT [features "top=105.5" should set "top=105"] - expected: FAIL + expected: TIMEOUT + + [features "top=/104" should NOT set "top=104"] + expected: TIMEOUT + + [features "top=_104" should NOT set "top=104"] + expected: TIMEOUT + + [features "top=L104" should NOT set "top=104"] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html.ini index 28f93ee71b5..9d841e61bc0 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html.ini @@ -1,32 +1,48 @@ [open-features-non-integer-width.html] type: testharness + expected: TIMEOUT [HTML: window.open `features`: non-integer values for feature `width`] expected: FAIL [features "width=405^4" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "width=405.5" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "width=405e1" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "width=405 " should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "width=405.32" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "width=405LLl" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "width=405*3" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "width=405e-1" should set "width=405"] - expected: FAIL + expected: TIMEOUT [features "width=405/5" should set "width=405"] - expected: FAIL + expected: TIMEOUT + + [top=0,left=0: absence of feature "width" should be treated same as "width=0"] + expected: TIMEOUT + + [features "width=_404" should NOT set "width=404"] + expected: TIMEOUT + + [top=0,left=0,height=401,: absence of feature "width" should be treated same as "width=0"] + expected: TIMEOUT + + [features "width=/404" should NOT set "width=404"] + expected: TIMEOUT + + [features "width=L404" should NOT set "width=404"] + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini b/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini index c757b400205..442db3cb549 100644 --- a/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini +++ b/tests/wpt/metadata/html/browsers/windows/embedded-opener-remove-frame.html.ini @@ -1,5 +1,4 @@ [embedded-opener-remove-frame.html] - expected: CRASH [opener and "removed" embedded documents] expected: FAIL @@ -7,5 +6,5 @@ expected: FAIL [opener of discarded auxiliary browsing context] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index 5f82bb787e5..fd5db23d3fd 100644 --- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,7 +1,11 @@ [supported-elements.html] + expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL [Element with tabindex should support autofocus] - expected: FAIL + expected: TIMEOUT + + [Non-HTMLElement should not support autofocus] + expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html.ini index f6a7aca3306..5f60c78e73c 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html.ini @@ -1,5 +1,6 @@ [iframe_sandbox_popups_escaping-3.html] type: testharness + expected: TIMEOUT [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini index 3a32693ffa8..d43f38b40cd 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,5 +1,6 @@ [iframe_sandbox_popups_nonescaping-2.html] type: testharness + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index dc856a3d5a3..e440b1e38c6 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,5 +1,6 @@ [iframe_sandbox_popups_nonescaping-3.html] type: testharness + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit-2.html.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit-2.html.ini index f6eecd82b49..61799e4c935 100644 --- a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit-2.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit-2.html.ini @@ -1,5 +1,5 @@ [form-double-submit-2.html] expected: ERROR [preventDefault should allow onclick submit() to succeed] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit.html.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit.html.ini index 47a7bbb7975..dce74c6dd71 100644 --- a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-double-submit.html.ini @@ -1,5 +1,5 @@ [form-double-submit.html] expected: ERROR [default submit action should supersede onclick submit()] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini index 702af61a3c4..127392316de 100644 --- a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini @@ -1,11 +1,7 @@ [form-submission-algorithm.html] - expected: TIMEOUT [If form's firing submission events is true, then return; 'submit' event] expected: FAIL [If form's firing submission events is true, then return; 'invalid' event] expected: FAIL - [Cannot navigate (after constructing the entry list)] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/html/semantics/forms/the-input-element/checkbox-detached-change-event.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/checkbox-detached-change-event.html.ini new file mode 100644 index 00000000000..e599b1b9465 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/the-input-element/checkbox-detached-change-event.html.ini @@ -0,0 +1,5 @@ +[checkbox-detached-change-event.html] + expected: TIMEOUT + [This test will pass if <input type=checkbox> emits change events while detached from document.body] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/semantics/forms/the-input-element/radio-detached-change-event.html.ini b/tests/wpt/metadata/html/semantics/forms/the-input-element/radio-detached-change-event.html.ini new file mode 100644 index 00000000000..2c7029fa510 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/forms/the-input-element/radio-detached-change-event.html.ini @@ -0,0 +1,5 @@ +[radio-detached-change-event.html] + expected: TIMEOUT + [This test will pass if <input type=radio> emits change events while detached from document.body] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini b/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini deleted file mode 100644 index a9677391662..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[DOMContentLoaded-defer.html] - [The end: DOMContentLoaded and defer scripts] - expected: FAIL - diff --git a/tests/wpt/metadata/resource-timing/nested-context-navigations-iframe.html.ini b/tests/wpt/metadata/resource-timing/nested-context-navigations-iframe.html.ini index 8594361ff44..ec371a1bf72 100644 --- a/tests/wpt/metadata/resource-timing/nested-context-navigations-iframe.html.ini +++ b/tests/wpt/metadata/resource-timing/nested-context-navigations-iframe.html.ini @@ -1,5 +1,5 @@ [nested-context-navigations-iframe.html] - expected: CRASH + expected: TIMEOUT [Test that iframe navigations are not observable by the parent, even after history navigations by the parent] expected: FAIL diff --git a/tests/wpt/metadata/url/url-setters.html.ini b/tests/wpt/metadata/url/url-setters.html.ini index 970009f11f2..2b0562b0334 100644 --- a/tests/wpt/metadata/url/url-setters.html.ini +++ b/tests/wpt/metadata/url/url-setters.html.ini @@ -1050,3 +1050,6 @@ [URL: Setting <ssh://me@example.net>.protocol = 'https'] expected: FAIL + [<area>: Setting <http://example.net>.host = '[2001:db8::2\]:4002' IPv6 literal address with port, crbug.com/1012416] + expected: FAIL + diff --git a/tests/wpt/metadata/webmessaging/with-ports/018.html.ini b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini new file mode 100644 index 00000000000..663a1f8fa30 --- /dev/null +++ b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini @@ -0,0 +1,5 @@ +[018.html] + expected: TIMEOUT + [origin of the script that invoked the method, javascript:] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/webxr/idlharness.https.window.js.ini b/tests/wpt/metadata/webxr/idlharness.https.window.js.ini index a48d48dd278..fb2e8a3327e 100644 --- a/tests/wpt/metadata/webxr/idlharness.https.window.js.ini +++ b/tests/wpt/metadata/webxr/idlharness.https.window.js.ini @@ -170,3 +170,12 @@ [WebGLRenderingContext includes WebGLRenderingContextBase: member names are unique] expected: FAIL + [XRSession interface: attribute onsqueeze] + expected: FAIL + + [XRSession interface: attribute onsqueezestart] + expected: FAIL + + [XRSession interface: attribute onsqueezeend] + expected: FAIL + diff --git a/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini index 268949ced5c..f584fce5df1 100644 --- a/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini +++ b/tests/wpt/metadata/workers/semantics/multiple-workers/005.html.ini @@ -1,4 +1,5 @@ [005.html] + expected: ERROR [dedicated worker in shared worker in dedicated worker] expected: FAIL diff --git a/tests/wpt/metadata/workers/semantics/run-a-worker/003.html.ini b/tests/wpt/metadata/workers/semantics/run-a-worker/003.html.ini index d6e39444229..49f489d2a1c 100644 --- a/tests/wpt/metadata/workers/semantics/run-a-worker/003.html.ini +++ b/tests/wpt/metadata/workers/semantics/run-a-worker/003.html.ini @@ -1,5 +1,6 @@ [003.html] type: testharness + expected: ERROR [shared] expected: FAIL diff --git a/tests/wpt/web-platform-tests/animation-worklet/stateful-animator.https.html b/tests/wpt/web-platform-tests/animation-worklet/stateful-animator.https.html index b83590650b1..be29fa109cb 100644 --- a/tests/wpt/web-platform-tests/animation-worklet/stateful-animator.https.html +++ b/tests/wpt/web-platform-tests/animation-worklet/stateful-animator.https.html @@ -106,7 +106,7 @@ do { await new Promise(window.requestAnimationFrame); let current_local_time = animation.effect.getComputedTiming().localTime; - if (last_local_time == current_local_time) + if (approxEquals(last_local_time, current_local_time)) ++frame_count; else frame_count = 0; @@ -121,7 +121,7 @@ const LOCAL_TIME_RESET_CHECK = 3; do { await new Promise(window.requestAnimationFrame); - if (0 == animation.effect.getComputedTiming().localTime) + if (approxEquals(0, animation.effect.getComputedTiming().localTime)) ++reset_count; } while (reset_count < LOCAL_TIME_RESET_CHECK); } @@ -136,8 +136,8 @@ // effect.localTime should be correctly increased upon global scope // switches for stateful animators. await waitForAnimationFrameWithCondition(_ => { - return animation.effect.getComputedTiming().localTime == - EXPECTED_FRAMES_TO_A_SCOPE_SWITCH; + return approxEquals(animation.effect.getComputedTiming().localTime, + EXPECTED_FRAMES_TO_A_SCOPE_SWITCH); }); animation.cancel(); @@ -165,7 +165,8 @@ animation.play(); await waitForAnimationFrameWithCondition(_ => { - return animation.effect.getComputedTiming().localTime == EXPECTED_FRAMES_TO_A_SCOPE_SWITCH; + return approxEquals(animation.effect.getComputedTiming().localTime, + EXPECTED_FRAMES_TO_A_SCOPE_SWITCH); }); animation.cancel(); @@ -179,7 +180,7 @@ animation.play(); await waitForAnimationFrameWithCondition(_ => { - return animation.effect.getComputedTiming().localTime == 10000; + return approxEquals(animation.effect.getComputedTiming().localTime, 10000); }); animation.cancel(); diff --git a/tests/wpt/web-platform-tests/conformance-checkers/html-aria/_functional/tree/js/prototype.js b/tests/wpt/web-platform-tests/conformance-checkers/html-aria/_functional/tree/js/prototype.js index b0e0675867a..c14b177230a 100644 --- a/tests/wpt/web-platform-tests/conformance-checkers/html-aria/_functional/tree/js/prototype.js +++ b/tests/wpt/web-platform-tests/conformance-checkers/html-aria/_functional/tree/js/prototype.js @@ -2705,8 +2705,8 @@ document.viewport = { getScrollOffsets: function() { return Element._returnOffset( - window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, - window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop); + window.pageXOffset || document.scrollingElement.scrollLeft, + window.pageYOffset || document.scrollingElement.scrollTop); } }; /* Portions of the Selector class are derived from Jack Slocum’s DomQuery, @@ -3751,10 +3751,8 @@ Event.Methods = (function() { pointer: function(event) { return { - x: event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)), - y: event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)) + x: event.pageX || (event.clientX + document.scrollingElement.scrollLeft), + y: event.pageY || (event.clientY + document.scrollingElement.scrollTop) }; }, @@ -4034,12 +4032,10 @@ var Position = { // page is scrolled prepare: function() { this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft + || document.scrollingElement.scrollLeft || 0; this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop + || document.scrollingElement.scrollTop || 0; }, diff --git a/tests/wpt/web-platform-tests/css/CSS2/positioning/line-break-after-leading-oof-001-ref.html b/tests/wpt/web-platform-tests/css/CSS2/positioning/line-break-after-leading-oof-001-ref.html new file mode 100644 index 00000000000..50c682eddc7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/positioning/line-break-after-leading-oof-001-ref.html @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<style> +div { + text-indent: 3ch; +} +</style> +<body> + <div>123456</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/CSS2/positioning/line-break-after-leading-oof-001.html b/tests/wpt/web-platform-tests/css/CSS2/positioning/line-break-after-leading-oof-001.html new file mode 100644 index 00000000000..b00c48156ed --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/positioning/line-break-after-leading-oof-001.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title>CSS Test: Line wrapping after leading out-of-flow objects</title> +<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css2/visuren.html#propdef-position"> +<style> +div { + width: 5ch; + /* When the line was broken after the leading OOF, it is hardly visible + because it is an empty line box. + Applying `text-indent` can make it visible; if the line is indented, + it is the first line, proving the line did not wrap. */ + text-indent: 3ch; +} +</style> +<body> + <div><span style="position: absolute"></span>123456</div> +</body> diff --git a/tests/wpt/web-platform-tests/css/css-animations/animation-fill-mode-001-manual.html b/tests/wpt/web-platform-tests/css/css-animations/animation-fill-mode-001-manual.html index 7c38164b2d8..21766723672 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/animation-fill-mode-001-manual.html +++ b/tests/wpt/web-platform-tests/css/css-animations/animation-fill-mode-001-manual.html @@ -32,8 +32,8 @@ <body> <p> Test passes if there is a filled color square with 'Filler Text', - whose color gradually changes in the order: - YELLOW to GREEN to BLUE. + whose color gradually changes in the order: YELLOW to GREEN. + After the animation is finished, the color goes back to BLUE. </p> <div>Filler Text</div> </body> diff --git a/tests/wpt/web-platform-tests/css/css-animations/animation-fill-mode-003-manual.html b/tests/wpt/web-platform-tests/css/css-animations/animation-fill-mode-003-manual.html index bd5a93245b3..561237d2673 100644 --- a/tests/wpt/web-platform-tests/css/css-animations/animation-fill-mode-003-manual.html +++ b/tests/wpt/web-platform-tests/css/css-animations/animation-fill-mode-003-manual.html @@ -37,8 +37,8 @@ <body> <p> Test passes if there is a filled color square with 'Filler Text', - whose color gradually changes in the order: - YELLOW to GREEN to BLUE. + whose color gradually changes in the order: YELLOW to GREEN. + After the animation is finished, the color goes back to BLUE. </p> <div>Filler Text</div> </body> diff --git a/tests/wpt/web-platform-tests/css/css-lists/list-marker-symbol-bidi-ref.html b/tests/wpt/web-platform-tests/css/css-lists/list-marker-symbol-bidi-ref.html new file mode 100644 index 00000000000..cf213d731f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/list-marker-symbol-bidi-ref.html @@ -0,0 +1,125 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Reference: Symbol markers with unicode-bidi</title> +<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"> +<style> +section { + float: left; +} +.inside { + list-style-position: inside; +} +span { + float: right; +} +</style> +<section> + <ul dir="ltr"> + <li class="outside embed-none">text</li> + <li class="outside embed-item">text</li> + <li class="outside embed-marker">text</li> + <li class="outside embed-both">text</li> + <li class="inside embed-none">text</li> + <li class="inside embed-item">text</li> + <li class="inside embed-marker">text</li> + <li class="inside embed-both">text</li> + </ul> + <ul dir="rtl"> + <li class="outside isolate-none">text</li> + <li class="outside isolate-item">text</li> + <li class="outside isolate-marker">text</li> + <li class="outside isolate-both">text</li> + <li class="inside isolate-none">text</li> + <li class="inside isolate-item">text</li> + <li class="inside isolate-marker">text</li> + <li class="inside isolate-both">text</li> + </ul> +</section> +<section> + <ul dir="ltr"> + <li class="outside isolate-none">text</li> + <li class="outside isolate-item">text</li> + <li class="outside isolate-marker">text</li> + <li class="outside isolate-both">text</li> + <li class="inside isolate-none">text</li> + <li class="inside isolate-item">text</li> + <li class="inside isolate-marker">text</li> + <li class="inside isolate-both">text</li> + </ul> + <ul dir="rtl"> + <li class="outside isolate-none">text</li> + <li class="outside isolate-item">text</li> + <li class="outside isolate-marker">text</li> + <li class="outside isolate-both">text</li> + <li class="inside isolate-none">text</li> + <li class="inside isolate-item">text</li> + <li class="inside isolate-marker">text</li> + <li class="inside isolate-both">text</li> + </ul> +</section> +<section> + <ul dir="ltr"> + <li class="outside override-none">text</li> + <li class="outside override-item">text</li> + <li class="outside override-marker">text</li> + <li class="outside override-both">text</li> + <li class="inside override-none">text</li> + <li class="inside override-item">text</li> + <li class="inside override-marker">text</li> + <li class="inside override-both">text</li> + </ul> + <ul dir="rtl"> + <li class="outside override-none">text</li> + <li class="outside override-item">txet</li> + <li class="outside override-marker">text</li> + <li class="outside override-both">txet</li> + <li class="inside override-none">text</li> + <li class="inside override-item">txet</li> + <li class="inside override-marker">text</li> + <li class="inside override-both">txet</li> + </ul> +</section> +<section> + <ul dir="ltr"> + <li class="outside isolateoverride-none">text</li> + <li class="outside isolateoverride-item">text</li> + <li class="outside isolateoverride-marker">text</li> + <li class="outside isolateoverride-both">text</li> + <li class="inside isolateoverride-none">text</li> + <li class="inside isolateoverride-item">text</li> + <li class="inside isolateoverride-marker">text</li> + <li class="inside isolateoverride-both">text</li> + </ul> + <ul dir="rtl"> + <li class="outside isolateoverride-none">text</li> + <li class="outside isolateoverride-item">txet</li> + <li class="outside isolateoverride-marker">text</li> + <li class="outside isolateoverride-both">txet</li> + <li class="inside isolateoverride-none">text</li> + <li class="inside isolateoverride-item">txet</li> + <li class="inside isolateoverride-marker">text</li> + <li class="inside isolateoverride-both">txet</li> + </ul> +</section> +<section> + <ul dir="ltr"> + <li class="outside plaintext-none">text</li> + <li class="outside plaintext-item">text</li> + <li class="outside plaintext-marker">text</li> + <li class="outside plaintext-both">text</li> + <li class="inside plaintext-none">text</li> + <li class="inside plaintext-item">text</li> + <li class="inside plaintext-marker">text</li> + <li class="inside plaintext-both">text</li> + </ul> + <ul dir="rtl"> + <li class="outside plaintext-none">text</li> + <li class="outside plaintext-item">text</li> + <li class="outside plaintext-marker">text</li> + <li class="outside plaintext-both">text</li> + <li class="inside plaintext-none">text</li> + <li class="inside plaintext-item"><span>text</span></li> + <li class="inside plaintext-marker">text</li> + <li class="inside plaintext-both"><span>text</span></li> + </ul> +</section> diff --git a/tests/wpt/web-platform-tests/css/css-lists/list-marker-symbol-bidi.html b/tests/wpt/web-platform-tests/css/css-lists/list-marker-symbol-bidi.html new file mode 100644 index 00000000000..e82d9ae1567 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/list-marker-symbol-bidi.html @@ -0,0 +1,147 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Symbol markers with unicode-bidi</title> +<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-lists/#markers" title="3. Markers"> +<link rel="match" href="list-marker-symbol-bidi-ref.html"> +<meta name="assert" content="This test checks that symbol markers are painted independently of unicode-bidi."> +<style> +section { + float: left; +} +.inside { + list-style-position: inside; +} +.embed-item, .embed-both { + unicode-bidi: embed; +} +.isolate-item, .isolate-both { + unicode-bidi: isolate; +} +.override-item, .override-both { + unicode-bidi: bidi-override; +} +.isolateoverride-item, .isolateoverride-both { + unicode-bidi: isolate-override; +} +.plaintext-item, .plaintext-both { + unicode-bidi: plaintext; +} +.embed-item::marker, .embed-none::marker, +.isolate-item::marker, .isolate-none::marker, +.override-item::marker, .override-none::marker, +.paintext-item::marker, .paintext-none::marker, +.isolateoverride-item::marker, .isolateoverride-none::marker { + unicode-bidi: normal; +} +</style> +<section> + <ul dir="ltr"> + <li class="outside embed-none">text</li> + <li class="outside embed-item">text</li> + <li class="outside embed-marker">text</li> + <li class="outside embed-both">text</li> + <li class="inside embed-none">text</li> + <li class="inside embed-item">text</li> + <li class="inside embed-marker">text</li> + <li class="inside embed-both">text</li> + </ul> + <ul dir="rtl"> + <li class="outside isolate-none">text</li> + <li class="outside isolate-item">text</li> + <li class="outside isolate-marker">text</li> + <li class="outside isolate-both">text</li> + <li class="inside isolate-none">text</li> + <li class="inside isolate-item">text</li> + <li class="inside isolate-marker">text</li> + <li class="inside isolate-both">text</li> + </ul> +</section> +<section> + <ul dir="ltr"> + <li class="outside isolate-none">text</li> + <li class="outside isolate-item">text</li> + <li class="outside isolate-marker">text</li> + <li class="outside isolate-both">text</li> + <li class="inside isolate-none">text</li> + <li class="inside isolate-item">text</li> + <li class="inside isolate-marker">text</li> + <li class="inside isolate-both">text</li> + </ul> + <ul dir="rtl"> + <li class="outside isolate-none">text</li> + <li class="outside isolate-item">text</li> + <li class="outside isolate-marker">text</li> + <li class="outside isolate-both">text</li> + <li class="inside isolate-none">text</li> + <li class="inside isolate-item">text</li> + <li class="inside isolate-marker">text</li> + <li class="inside isolate-both">text</li> + </ul> +</section> +<section> + <ul dir="ltr"> + <li class="outside override-none">text</li> + <li class="outside override-item">text</li> + <li class="outside override-marker">text</li> + <li class="outside override-both">text</li> + <li class="inside override-none">text</li> + <li class="inside override-item">text</li> + <li class="inside override-marker">text</li> + <li class="inside override-both">text</li> + </ul> + <ul dir="rtl"> + <li class="outside override-none">text</li> + <li class="outside override-item">text</li> + <li class="outside override-marker">text</li> + <li class="outside override-both">text</li> + <li class="inside override-none">text</li> + <li class="inside override-item">text</li> + <li class="inside override-marker">text</li> + <li class="inside override-both">text</li> + </ul> +</section> +<section> + <ul dir="ltr"> + <li class="outside isolateoverride-none">text</li> + <li class="outside isolateoverride-item">text</li> + <li class="outside isolateoverride-marker">text</li> + <li class="outside isolateoverride-both">text</li> + <li class="inside isolateoverride-none">text</li> + <li class="inside isolateoverride-item">text</li> + <li class="inside isolateoverride-marker">text</li> + <li class="inside isolateoverride-both">text</li> + </ul> + <ul dir="rtl"> + <li class="outside isolateoverride-none">text</li> + <li class="outside isolateoverride-item">text</li> + <li class="outside isolateoverride-marker">text</li> + <li class="outside isolateoverride-both">text</li> + <li class="inside isolateoverride-none">text</li> + <li class="inside isolateoverride-item">text</li> + <li class="inside isolateoverride-marker">text</li> + <li class="inside isolateoverride-both">text</li> + </ul> +</section> +<section> + <ul dir="ltr"> + <li class="outside plaintext-none">text</li> + <li class="outside plaintext-item">text</li> + <li class="outside plaintext-marker">text</li> + <li class="outside plaintext-both">text</li> + <li class="inside plaintext-none">text</li> + <li class="inside plaintext-item">text</li> + <li class="inside plaintext-marker">text</li> + <li class="inside plaintext-both">text</li> + </ul> + <ul dir="rtl"> + <li class="outside plaintext-none">text</li> + <li class="outside plaintext-item">text</li> + <li class="outside plaintext-marker">text</li> + <li class="outside plaintext-both">text</li> + <li class="inside plaintext-none">text</li> + <li class="inside plaintext-item">text</li> + <li class="inside plaintext-marker">text</li> + <li class="inside plaintext-both">text</li> + </ul> +</section> diff --git a/tests/wpt/web-platform-tests/css/css-lists/nested-list-with-list-style-type-none.html b/tests/wpt/web-platform-tests/css/css-lists/nested-list-with-list-style-type-none.html index e103113c3f4..325459df8a2 100644 --- a/tests/wpt/web-platform-tests/css/css-lists/nested-list-with-list-style-type-none.html +++ b/tests/wpt/web-platform-tests/css/css-lists/nested-list-with-list-style-type-none.html @@ -19,6 +19,11 @@ li { </li> </ul> <script type="text/javascript"> + setup({ single_test: true }); + // TODO(jugglinmike): If accepted, WPT RFC #33 will introduce a new test + // type intended to simplify tests like this one. Refactor this test to the + // new test type following its acceptance. + // https://github.com/web-platform-tests/rfcs/pull/33 done(); </script> </body> diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/parsing/tree-abiding-pseudo-elements.html b/tests/wpt/web-platform-tests/css/css-pseudo/parsing/tree-abiding-pseudo-elements.html index 4997ae4f564..05c23a3bc14 100644 --- a/tests/wpt/web-platform-tests/css/css-pseudo/parsing/tree-abiding-pseudo-elements.html +++ b/tests/wpt/web-platform-tests/css/css-pseudo/parsing/tree-abiding-pseudo-elements.html @@ -3,7 +3,7 @@ <title>CSS Pseudo-Elements Test: Parsing tree-abiding pseudo-elements</title> <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#treelike"> <link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"> -<meta name="assert" content="This test checks that gutters adjacent to collapsed tracks don't reduce the space available for aligning adjacent grid items." /> +<meta name="assert" content="This test checks the validity of various selectors containing tree-abiding pseudo-elements." /> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/css/support/parsing-testcommon.js"></script> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-break-all-inline-008.html b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-break-all-inline-008.html new file mode 100644 index 00000000000..930ae436fe4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-break-all-inline-008.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html lang=en> +<meta charset="utf-8"> +<title>word-break: break-all on inline element</title> +<link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernandez@igalia.com"> +<link rel="help" title="5.2. Breaking Rules for Letters: the word-break property" href="https://drafts.csswg.org/css-text-3/#word-break-property"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-all"> +<meta name="flags" content="Ahem"> +<link rel="match" href="reference/word-break-break-all-010-ref.html"> +<meta name="assert" content="break-all doesn't allow breaking around punctuation characters"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 50px / 1 Ahem; +} +.fail { + background: green; + position: absolute; + color: red; + height: 100px; + z-index: -1; +} +.test { + color: green; + width: 1em; + + word-break: break-all; +} +</style> + +<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> +<div class="fail">XX</div> +<div class="test"><span>X</span><span>.</span></div> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-001.html b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-001.html new file mode 100644 index 00000000000..20b610180b3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-001.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text Test: word-break: break-word and intrinsic sizing</title> +<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#word-break-property"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-word"> +<meta name="flags" content=""> +<link rel="match" href="../overflow-wrap/reference/overflow-wrap-min-content-size-001-ref.html"> +<meta name="assert" content="word-break: break-word should behave as overflow-wrap: anywhere, so breaking opportunities **are** considered when calculating min-content intrinsic sizes."> +<style> +table { + word-break: break-word; + max-width: 0; + border: 0; + border-collapse: collapse; +} +td { + padding: 0; + background: green; + color: transparent; +} +#red { + position: absolute; + z-index: -1; + background: red; + color: transparent; +} +</style> + +<p>Test passes if there is a green box below and no red. +<div id=red>X<br>X<br>X<br>X</div> +<table><tr><td>XXXX</table> + +<!-- + width:min-content on the div directly without using a table + would achieve the goal of this test, and be a lot simpler. + + However, width:min-content is not yet widely supported. + + Using a table, and forcing it to be as small as possible + will achieve min-content sizing of the div in all browsers. +--> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-002.html b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-002.html new file mode 100644 index 00000000000..0f5d18ff4b2 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-002.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text Test: word-break: break-word and intrinsic sizing</title> +<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#word-break-property"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-word"> +<meta name="flags" content="ahem"> +<link rel="match" href="../overflow-wrap/reference/overflow-wrap-min-content-size-003-ref.html"> +<meta name="assert" content="word-break: break-word should behave as overflow-wrap: anywhere, so breaks at edge of inline elements."> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +#wrapper { + width: 0px; + font: 16px / 1 Ahem; + word-break: break-word; + color: green; +} +#test { + float: left; +} +#reference { + position: absolute; + width: 16px; + height: 128px; + background: red; + z-index: -1; +} +</style> + +<p>Test passes if there is a vertical green bar below. +<div id="wrapper"> + <div id="reference"></div> + <div id="test"><span>X</span><span>X</span><span>X</span><span>X</span><span>X</span><span>X</span><span>X</span><span>X</span></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-003.html b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-003.html new file mode 100644 index 00000000000..84e7cfe872f --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-003.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text Test: word-break: break-word and intrinsic sizing</title> +<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#word-break-property"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-word"> +<meta name="flags" content="ahem"> +<link rel="match" href="reference/word-break-break-all-010-ref.html"> +<meta name="assert" content="word-break: break-all shouldn't allow breaking before punctuation characters."> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 50px / 1 Ahem; +} +.fail { + background: red; + position: absolute; + color: green; + z-index: -1; +} +.test { + color: green; + width: min-content; + word-break: break-all; +} +</style> + +<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> +<div class="fail"><br>XX</div> +<div class="test"><span>X</span><span>.</span></div> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-004.html b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-004.html new file mode 100644 index 00000000000..efa61b9cd8a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-004.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text Test: word-break: break-word and intrinsic sizing</title> +<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#word-break-property"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-word"> +<meta name="flags" content="ahem"> +<link rel="match" href="reference/word-break-break-all-010-ref.html"> +<meta name="assert" content="word-break: break-word allows breaking before punctuation characters and it should be considered when computing the min-content size."> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +div { + font: 50px / 1 Ahem; +} +.fail { + background: green; + position: absolute; + color: red; + width: 100px; + z-index: -1; +} +.test { + color: green; + width: min-content; + word-break: break-word; +} +</style> + +<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> +<div class="fail">X<br>X</div> +<div class="test"><span>X</span><span>.</span></div> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-005.html b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-005.html new file mode 100644 index 00000000000..ccbf9887054 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-005.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text Test: word-break: break-word and intrinsic sizing</title> +<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#word-break-property"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-word-break-break-word"> +<meta name="flags" content="ahem"> +<link rel="match" href="../overflow-wrap/reference/overflow-wrap-min-content-size-003-ref.html"> +<meta name="assert" content="word-break: break-word should behave as overflow-wrap: anywhere, so breaks at edge of inline elements."> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<style> +#wrapper { + width: 0px; + font: 16px / 1 Ahem; + word-break: break-word; + color: green; +} +#test { + float: left; +} +#reference { + position: absolute; + width: 16px; + height: 128px; + background: red; + z-index: -1; +} +</style> + +<p>Test passes if there is a vertical green bar below. +<div id="wrapper"> + <div id="reference"></div> + <div id="test"><span>XX</span><span>X</span><span>X</span><span>X</span><span>X</span><span>X</span><span>X</span></div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-006.html b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-006.html new file mode 100644 index 00000000000..0d772a2d88c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text/word-break/word-break-min-content-006.html @@ -0,0 +1,24 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text Test: overflow-wrap: anywhere and intrinsic sizing</title> +<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org/"> +<link rel="author" title="Mozilla" href="https://www.mozilla.org/"> +<link rel="help" href="https://drafts.csswg.org/css-text-3/#overflow-wrap-property"> +<meta name="flags" content=""> +<link rel="match" href="../overflow-wrap/reference/overflow-wrap-min-content-size-002-ref.html"> +<meta name="assert" content="overflow-wrap:anywhere doesn't break grapheme cluster and min-content intrinsic size should take that into account."> +<style> +#wrapper { + width: 0px; + word-break: break-word; +} +#test { + float: left; + border: 2px solid blue; +} +</style> + +<p>Test passes if the glyphs are completely inside the blue box. +<div id="wrapper"> + <div id="test">நிிிிநிிிி</div> +</div> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-004-ref.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-004-ref.xht index 5f971974b8d..a7557f92823 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-004-ref.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-004-ref.xht @@ -41,7 +41,7 @@ <div>01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 00</div> <script> - document.documentElement.scrollLeft=document.documentElement.scrollWidth; + document.scrollingElement.scrollLeft=document.scrollingElement.scrollWidth; </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-004.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-004.xht index cd1529ce421..b7322a0083c 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-004.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vlr-004.xht @@ -101,7 +101,7 @@ </div> <script> - document.documentElement.scrollLeft=document.documentElement.scrollWidth; + document.scrollingElement.scrollLeft=document.scrollingElement.scrollWidth; </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-001-ref.xht b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-001-ref.xht index 297457f62c2..e423259f0db 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-001-ref.xht +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/sizing-orthog-htb-in-vrl-001-ref.xht @@ -75,7 +75,7 @@ </table> <script> - document.documentElement.scrollLeft=document.documentElement.scrollWidth; + document.scrollingElement.scrollLeft=document.scrollingElement.scrollWidth; </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-scroll-offset-vertical-lr.html b/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-scroll-offset-vertical-lr.html index 8c59532b1a5..ecab4a84e22 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-scroll-offset-vertical-lr.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-scroll-offset-vertical-lr.html @@ -18,19 +18,19 @@ <body> <script> test(function() { - assert_equals(document.documentElement.scrollLeft, 0, "scrollLeft should be 0."); + assert_equals(document.scrollingElement.scrollLeft, 0, "scrollLeft should be 0."); }, "Check initial scroll position of viewport."); test(function() { - document.documentElement.scrollLeft = -1000; - assert_equals(document.documentElement.scrollLeft, 0, "scrollLeft should be 0."); + document.scrollingElement.scrollLeft = -1000; + assert_equals(document.scrollingElement.scrollLeft, 0, "scrollLeft should be 0."); }, "Scroll to scrollLeft = -1000 should not be possible."); test(function() { - document.documentElement.scrollLeft = 1000; - assert_equals(document.documentElement.scrollLeft, 1000, "scrollLeft should be 1000."); + document.scrollingElement.scrollLeft = 1000; + assert_equals(document.scrollingElement.scrollLeft, 1000, "scrollLeft should be 1000."); }, "Scroll to scrollLeft = 1000 should be possible."); // Reset back to horizontal-tb to make the result readable on-screen. - document.documentElement.className = "result-wm"; + document.scrollingElement.className = "result-wm"; </script> diff --git a/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-scroll-offset-vertical-rl.html b/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-scroll-offset-vertical-rl.html index 523928f9ad8..eb327b00c09 100644 --- a/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-scroll-offset-vertical-rl.html +++ b/tests/wpt/web-platform-tests/css/css-writing-modes/wm-propagation-body-scroll-offset-vertical-rl.html @@ -18,19 +18,19 @@ <body> <script> test(function() { - assert_equals(document.documentElement.scrollLeft, 0, "scrollLeft should be 0."); + assert_equals(document.scrollingElement.scrollLeft, 0, "scrollLeft should be 0."); }, "Check initial scroll position of viewport."); test(function() { - document.documentElement.scrollLeft = -1000; - assert_equals(document.documentElement.scrollLeft, -1000, "scrollLeft should be -1000."); + document.scrollingElement.scrollLeft = -1000; + assert_equals(document.scrollingElement.scrollLeft, -1000, "scrollLeft should be -1000."); }, "Scroll to scrollLeft = -1000 should be possible."); test(function() { - document.documentElement.scrollLeft = 1000; - assert_equals(document.documentElement.scrollLeft, 0, "scrollLeft should be 0."); + document.scrollingElement.scrollLeft = 1000; + assert_equals(document.scrollingElement.scrollLeft, 0, "scrollLeft should be 0."); }, "Scroll to scrollLeft = 1000 should not be possible."); // Reset back to horizontal-tb to make the result readable on-screen. - document.documentElement.className = "result-wm"; + document.scrollingElement.className = "result-wm"; </script> diff --git a/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-1.png b/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-1.png Binary files differnew file mode 100644 index 00000000000..5195ba25ae6 --- /dev/null +++ b/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-1.png diff --git a/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-2.png b/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-2.png Binary files differnew file mode 100644 index 00000000000..0010a571731 --- /dev/null +++ b/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-2.png diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/index.md b/tests/wpt/web-platform-tests/docs/writing-tests/index.md index c4da79c0d8a..88e279b0ad1 100644 --- a/tests/wpt/web-platform-tests/docs/writing-tests/index.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/index.md @@ -26,6 +26,7 @@ There's also a load of [general guidelines](general-guidelines) that apply to al testdriver testdriver-tutorial testharness + testharness-tutorial tools visual wdspec diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/testharness-tutorial.md b/tests/wpt/web-platform-tests/docs/writing-tests/testharness-tutorial.md new file mode 100644 index 00000000000..dceb674ac4d --- /dev/null +++ b/tests/wpt/web-platform-tests/docs/writing-tests/testharness-tutorial.md @@ -0,0 +1,393 @@ +# testharness.js tutorial + +<!-- +Note to maintainers: + +This tutorial is designed to be an authentic depiction of the WPT contribution +experience. It is not intended to be comprehensive; its scope is intentionally +limited in order to demonstrate authoring a complete test without overwhelming +the reader with features. Because typical WPT usage patterns change over time, +this should be updated periodically; please weigh extensions against the +demotivating effect that a lengthy guide can have on new contributors. +--> + +Let's say you've discovered that WPT doesn't have any tests for how [the Fetch +API](https://fetch.spec.whatwg.org/) sets cookies from an HTTP response. This +tutorial will guide you through the process of writing a test for the +web-platform, verifying it, and submitting it back to WPT. Although it includes +some very brief instructions on using git, you can find more guidance in [the +tutorial for git and GitHub](github-intro). + +WPT's testharness.js is a framework designed to help people write tests for the +web platform's JavaScript APIs. [The testharness.js reference +page](testharness) describes the framework in the abstract, but for the +purposes of this guide, we'll only consider the features we need to test the +behavior of `fetch`. + +```eval_rst +.. contents:: + :local: +``` + +## Setting up your workspace + +To make sure you have the latest code, first type the following into a terminal +located in the root of the WPT git repository: + + $ git fetch git@github.com:web-platform-tests/wpt.git + +Next, we need a place to store the change set we're about to author. Here's how +to create a new git branch named `fetch-cookie` from the revision of WPT we +just downloaded: + + $ git checkout -b fetch-cookie FETCH_HEAD + +The tests we're going to write will rely on special abilities of the WPT +server, so you'll also need to [configure your system to run +WPT](../running-tests/from-local-system) before you continue. + +With that out of the way, you're ready to create your patch. + +## Writing a subtest + +<!-- +Goals of this section: + +- demonstrate asynchronous testing with Promises +- motivate non-trivial integration with WPT server +- use web technology likely to be familiar to web developers +- use web technology likely to be supported in the reader's browser +--> + +The first thing we'll do is configure the server to respond to a certain request +by setting a cookie. Once that's done, we'll be able to make the request with +`fetch` and verify that it interpreted the response correctly. + +We'll configure the server with an "asis" file. That's the WPT convention for +controlling the contents of an HTTP response. [You can read more about it +here](server-features), but for now, we'll save the following text into a file +named `set-cookie.asis` in the `fetch/api/basic/` directory of WPT: + +``` +HTTP/1.1 204 No Content +Set-Cookie: test1=t1 +``` + +With this in place, any requests to `/fetch/api/basic/set-cookie.asis` will +receive an HTTP 204 response that sets the cookie named `test1`. When writing +more tests in the future, you may want the server to behave more dynamically. +In that case, [you can write Python code to control how the server +responds](python-handlers/index). + +Now, we can write the test! Create a new file named `set-cookie.html` in the +same directory and insert the following text: + +```html +<!DOCTYPE html> +<meta charset="utf-8"> +<title>fetch: setting cookies</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +promise_test(function() { + return fetch('set-cookie.asis') + .then(function() { + assert_equals(document.cookie, 'test1=t1'); + }); +}); +</script> +``` + +Let's step through each part of this file. + +- ```html + <!DOCTYPE html> + <meta charset="utf-8"> + ``` + + We explicitly set the DOCTYPE and character set to be sure that browsers + don't infer them to be something we aren't expecting. We're omitting the + `<html>` and `<head>` tags. That's a common practice in WPT, preferred + because it makes tests more concise. + +- ```html + <title>fetch: setting cookies</title> + ``` + The document's title should succinctly describe the feature under test. + +- ```html + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + ``` + + These two `<script>` tags retrieve the code that powers testharness.js. A + testharness.js test can't run without them! + +- ```html + <script> + promise_test(function() { + return fetch('thing.asis') + .then(function() { + assert_equals(document.cookie, 'test1=t1'); + }); + }); + </script> + ``` + + This script uses the testharness.js function `promise_test` to define a + "subtest". We're using that because the behavior we're testing is + asynchronous. By returning a Promise value, we tell the harness to wait until + that Promise settles. The harness will report that the test has passed if + the Promise is fulfilled, and it will report that the test has failed if the + Promise is rejected. + + We invoke the global `fetch` function to exercise the "behavior under test," + and in the fulfillment handler, we verify that the expected cookie is set. + We're using the testharness.js `assert_equals` function to verify that the + value is correct; the function will throw an error otherwise. That will cause + the Promise to be rejected, and *that* will cause the harness to report a + failure. + +If you run the server according to the instructions in [the guide for local +configuration](../running-tests/from-local-system), you can access the test at +[http://web-platform.test:8000/fetch/api/basic/set-cookie.html](http://web-platform.test:8000/fetch/api/basic/set-cookie.html.). +You should see something like this: + + + +## Refining the subtest + +<!-- +Goals of this section: + +- explain the motivation for "clean up" logic and demonstrate its usage +- motivate explicit test naming +--> + +We'd like to test a little more about `fetch` and cookies, but before we do, +there are some improvements we can make to what we've written so far. + +For instance, we should remove the cookie after the subtest is complete. This +ensures a consistent state for any additional subtests we may add and also for +any tests that follow. We'll use the `add_cleanup` method to ensure that the +cookie is deleted even if the test fails. + +```diff +-promise_test(function() { ++promise_test(function(t) { ++ t.add_cleanup(function() { ++ document.cookie = 'test1=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'; ++ }); ++ + return fetch('thing.asis') + .then(function() { + assert_equals(document.cookie, 'test1=t1'); + }); + }); +``` + +Although we'd prefer it if there were no other cookies defined during our test, +we shouldn't take that for granted. As written, the test will fail if the +`document.cookie` includes additional cookies. We'll use slightly more +complicated logic to test for the presence of the expected cookie. + + +```diff + promise_test(function(t) { + t.add_cleanup(function() { + document.cookie = 'test1=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'; + }); + + return fetch('thing.asis') + .then(function() { +- assert_equals(document.cookie, 'test1=t1'); ++ assert_true(/(^|; )test1=t1($|;)/.test(document.cookie); + }); + }); +``` + +In the screen shot above, the subtest's result was reported using the +document's title, "fetch: setting cookies". Since we expect to add another +subtest, we should give this one a more specific name: + +```diff + promise_test(function(t) { + t.add_cleanup(function() { + document.cookie = 'test1=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'; + }); + + return fetch('thing.asis') + .then(function() { + assert_true(/(^|; )test1=t1($|;)/.test(document.cookie)); + }); +-}); ++}, 'cookie set for successful request'); +``` + +## Writing a second subtest + +<!-- +Goals of this section: + +- introduce the concept of cross-domain testing and the associated tooling +- demonstrate how to verify promise rejection +- demonstrate additional assertion functions +--> + +There are many things we might want to verify about how `fetch` sets cookies. +For instance, it should *not* set a cookie if the request fails due to +cross-origin security restrictions. Let's write a subtest which verifies that. + +We'll add another `<script>` tag for a JavaScript support file: + +```diff + <!DOCTYPE html> + <meta charset="utf-8"> + <title>fetch: setting cookies</title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> ++<script src="/common/get-host-info.sub.js"></script> +``` + +`get-host-info.sub.js` is a general-purpose script provided by WPT. It's +designed to help with testing cross-domain functionality. Since it's stored in +WPT's `common/` directory, tests from all sorts of specifications rely on it. + +Next, we'll define the new subtest inside the same `<script>` tag that holds +our first subtest. + +```js +promise_test(function(t) { + t.add_cleanup(function() { + document.cookie = 'test1=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'; + }); + const url = get_host_info().HTTP_NOTSAMESITE_ORIGIN + + '/fetch/api/basic/set-cookie.asis'; + + return fetch(url) + .then(function() { + assert_unreached('The promise for the aborted fetch operation should reject.'); + }, function() { + assert_false(/(^|; )test1=t1($|;)/.test(document.cookie)); + }); +}, 'no cookie is set for cross-domain fetch operations'); +``` + +This may look familiar from the previous subtest, but there are some important +differences. + +- ```js + const url = get_host_info().HTTP_NOTSAMESITE_ORIGIN + + '/fetch/api/basic/set-cookie.asis'; + ``` + + We're requesting the same resource, but we're referring to it with an + alternate host name. The name of the host depends on how the WPT server has + been configured, so we rely on the helper to provide an appropriate value. + +- ```js + return fetch(url) + .then(function() { + assert_unreached('The promise for the aborted fetch operation should reject.'); + }, function() { + assert_false(/(^|; )test1=t1($|;)/.test(document.cookie)); + }); + ``` + + We're returning a Promise value, just like the first subtest. This time, we + expect the operation to fail, so the Promise should be rejected. To express + this, we've used `assert_unreached` *in the fulfillment handler*. + `assert_unreached` is a testharness.js utility function which always throws + an error. With this in place, if fetch does *not* produce an error, then this + subtest will fail. + + We've moved the assertion about the cookie to the rejection handler. We also + switched from `assert_true` to `assert_false` because the test should only + pass if the cookie is *not* set. It's a good thing we have the cleanup logic + in the previous subtest, right? + +If you run the test in your browser now, you can expect to see both tests +reported as passing with their distinct names. + + + +## Verifying our work + +We're done writing the test, but we should make sure it fits in with the rest +of WPT before we submit it. + +[The lint tool](lint-tool) can detect some of the common mistakes people make +when contributing to WPT. You enabled it when you [configured your system to +work with WPT](../running-tests/from-local-system). To run it, open a +command-line terminal, navigate to the root of the WPT repository, and enter +the following command: + + python ./wpt lint fetch/api/basic + +If this recognizes any of those common mistakes in the new files, it will tell +you where they are and how to fix them. If you do have changes to make, you can +run the command again to make sure you got them right. + +Now, we'll run the test using the automated test runner. This is important for +testharness.js tests because there are subtleties of the automated test runner +which can influence how the test behaves. That's not to say your test has to +pass in all browsers (or even in *any* browser). But if we expect the test to +pass, then running it this way will help us catch other kinds of mistakes. + +The tools support running the tests in many different browsers. We'll use +Firefox this time: + + python ./wpt run firefox fetch/api/basic/set-cookie.html + +We expect this test to pass, so if it does, we're ready to submit it. If we +were testing a web-platform feature that Firefox didn't support, we would +expect the test to fail instead. + +There are a few problems to look out for in addition to passing/failing status. +The report will describe fewer tests than we expect if the test isn't run at +all. That's usually a sign of a formatting mistake, so you'll want to make sure +you've used the right file names and metadata. Separately, the web browser +might crash. That's often a sign of a browser bug, so you should consider +[reporting it to the browser's +maintainers](https://rachelandrew.co.uk/archives/2017/01/30/reporting-browser-bugs/)! + +## Submitting the test + +First, let's stage the new files for committing: + + $ git add fetch/api/basic/set-cookie.asis + $ git add fetch/api/basic/set-cookie.html + +We can make sure the commit has everything we want to submit (and nothing we +don't) by using `git diff`: + + $ git diff --staged + +On most systems, you can use the arrow keys to navigate through the changes, +and you can press the `q` key when you're done reviewing. + +Next, we'll create a commit with the staged changes: + + $ git commit -m '[fetch] Add test for setting cookies' + +And now we can push the commit to our fork of WPT: + + $ git push origin fetch-cookie + +The last step is to submit the test for review. WPT doesn't actually need the +test we wrote in this tutorial, but if we wanted to submit it for inclusion in +the repository, we would create a pull request on GitHub. [The guide on git and +GitHub](github-intro) has all the details on how to do that. + +## More practice + +Here are some ways you can keep experimenting with WPT using this test: + +- Improve the test's readability by defining helper functions like + `cookieIsSet` and `deleteCookie` +- Improve the test's coverage by refactoring it into [a "multi-global" + test](testharness) +- Improve the test's coverage by writing more subtests (e.g. the behavior when + the fetch operation is aborted by `window.stop`, or the behavior when the + HTTP response sets multiple cookies) diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/testharness.md b/tests/wpt/web-platform-tests/docs/writing-tests/testharness.md index 7d38742a740..17ee097ce18 100644 --- a/tests/wpt/web-platform-tests/docs/writing-tests/testharness.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/testharness.md @@ -25,6 +25,10 @@ documented in two sections: See [server features](server-features) for advanced testing features that are commonly used with testharness.js. See also the [general guidelines](general-guidelines) for all test types. +This page describes testharness.js exhaustively; [the tutorial on writing a +testharness.js test](testharness-tutorial) provides a concise guide to writing +a test--a good place to start for newcomers to the project. + ## Variants A test file can have multiple variants by including `meta` elements, diff --git a/tests/wpt/web-platform-tests/dom/collections/HTMLCollection-own-props.html b/tests/wpt/web-platform-tests/dom/collections/HTMLCollection-own-props.html new file mode 100644 index 00000000000..1f21c0837ec --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/collections/HTMLCollection-own-props.html @@ -0,0 +1,109 @@ +<!doctype html> +<meta charset=utf-8> +<title>HTMLCollection getters and own properties</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<div id=log></div> +<script> +function append(t, tag, name) { + var element = document.createElement(tag); + if (name) { + element.id = name; + } + document.body.appendChild(element); + t.add_cleanup(function() { element.remove(); }); + return element; +} + +test(function() { + var name = "named", tag = "a"; + var c = document.getElementsByTagName(tag); + var element = append(this, tag, name); + assert_equals(c[name], element); + c[name] = "foo"; + assert_equals(c[name], element); +}, "Setting non-array index while named property exists (loose)"); + +test(function() { + "use strict"; + var name = "named", tag = "b"; + var c = document.getElementsByTagName(tag); + var element = append(this, tag, name); + assert_equals(c[name], element); + assert_throws(new TypeError(), function() { + c[name] = "foo"; + }); + assert_equals(c[name], element); +}, "Setting non-array index while named property exists (strict)"); + +test(function() { + var name = "named", tag = "i"; + var c = document.getElementsByTagName(tag); + assert_equals(c[name], undefined); + c[name] = "foo"; + assert_equals(c[name], "foo"); + + var element = append(this, tag, name); + assert_equals(c[name], "foo"); + assert_equals(c.namedItem(name), element); +}, "Setting non-array index while named property doesn't exist (loose)"); + +test(function() { + "use strict"; + var name = "named", tag = "p"; + var c = document.getElementsByTagName(tag); + assert_equals(c[name], undefined); + c[name] = "foo"; + assert_equals(c[name], "foo"); + + var element = append(this, tag, name); + assert_equals(c[name], "foo"); + assert_equals(c.namedItem(name), element); +}, "Setting non-array index while named property doesn't exist (strict)"); + +test(function() { + var tag = "q"; + var c = document.getElementsByTagName(tag); + var element = append(this, tag); + assert_equals(c[0], element); + c[0] = "foo"; + assert_equals(c[0], element); +}, "Setting array index while indexed property exists (loose)"); + +test(function() { + "use strict"; + var tag = "s"; + var c = document.getElementsByTagName(tag); + var element = append(this, tag); + assert_equals(c[0], element); + assert_throws(new TypeError(), function() { + c[0] = "foo"; + }); + assert_equals(c[0], element); +}, "Setting array index while indexed property exists (strict)"); + +test(function() { + var tag = "u"; + var c = document.getElementsByTagName(tag); + assert_equals(c[0], undefined); + c[0] = "foo"; + assert_equals(c[0], undefined); + + var element = append(this, tag); + assert_equals(c[0], element); +}, "Setting array index while indexed property doesn't exist (loose)"); + +test(function() { + "use strict"; + var tag = "u"; + var c = document.getElementsByTagName(tag); + assert_equals(c[0], undefined); + assert_throws(new TypeError(), function() { + c[0] = "foo"; + }); + assert_equals(c[0], undefined); + + var element = append(this, tag); + assert_equals(c[0], element); +}, "Setting array index while indexed property doesn't exist (strict)"); +</script> diff --git a/tests/wpt/web-platform-tests/dom/nodes/aria-attribute-reflection.tentative.html b/tests/wpt/web-platform-tests/dom/nodes/aria-attribute-reflection.tentative.html new file mode 100644 index 00000000000..0a3a66bdf43 --- /dev/null +++ b/tests/wpt/web-platform-tests/dom/nodes/aria-attribute-reflection.tentative.html @@ -0,0 +1,417 @@ +<!DOCTYPE HTML> +<html> + <head> + <meta charset="utf-8" /> + <title>Element Reflection for aria-activedescendant and aria-errormessage</title> + <link rel=help href="https://wicg.github.io/aom/spec/aria-reflection.html"> + <link rel="author" title="Meredith Lane" href="meredithl@chromium.org"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> +<div id="role" role="button"></div> + +<script> +test(function(t) { + var element = document.getElementById("role"); + assert_equals(element.role, "button"); + element.role = "checkbox"; + assert_equals(element.getAttribute("role"), "checkbox"); +}, "role attribute reflects."); +</script> + +<div id="atomic" aria-atomic="true"></div> + +<script> +test(function(t) { + var element = document.getElementById("atomic"); + assert_equals(element.ariaAtomic, "true"); + element.ariaAtomic = "false"; + assert_equals(element.getAttribute("aria-atomic"), "false"); +}, "aria-atomic attribute reflects."); +</script> + +<div id="autocomplete" aria-autocomplete="list"></div> + +<script> +test(function(t) { + var element = document.getElementById("autocomplete"); + assert_equals(element.ariaAutoComplete, "list"); + element.ariaAutoComplete = "inline"; + assert_equals(element.getAttribute("aria-autocomplete"), "inline"); +}, "aria-autocomplete attribute reflects."); +</script> + +<div id="busy" aria-busy="true"></div> + +<script> +test(function(t) { + var element = document.getElementById("busy"); + assert_equals(element.ariaBusy, "true"); + element.ariaBusy = "false"; + assert_equals(element.getAttribute("aria-busy"), "false"); +}, "aria-busy attribute reflects."); +</script> + +<div id="checked" aria-checked="mixed"></div> + +<script> +test(function(t) { + var element = document.getElementById("checked"); + assert_equals(element.ariaChecked, "mixed"); + element.ariaChecked = "true"; + assert_equals(element.getAttribute("aria-checked"), "true"); +}, "aria-checked attribute reflects."); +</script> + +<div id="colcount" aria-colcount="5"></div> + +<script> +test(function(t) { + var element = document.getElementById("colcount"); + assert_equals(element.ariaColCount, "5"); + element.ariaColCount = "6"; + assert_equals(element.getAttribute("aria-colcount"), "6"); +}, "aria-colcount attribute reflects."); +</script> + +<div id="colindex" aria-colindex="1"></div> + +<script> +test(function(t) { + var element = document.getElementById("colindex"); + assert_equals(element.ariaColIndex, "1"); + element.ariaColIndex = "2"; + assert_equals(element.getAttribute("aria-colindex"), "2"); +}, "aria-colindex attribute reflects."); +</script> + +<div id="colspan" aria-colspan="2"></div> + +<script> +test(function(t) { + var element = document.getElementById("colspan"); + assert_equals(element.ariaColSpan, "2"); + element.ariaColSpan = "3"; + assert_equals(element.getAttribute("aria-colspan"), "3"); +}, "aria-colspan attribute reflects."); +</script> + +<div id="current" aria-current="page"></div> + +<script> +test(function(t) { + var element = document.getElementById("current"); + assert_equals(element.ariaCurrent, "page"); + element.ariaCurrent = "step"; + assert_equals(element.getAttribute("aria-current"), "step"); +}, "aria-current attribute reflects."); +</script> + +<div id="disabled" aria-disabled="true"></div> + +<script> +test(function(t) { + var element = document.getElementById("disabled"); + assert_equals(element.ariaDisabled, "true"); + element.ariaDisabled = "false"; + assert_equals(element.getAttribute("aria-disabled"), "false"); +}, "aria-disabled attribute reflects."); +</script> + +<div id="expanded" aria-expanded="true"></div> + +<script> +test(function(t) { + var element = document.getElementById("expanded"); + assert_equals(element.ariaExpanded, "true"); + element.ariaExpanded = "false"; + assert_equals(element.getAttribute("aria-expanded"), "false"); +}, "aria-expanded attribute reflects."); +</script> + +<div id="haspopup" aria-haspopup="menu"></div> + +<script> +test(function(t) { + var element = document.getElementById("haspopup"); + assert_equals(element.ariaHasPopup, "menu"); + element.ariaHasPopup = "listbox"; + assert_equals(element.getAttribute("aria-haspopup"), "listbox"); +}, "aria-haspopup attribute reflects."); +</script> + +<div id="hidden" aria-hidden="true" tabindex="-1"></div> + +<script> +test(function(t) { + var element = document.getElementById("hidden"); + assert_equals(element.ariaHidden, "true"); + element.ariaHidden = "false"; + assert_equals(element.getAttribute("aria-hidden"), "false"); +}, "aria-hidden attribute reflects."); +</script> + +<div id="keyshortcuts" aria-keyshortcuts="x"></div> + +<script> +test(function(t) { + var element = document.getElementById("keyshortcuts"); + assert_equals(element.ariaKeyShortcuts, "x"); + element.ariaKeyShortcuts = "y"; + assert_equals(element.getAttribute("aria-keyshortcuts"), "y"); +}, "aria-keyshortcuts attribute reflects."); +</script> + +<div id="label" aria-label="x"></div> + +<script> +test(function(t) { + var element = document.getElementById("label"); + assert_equals(element.ariaLabel, "x"); + element.ariaLabel = "y"; + assert_equals(element.getAttribute("aria-label"), "y"); +}, "aria-label attribute reflects."); +</script> + +<div id="level" aria-level="1"></div> + +<script> +test(function(t) { + var element = document.getElementById("level"); + assert_equals(element.ariaLevel, "1"); + element.ariaLevel = "2"; + assert_equals(element.getAttribute("aria-level"), "2"); +}, "aria-level attribute reflects."); +</script> + +<div id="live" aria-live="polite"></div> + +<script> +test(function(t) { + var element = document.getElementById("live"); + assert_equals(element.ariaLive, "polite"); + element.ariaLive = "assertive"; + assert_equals(element.getAttribute("aria-live"), "assertive"); +}, "aria-live attribute reflects."); +</script> + +<div id="modal" aria-modal="true"></div> + +<script> +test(function(t) { + var element = document.getElementById("modal"); + assert_equals(element.ariaModal, "true"); + element.ariaModal = "false"; + assert_equals(element.getAttribute("aria-modal"), "false"); +}, "aria-modal attribute reflects."); +</script> + +<div id="multiline" aria-multiline="true"></div> + +<script> +test(function(t) { + var element = document.getElementById("multiline"); + assert_equals(element.ariaMultiLine, "true"); + element.ariaMultiLine = "false"; + assert_equals(element.getAttribute("aria-multiline"), "false"); +}, "aria-multiline attribute reflects."); +</script> + +<div id="multiselectable" aria-multiselectable="true"></div> + +<script> +test(function(t) { + var element = document.getElementById("multiselectable"); + assert_equals(element.ariaMultiSelectable, "true"); + element.ariaMultiSelectable = "false"; + assert_equals(element.getAttribute("aria-multiselectable"), "false"); +}, "aria-multiselectable attribute reflects."); +</script> + +<div id="orientation" aria-orientation="vertical"></div> + +<script> +test(function(t) { + var element = document.getElementById("orientation"); + assert_equals(element.ariaOrientation, "vertical"); + element.ariaOrientation = "horizontal"; + assert_equals(element.getAttribute("aria-orientation"), "horizontal"); +}, "aria-orientation attribute reflects."); +</script> + +<div id="placeholder" aria-placeholder="x"></div> + +<script> +test(function(t) { + var element = document.getElementById("placeholder"); + assert_equals(element.ariaPlaceholder, "x"); + element.ariaPlaceholder = "y"; + assert_equals(element.getAttribute("aria-placeholder"), "y"); +}, "aria-placeholder attribute reflects."); +</script> + +<div id="posinset" aria-posinset="10"></div> + +<script> +test(function(t) { + var element = document.getElementById("posinset"); + assert_equals(element.ariaPosInSet, "10"); + element.ariaPosInSet = "11"; + assert_equals(element.getAttribute("aria-posinset"), "11"); +}, "aria-posinset attribute reflects."); +</script> + +<button id="pressed" aria-pressed="true"></button> + +<script> +test(function(t) { + var element = document.getElementById("pressed"); + assert_equals(element.ariaPressed, "true"); + element.ariaPressed = "false"; + assert_equals(element.getAttribute("aria-pressed"), "false"); +}, "aria-pressed attribute reflects."); +</script> + +<div id="readonly" aria-readonly="true"></div> + +<script> +test(function(t) { + var element = document.getElementById("readonly"); + assert_equals(element.ariaReadOnly, "true"); + element.ariaReadOnly = "false"; + assert_equals(element.getAttribute("aria-readonly"), "false"); +}, "aria-readonly attribute reflects."); +</script> + +<div id="relevant" aria-relevant="text"></div> + +<script> +test(function(t) { + var element = document.getElementById("relevant"); + assert_equals(element.ariaRelevant, "text"); + element.ariaRelevant = "removals"; + assert_equals(element.getAttribute("aria-relevant"), "removals"); +}, "aria-relevant attribute reflects."); +</script> + +<div id="required" aria-required="true"></div> + +<script> +test(function(t) { + var element = document.getElementById("required"); + assert_equals(element.ariaRequired, "true"); + element.ariaRequired = "false"; + assert_equals(element.getAttribute("aria-required"), "false"); +}, "aria-required attribute reflects."); +</script> + +<div id="roledescription" aria-roledescription="x"></div> + +<script> +test(function(t) { + var element = document.getElementById("roledescription"); + assert_equals(element.ariaRoleDescription, "x"); + element.ariaRoleDescription = "y"; + assert_equals(element.getAttribute("aria-roledescription"), "y"); +}, "aria-roledescription attribute reflects."); +</script> + +<div id="rowcount" aria-rowcount="10"></div> + +<script> +test(function(t) { + var element = document.getElementById("rowcount"); + assert_equals(element.ariaRowCount, "10"); + element.ariaRowCount = "11"; + assert_equals(element.getAttribute("aria-rowcount"), "11"); +}, "aria-rowcount attribute reflects."); +</script> + +<div id="rowindex" aria-rowindex="1"></div> + +<script> +test(function(t) { + var element = document.getElementById("rowindex"); + assert_equals(element.ariaRowIndex, "1"); + element.ariaRowIndex = "2"; + assert_equals(element.getAttribute("aria-rowindex"), "2"); +}, "aria-rowindex attribute reflects."); +</script> + +<div id="rowspan" aria-rowspan="2"></div> + +<script> +test(function(t) { + var element = document.getElementById("rowspan"); + assert_equals(element.ariaRowSpan, "2"); + element.ariaRowSpan = "3"; + assert_equals(element.getAttribute("aria-rowspan"), "3"); +}, "aria-rowspan attribute reflects."); +</script> + +<div id="setsize" aria-setsize="10"></div> + +<script> +test(function(t) { + var element = document.getElementById("setsize"); + assert_equals(element.ariaSelected, "10"); + element.ariaSelected = "11"; + assert_equals(element.getAttribute("aria-setsize"), "11"); +}, "aria-setsize attribute reflects."); +</script> + +<div id="sort" aria-sort="descending"></div> + +<script> +test(function(t) { + var element = document.getElementById("sort"); + assert_equals(element.ariaSort, "descending"); + element.ariaSort = "ascending"; + assert_equals(element.getAttribute("aria-sort"), "ascending"); +}, "aria-sort attribute reflects."); +</script> + +<div id="valuemax" aria-valuemax="99"></div> + +<script> +test(function(t) { + var element = document.getElementById("valuemax"); + assert_equals(element.ariaValueMax, "99"); + element.ariaValueMax = "100"; + assert_equals(element.getAttribute("aria-valuemax"), "100"); +}, "aria-valuemax attribute reflects."); +</script> + +<div id="valuemin" aria-valuemin="3"></div> + +<script> +test(function(t) { + var element = document.getElementById("valuemin"); + assert_equals(element.ariaValueMin, "3"); + element.ariaValueMin = "2"; + assert_equals(element.getAttribute("aria-valuemin"), "2"); +}, "aria-valuemin attribute reflects."); +</script> + +<div id="valuenow" aria-valuenow="50"></div> + +<script> +test(function(t) { + var element = document.getElementById("valuenow"); + assert_equals(element.ariaValueNow, "50"); + element.ariaValueNow = "51"; + assert_equals(element.getAttribute("aria-valuenow"), "51"); +}, "aria-valuenow attribute reflects."); +</script> + +<div id="valuetext" aria-valuetext="50%"></div> + +<script> +test(function(t) { + var element = document.getElementById("valuetext"); + assert_equals(element.ariaValueText, "50%"); + element.ariaValueText = "51%"; + assert_equals(element.getAttribute("aria-valuetext"), "51%"); +}, "aria-valuetext attribute reflects."); +</script> +</html> diff --git a/tests/wpt/web-platform-tests/element-timing/scroll-to-text.html b/tests/wpt/web-platform-tests/element-timing/scroll-to-text.html index a86dd85ce9c..ed332740323 100644 --- a/tests/wpt/web-platform-tests/element-timing/scroll-to-text.html +++ b/tests/wpt/web-platform-tests/element-timing/scroll-to-text.html @@ -25,7 +25,7 @@ // We scroll to the end of the document so that the paragraph becomes visible. // A user agent could paint the text before or after scrolling, but either way // it must produce an entry for it. - window.scrollTo(0,document.body.scrollHeight); + window.scrollTo(0,document.scrollingElement.scrollHeight); }; }, 'Paragraph with elementtiming attribute is observed even when not initially visible.'); </script> diff --git a/tests/wpt/web-platform-tests/fetch/api/request/request-init-stream.any.js b/tests/wpt/web-platform-tests/fetch/api/request/request-init-stream.any.js index 22e3f41bc2d..df5fb26a0d8 100644 --- a/tests/wpt/web-platform-tests/fetch/api/request/request-init-stream.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/request/request-init-stream.any.js @@ -2,50 +2,50 @@ "use strict"; -async function assert_request(input, init) { +async function assert_request(test, input, init) { assert_throws(new TypeError(), () => new Request(input, init), "new Request()"); - assert_throws(new TypeError(), async () => await fetch(input, init), "fetch()"); + await promise_rejects_js(test, TypeError, fetch(input, init), "fetch()"); } -promise_test(async () => { +promise_test(async (t) => { const stream = new ReadableStream(); stream.getReader(); - await assert_request("...", { method:"POST", body: stream }); + await assert_request(t, "...", { method:"POST", body: stream }); }, "Constructing a Request with a stream on which getReader() is called"); -promise_test(async () => { +promise_test(async (t) => { const stream = new ReadableStream(); stream.getReader().read(); - await assert_request("...", { method:"POST", body: stream }); + await assert_request(t, "...", { method:"POST", body: stream }); }, "Constructing a Request with a stream on which read() is called"); -promise_test(async () => { +promise_test(async (t) => { const stream = new ReadableStream({ pull: c => c.enqueue(new Uint8Array()) }), reader = stream.getReader(); await reader.read(); reader.releaseLock(); - await assert_request("...", { method:"POST", body: stream }); + await assert_request(t, "...", { method:"POST", body: stream }); }, "Constructing a Request with a stream on which read() and releaseLock() are called"); -promise_test(async () => { +promise_test(async (t) => { const request = new Request("...", { method: "POST", body: "..." }); request.body.getReader(); - await assert_request(request); + await assert_request(t, request); assert_class_string(new Request(request, { body: "..." }), "Request"); }, "Constructing a Request with a Request on which body.getReader() is called"); -promise_test(async () => { +promise_test(async (t) => { const request = new Request("...", { method: "POST", body: "..." }); request.body.getReader().read(); - await assert_request(request); + await assert_request(t, request); assert_class_string(new Request(request, { body: "..." }), "Request"); }, "Constructing a Request with a Request on which body.getReader().read() is called"); -promise_test(async () => { +promise_test(async (t) => { const request = new Request("...", { method: "POST", body: "..." }), reader = request.body.getReader(); await reader.read(); reader.releaseLock(); - await assert_request(request); + await assert_request(t, request); assert_class_string(new Request(request, { body: "..." }), "Request"); }, "Constructing a Request with a Request on which read() and releaseLock() are called"); diff --git a/tests/wpt/web-platform-tests/fetch/api/response/response-static-error.html b/tests/wpt/web-platform-tests/fetch/api/response/response-static-error.html index 6e927a8bf62..b2d6e82d427 100644 --- a/tests/wpt/web-platform-tests/fetch/api/response/response-static-error.html +++ b/tests/wpt/web-platform-tests/fetch/api/response/response-static-error.html @@ -20,6 +20,16 @@ assert_true(responseError.headers.entries().next().done, "Headers should be empty"); }, "Check response returned by static method error()"); + + test(function() { + const headers = Response.error().headers; + + // Avoid false positives if expected API is not available + assert_true(!!headers); + assert_equals(typeof headers.append, 'function'); + + assert_throws_js(TypeError, function () { headers.append('name', 'value'); }); + }, "the 'guard' of the Headers instance should be immutable"); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-containing-iframe-manual.tentative.html b/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-containing-iframe-manual.tentative.html index 66d9c431613..08c420ec024 100644 --- a/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-containing-iframe-manual.tentative.html +++ b/tests/wpt/web-platform-tests/fullscreen/api/element-ready-check-containing-iframe-manual.tentative.html @@ -21,8 +21,8 @@ window.onload = function() { iframes[0].contentDocument.onfullscreenchange = t.step_func(function() { assert_equals(document.fullscreenElement, iframes[0]); trusted_request(t, iframes[1].contentDocument.body, iframes[0].contentDocument.body); - iframes[1].contentDocument.onfullscreenchange = t.unreached_func("fullscreenchange event"); - iframes[1].contentDocument.onfullscreenerror = t.step_func_done(); + iframes[1].contentDocument.onfullscreenerror = t.unreached_func("fullscreenerror event"); + iframes[1].contentDocument.onfullscreenchange = t.step_func_done(); }); }); }; diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-function-parent.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-function-parent.html index bd2d9dfdb1e..2efc3a6b4a6 100644 --- a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-function-parent.html +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-function-parent.html @@ -6,6 +6,7 @@ <div id=log></div> <iframe></iframe> <script> + setup({ single_test: true }); onload = function() { var fr = document.querySelector("iframe") fr.contentWindow.location = "support/dummy.html" diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-src-about-blank.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-src-about-blank.html index dce6ab2f693..0f8a633f1df 100644 --- a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-src-about-blank.html +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/source/navigate-child-src-about-blank.html @@ -6,6 +6,7 @@ <div id=log></div> <iframe></iframe> <script> + setup({ single_test: true }); onload = function() { var fr = document.querySelector("iframe") fr.src = "about:blank" diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-frag-percent-encoded.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-frag-percent-encoded.html index e8a1e9fd767..aa179425c5b 100644 --- a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-frag-percent-encoded.html +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-frag-percent-encoded.html @@ -15,31 +15,27 @@ var steps = [{ fragid:'has%20two%20spaces', handler: function(){ - assert_equals( scrollPosition(), 100 ); + assert_equals( document.scrollingElement.scrollTop, 100 ); } },{ fragid:'escape%20collision', handler: function(){ - assert_equals( scrollPosition(), 200 ); + assert_equals( document.scrollingElement.scrollTop, 200 ); document.getElementById("%20has%20two%20spaces").setAttribute("id", "has%20two%20spaces"); } },{ fragid:'has%20two%20spaces', handler: function(){ - assert_equals( scrollPosition(), 300 ); + assert_equals( document.scrollingElement.scrollTop, 300 ); } },{ fragid:'do%20not%20go%20here', handler: function(){ // don't move - assert_equals( scrollPosition(), 400 ); + assert_equals( document.scrollingElement.scrollTop, 400 ); } }]; -function scrollPosition(){ - return document.documentElement.scrollTop || document.body.scrollTop; -} - function runNextStep(){ if( steps.length > 0 ) { var step = steps.shift(); diff --git a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-top.html b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-top.html index 3265a71bf7c..bf62e4cd55c 100644 --- a/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-top.html +++ b/tests/wpt/web-platform-tests/html/browsers/browsing-the-web/scroll-to-fragid/scroll-to-top.html @@ -11,29 +11,25 @@ var steps = [{ fragid:'not-the-top', handler: function(){ - assert_not_equals( scrollPosition(), 0 ); + assert_not_equals( document.scrollingElement.scrollTop, 0 ); } },{ fragid:'top', handler: function(){ - assert_equals( scrollPosition(), 0 ); + assert_equals( document.scrollingElement.scrollTop, 0 ); } },{ fragid:'not-the-top', handler: function(){ - assert_not_equals( scrollPosition(), 0 ); + assert_not_equals( document.scrollingElement.scrollTop, 0 ); } },{ fragid:'TOP', handler: function(){ - assert_equals( scrollPosition(), 0 ); + assert_equals( document.scrollingElement.scrollTop, 0 ); } }]; -function scrollPosition(){ - return document.documentElement.scrollTop || document.body.scrollTop; -} - function runNextStep(){ if( steps.length > 0 ) { var step = steps.shift(); diff --git a/tests/wpt/web-platform-tests/html/browsers/sandboxing/sandbox-new-execution-context-iframe.html b/tests/wpt/web-platform-tests/html/browsers/sandboxing/sandbox-new-execution-context-iframe.html new file mode 100644 index 00000000000..dc15d57c6a3 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/sandboxing/sandbox-new-execution-context-iframe.html @@ -0,0 +1,5 @@ +<body> + <script> + document.__proto__.changeFromSandboxedIframe = "change from sandboxed iframe"; + </script> +</body>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/browsers/sandboxing/sandbox-new-execution-context.html b/tests/wpt/web-platform-tests/html/browsers/sandboxing/sandbox-new-execution-context.html new file mode 100644 index 00000000000..6692257bc41 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/browsers/sandboxing/sandbox-new-execution-context.html @@ -0,0 +1,40 @@ +<!doctype html> +<html> + <head> + <title>Reuse of iframe about:blank document execution context</title> + <link rel="author" title="Dan Clark" href="mailto:daniec@microsoft.com"> + <link rel="help" href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#sandboxing"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + </head> + + <body> + <h1>Reuse of iframe about:blank document execution context in sandbox="allow-scripts" iframe</h1> + <script type="text/javascript"> + var t = async_test("iframe with sandbox should load with new execution context") + + let iframe = document.createElement("iframe"); + iframe.src = './sandbox-new-execution-context-iframe.html'; + document.body.appendChild(iframe); + iframe.sandbox = "allow-scripts"; + + let iframeAboutBlankDocument = iframe.contentDocument; + assert_equals(iframeAboutBlankDocument.URL, "about:blank"); + + iframe.onload = t.step_func_done(() => { + assert_equals(iframe.contentDocument, null, + "New document in sandboxed iframe should have opaque origin"); + + assert_equals(iframeAboutBlankDocument.__proto__.changeFromSandboxedIframe, undefined, + "Sandboxed iframe contents should not have been able to mess with type system of about:blank document"); + + let iframeAboutBlankContents = iframeAboutBlankDocument.querySelectorAll('body'); + assert_equals(iframeAboutBlankContents[0].tagName, "BODY", + "about:blank document's contents should still be accessible"); + + t.done(); + }); + </script> + <div id="log"></div> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/tabindex-getter.html b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/tabindex-getter.html index 773739804b3..785e8c91ffa 100644 --- a/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/tabindex-getter.html +++ b/tests/wpt/web-platform-tests/html/interaction/focus/sequential-focus-navigation-and-the-tabindex-attribute/tabindex-getter.html @@ -4,6 +4,17 @@ <link rel="help" href="https://html.spec.whatwg.org/multipage/interaction.html#dom-tabindex"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<style> +#scrollable { + width: 100px; + height: 100px; + overflow: scroll; +} +#scrollable-inner { + width: 1024px; + height: 2048px; +} +</style> <body> <input> <input type="hidden"> @@ -26,6 +37,11 @@ <details><summary>summary</summary><summary id="secondsummary">second summary</summary>details</details> <div id="hostDelegatesFocus"></div> <div id="hostNonDelegatesFocus"></div> +<div contenteditable="true"></div> +<div id="scrollable"><div id="scrollable-inner"></div></div> +<fieldset></fieldset> +<output></output> +<slot></slot> <script> document.getElementById("hostDelegatesFocus").attachShadow({ mode: "open", delegatesFocus: true }); document.getElementById("hostNonDelegatesFocus").attachShadow({ mode: "open", delegatesFocus: false }); @@ -55,6 +71,11 @@ const defaultList = [ ["summary#secondsummary", -1], ["#hostDelegatesFocus", -1], ["#hostNonDelegatesFocus", -1], + ["div[contenteditable]", -1], + ["#scrollable", -1], + ["fieldset", -1], + ["output", -1], + ["slot", -1], ]; const tabIndexValue = [-1, 0, 1]; for (const entry of defaultList) { diff --git a/tests/wpt/web-platform-tests/html/interaction/focus/the-autofocus-attribute/not-on-first-task.html b/tests/wpt/web-platform-tests/html/interaction/focus/the-autofocus-attribute/not-on-first-task.html index 50efc176935..ab27342f4fe 100644 --- a/tests/wpt/web-platform-tests/html/interaction/focus/the-autofocus-attribute/not-on-first-task.html +++ b/tests/wpt/web-platform-tests/html/interaction/focus/the-autofocus-attribute/not-on-first-task.html @@ -13,10 +13,10 @@ <script> "use strict"; -const input = document.querySelector("input"); +test(() => { + const input = document.querySelector("input"); -assert_equals(document.activeElement, document.body); -assert_not_equals(document.activeElement, input); - -done(); + assert_equals(document.activeElement, document.body); + assert_not_equals(document.activeElement, input); +}); </script> diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display.html index 19f8d54df82..48b0e33d944 100644 --- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display.html +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display.html @@ -7,6 +7,7 @@ </style> <dialog open id=dialog></dialog> <script> -assert_equals(getComputedStyle(document.getElementById('dialog')).display, 'block'); -done(); +test(function() { + assert_equals(getComputedStyle(document.getElementById('dialog')).display, 'block'); +}); </script> diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/margin-collapsing-quirks/compare-computed-style.js b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/margin-collapsing-quirks/compare-computed-style.js index b25993fb730..496bae3a101 100644 --- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/margin-collapsing-quirks/compare-computed-style.js +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/margin-collapsing-quirks/compare-computed-style.js @@ -1,6 +1,7 @@ -var testStyle = getComputedStyle(document.getElementById('test')); -var refStyle = getComputedStyle(document.getElementById('ref')); -for (var prop in testStyle) { - assert_equals(testStyle[prop], refStyle[prop], prop); -} -done(); +test(function() { + var testStyle = getComputedStyle(document.getElementById('test')); + var refStyle = getComputedStyle(document.getElementById('ref')); + for (var prop in testStyle) { + assert_equals(testStyle[prop], refStyle[prop], prop); + } +}); diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-vspace-hspace-s.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-vspace-hspace-s.html index dae70b394a5..9f462b57686 100644 --- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-vspace-hspace-s.html +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-vspace-hspace-s.html @@ -7,9 +7,10 @@ <table vspace=25 hspace=25><tr><td>x</table> <div>x</div> <script> -var style = getComputedStyle(document.querySelector('table')); -['marginTop', 'marginRight', 'marginBottom', 'marginLeft'].forEach(function(m) { - assert_equals(style[m], '0px', m); +test(function() { + var style = getComputedStyle(document.querySelector('table')); + ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'].forEach(function(m) { + assert_equals(style[m], '0px', m); + }); }); -done(); </script> diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-vspace-hspace.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-vspace-hspace.html index 9a951954e28..c081775b873 100644 --- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-vspace-hspace.html +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/tables/table-vspace-hspace.html @@ -7,9 +7,10 @@ <table vspace=25 hspace=25><tr><td>x</table> <div>x</div> <!-- prevent margin collapsing quirks --> <script> -var style = getComputedStyle(document.querySelector('table')); -['marginTop', 'marginRight', 'marginBottom', 'marginLeft'].forEach(function(m) { - assert_equals(style[m], '0px', m); +test(function() { + var style = getComputedStyle(document.querySelector('table')); + ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'].forEach(function(m) { + assert_equals(style[m], '0px', m); + }); }); -done(); </script> diff --git a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-marginwidth-marginheight.html b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-marginwidth-marginheight.html index b5b49d1b867..b09cafbbe42 100644 --- a/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-marginwidth-marginheight.html +++ b/tests/wpt/web-platform-tests/html/rendering/non-replaced-elements/the-page/iframe-marginwidth-marginheight.html @@ -4,6 +4,7 @@ <script src="/resources/testharnessreport.js"></script> <iframe src="/common/blank.html" marginwidth=0 marginheight=0></iframe> <script> +setup({ single_test: true }); onload = () => { assert_equals(window[0].document.body.attributes.length, 0, "Number of attributes on the child document's body"); done(); diff --git a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html index 09454a13b20..3bf8cfb6cc8 100644 --- a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html +++ b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1.html @@ -9,6 +9,7 @@ <script> "use strict"; +setup({ single_test: true }); const sourceIFrame = document.createElement("iframe"); sourceIFrame.setAttribute("sandbox", "allow-same-origin"); diff --git a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2.html b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2.html index f5c4e991829..cc7eb5e5e02 100644 --- a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2.html +++ b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2.html @@ -9,6 +9,7 @@ <script> "use strict"; +setup({ single_test: true }); const sourceIFrame = document.createElement("iframe"); diff --git a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/dynamic-append.html b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/dynamic-append.html index e0896269f30..4d2fa789403 100644 --- a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/dynamic-append.html +++ b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/dynamic-append.html @@ -9,6 +9,7 @@ <script> "use strict"; +setup({ single_test: true }); const iframe = document.createElement("iframe"); let loadCount = 0; diff --git a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree.html b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree.html index ec979732e6f..2a9f301fffb 100644 --- a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree.html +++ b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree.html @@ -9,6 +9,7 @@ <div id="log"></div> <script> "use strict"; +setup({ single_test: true }); const iframe = document.createElement("iframe"); iframe.src = "support/ufoo"; diff --git a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document.html b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document.html index 66a067fcd84..1e608a3456b 100644 --- a/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document.html +++ b/tests/wpt/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/remove-from-document.html @@ -9,6 +9,7 @@ <script> "use strict"; +setup({ single_test: true }); const sourceIFrame = document.createElement("iframe"); let sourceLoadCount = 0; diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks.html index cf1b98c2bce..930d9cbd5b7 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks.html @@ -5,6 +5,7 @@ <script src="/common/media.js"></script> <div id="log"></div> <script> +setup({ single_test: true }); // https://html.spec.whatwg.org/#ready-states says: // // HAVE_FUTURE_DATA: "the text tracks are ready". diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_01.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_01.html index efd563f51ac..900d8cd0226 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_01.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_01.html @@ -6,6 +6,7 @@ <iframe src="about:blank"></iframe> <div id="target"></div> <script> +setup({ single_test: true }); onload = function() { var ifr = document.getElementsByTagName('iframe')[0]; ifr.contentDocument.body.appendChild(ifr.contentDocument.createElement('p')).textContent = 'Modified document'; diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_02.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_02.html index dbe266b2930..d82dafe3cec 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_02.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_02.html @@ -6,6 +6,7 @@ <iframe src="about:blank"></iframe> <div id="target"></div> <script> +setup({ single_test: true }); onload = function() { var ifr = document.getElementsByTagName('iframe')[0]; ifr.contentDocument.open(); diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_03.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_03.html index c07dd42dc81..5db77ad8902 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_03.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_03.html @@ -6,6 +6,7 @@ <iframe src="support/blank.htm"></iframe> <div id="target"></div> <script> +setup({ single_test: true }); onload = function() { var ifr = document.getElementsByTagName('iframe')[0]; ifr.contentDocument.body.appendChild(ifr.contentDocument.createElement('p')).textContent = 'Modified document'; diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_04.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_04.html index 755cd45d34b..bd076948abe 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_04.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/move_iframe_in_dom_04.html @@ -6,6 +6,7 @@ <iframe src="support/blank.htm"></iframe> <div id="target"></div> <script> +setup({ single_test: true }); onload = function(){ var ifr = document.getElementsByTagName('iframe')[0]; ifr.contentDocument.open(); diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_change_hash.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_change_hash.html index 457a07f9e2f..fe72333d1a6 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_change_hash.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/srcdoc_change_hash.html @@ -1,12 +1,10 @@ -<!-- - Test same-document navigation inside an srcdoc iframe using location.hash ---> +<title>same-document navigation inside an srcdoc iframe using location.hash</title> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-vendor.js"></script> <script> - async function test() { + promise_test(async () => { // Wait until 'document' is available. await new Promise(resolve => window.addEventListener('load', resolve)); @@ -66,8 +64,5 @@ await hash_changed; assert_equals(iframe.contentWindow.location.href, "about:srcdoc#2"); } - - done(); - } - test(); + }); </script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/data-url.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/data-url.html index 2fa63004390..808b5c884c5 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/data-url.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/data-url.html @@ -5,6 +5,8 @@ <script src="/resources/testharnessreport.js"></script> <div id=log></div> <script> +setup({ single_test: true }); + var c = document.createElement("canvas"), con = c.getContext("2d"), img = document.createElement("img") diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/avoid-reload-on-resize.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/avoid-reload-on-resize.html index a8038e56057..52366dcaa7f 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/avoid-reload-on-resize.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/srcset/avoid-reload-on-resize.html @@ -3,7 +3,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> -setup({explicit_done:true}); +setup({single_test:true}); const image_was_loaded = () => { const iframe = document.getElementById("iframe"); // Resize the iframe diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/update-src-complete.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/update-src-complete.html index 267c0082983..de3926a2964 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/update-src-complete.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/update-src-complete.html @@ -5,6 +5,8 @@ <script src="/resources/testharnessreport.js"></script> <p id="display"><img src="image.png"></p> <script> + setup({ single_test: true }); + function check() { var img = document.querySelector("img"); assert_true(img.complete, "By onload, image should have loaded"); diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/historical-search-event.html b/tests/wpt/web-platform-tests/html/semantics/forms/historical-search-event.html new file mode 100644 index 00000000000..b7a089a68e4 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/historical-search-event.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>search event should not be supported</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<input id=input type=search incremental> +<script> +promise_test(async t => { + const input = document.getElementById('input'); + const eventWatcher = new EventWatcher(t, input, ['search', 'keypress']); + await Promise.all([ + test_driver.send_keys(input, 'x'), + eventWatcher.wait_for(['keypress']) + ]); + // During this timeout, the search event will fire, if it's supported, + // which fails the test since the event watcher isn't expecting it. + await new Promise(resolve => t.step_timeout(resolve, 1000)); +}); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/historical.html b/tests/wpt/web-platform-tests/html/semantics/forms/historical.html index 6873ecd2517..277e1241610 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/historical.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/historical.html @@ -73,6 +73,18 @@ t('form', 'meter'); t('item', 'form'); t('namedItem', 'form'); +// Never specified but implemented in WebKit/Chromium +test(() => { + assert_false("onsearch" in window); +}, "window.onsearch should not be supported"); + +test(() => { + assert_false("onsearch" in document); +}, "document.onsearch should not be supported"); + +t('onsearch', 'input'); +t('incremental', 'input'); + // <input name=isindex> // removed in https://github.com/whatwg/html/commit/5c44abc734eb483f9a7ec79da5844d2fe63d9c3b async_test(function() { diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox-detached-change-event.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox-detached-change-event.html new file mode 100644 index 00000000000..43420790fdb --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/checkbox-detached-change-event.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +async_test(t => { + const input = document.createElement('input'); + input.type = 'checkbox'; + input.addEventListener('change', t.step_func_done(() => {})); + input.dispatchEvent(new MouseEvent('click')); +}, 'This test will pass if <input type=checkbox> emits change events while detached from document.body'); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/radio-detached-change-event.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/radio-detached-change-event.html new file mode 100644 index 00000000000..d1b18014981 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-input-element/radio-detached-change-event.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +async_test(t => { + const input = document.createElement('input'); + input.type = 'radio'; + input.addEventListener('change', t.step_func_done(() => {})); + input.dispatchEvent(new MouseEvent('click')); +}, 'This test will pass if <input type=radio> emits change events while detached from document.body'); +</script> diff --git a/tests/wpt/web-platform-tests/html/user-activation/activation-api-iframe-no-activate.tenative.html b/tests/wpt/web-platform-tests/html/user-activation/activation-api-iframe-no-activate.tenative.html index 8c7610e28b0..bd34518ba88 100644 --- a/tests/wpt/web-platform-tests/html/user-activation/activation-api-iframe-no-activate.tenative.html +++ b/tests/wpt/web-platform-tests/html/user-activation/activation-api-iframe-no-activate.tenative.html @@ -32,9 +32,9 @@ // click in parent document test_driver.click(document.getElementById('instructions')); } else if (msg.type == 'child-one-report') { - // state should be false after asked to report + // only the transient state should be false after asked to report assert_false(msg.isActive); - assert_false(msg.hasBeenActive); + assert_true(msg.hasBeenActive); t.done(); } })); diff --git a/tests/wpt/web-platform-tests/html/webappapis/timers/negative-setinterval.html b/tests/wpt/web-platform-tests/html/webappapis/timers/negative-setinterval.html index 430d13c58aa..663872cd1f3 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/timers/negative-setinterval.html +++ b/tests/wpt/web-platform-tests/html/webappapis/timers/negative-setinterval.html @@ -3,6 +3,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> +setup({ single_test: true }); var i = 0; var interval; function next() { diff --git a/tests/wpt/web-platform-tests/html/webappapis/timers/negative-settimeout.html b/tests/wpt/web-platform-tests/html/webappapis/timers/negative-settimeout.html index 57e88ee701d..b59fc8f2298 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/timers/negative-settimeout.html +++ b/tests/wpt/web-platform-tests/html/webappapis/timers/negative-settimeout.html @@ -3,6 +3,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> + setup({ single_test: true }); setTimeout(done, -100); setTimeout(assert_unreached, 10); </script> diff --git a/tests/wpt/web-platform-tests/html/webappapis/timers/type-long-setinterval.html b/tests/wpt/web-platform-tests/html/webappapis/timers/type-long-setinterval.html index af029959984..7fb81ff29ac 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/timers/type-long-setinterval.html +++ b/tests/wpt/web-platform-tests/html/webappapis/timers/type-long-setinterval.html @@ -3,6 +3,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> +setup({ single_test: true }); var interval; function next() { clearInterval(interval); diff --git a/tests/wpt/web-platform-tests/html/webappapis/timers/type-long-settimeout.html b/tests/wpt/web-platform-tests/html/webappapis/timers/type-long-settimeout.html index 31fa4f12642..4dc7d17ea5f 100644 --- a/tests/wpt/web-platform-tests/html/webappapis/timers/type-long-settimeout.html +++ b/tests/wpt/web-platform-tests/html/webappapis/timers/type-long-settimeout.html @@ -3,6 +3,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script> +setup({ single_test: true }); setTimeout(done, Math.pow(2, 32)); setTimeout(assert_unreached, 100); </script> diff --git a/tests/wpt/web-platform-tests/interfaces/web-nfc.idl b/tests/wpt/web-platform-tests/interfaces/web-nfc.idl index b13d047c551..d2ec623e864 100644 --- a/tests/wpt/web-platform-tests/interfaces/web-nfc.idl +++ b/tests/wpt/web-platform-tests/interfaces/web-nfc.idl @@ -18,7 +18,7 @@ interface NDEFRecord { constructor(NDEFRecordInit recordInit); readonly attribute USVString recordType; - readonly attribute USVString mediaType; + readonly attribute USVString? mediaType; readonly attribute USVString id; readonly attribute DataView? data; diff --git a/tests/wpt/web-platform-tests/interfaces/webxr.idl b/tests/wpt/web-platform-tests/interfaces/webxr.idl index 262fa2423af..1dab90eff49 100644 --- a/tests/wpt/web-platform-tests/interfaces/webxr.idl +++ b/tests/wpt/web-platform-tests/interfaces/webxr.idl @@ -50,10 +50,13 @@ enum XRVisibilityState { // Events attribute EventHandler onend; - attribute EventHandler onselect; attribute EventHandler oninputsourceschange; + attribute EventHandler onselect; attribute EventHandler onselectstart; attribute EventHandler onselectend; + attribute EventHandler onsqueeze; + attribute EventHandler onsqueezestart; + attribute EventHandler onsqueezeend; attribute EventHandler onvisibilitychange; }; diff --git a/tests/wpt/web-platform-tests/mixed-content/spec.src.json b/tests/wpt/web-platform-tests/mixed-content/spec.src.json index e4844a8016b..c272bb3f642 100644 --- a/tests/wpt/web-platform-tests/mixed-content/spec.src.json +++ b/tests/wpt/web-platform-tests/mixed-content/spec.src.json @@ -240,6 +240,9 @@ "http-rp", "meta" ], + "iframe-blank": [ + "meta" + ], "srcdoc": [ "meta" ], @@ -255,6 +258,7 @@ "supported_subresource": { "top": "*", "iframe": "*", + "iframe-blank": "*", "srcdoc": "*", "worker-classic": [ "xhr", diff --git a/tests/wpt/web-platform-tests/mixed-content/spec_json.js b/tests/wpt/web-platform-tests/mixed-content/spec_json.js index 009a853077b..00428b1fa5e 100644 --- a/tests/wpt/web-platform-tests/mixed-content/spec_json.js +++ b/tests/wpt/web-platform-tests/mixed-content/spec_json.js @@ -1 +1 @@ -var SPEC_JSON = {"subresource_schema": {"supported_delivery_type": {"picture-tag": [], "worklet-layout": [], "worklet-paint": [], "img-tag": [], "a-tag": [], "worklet-layout-import-data": [], "worklet-audio-import-data": [], "worklet-animation": [], "websocket": [], "worklet-paint-import-data": [], "video-tag": [], "object-tag": [], "worklet-audio": [], "beacon": [], "worker-module": [], "worker-import-data": [], "script-tag": [], "worklet-animation-import-data": [], "link-css-tag": [], "xhr": [], "worker-classic": [], "link-prefetch-tag": [], "audio-tag": [], "fetch": []}}, "excluded_tests": [{"delivery_value": null, "origin": "*", "delivery_type": "http-rp", "name": "Skip-redundant-no-opt-in", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"delivery_value": "*", "origin": "*", "delivery_type": "*", "name": "Redundant-subresources", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": {"blockable": ["a-tag"], "optionally-blockable": []}}, {"delivery_value": "*", "origin": ["same-https", "same-http", "cross-https", "cross-http"], "delivery_type": "*", "name": "Skip-origins-not-applicable-to-websockets", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": {"blockable": ["websocket"], "optionally-blockable": []}}, {"delivery_value": "opt-in", "origin": "*", "delivery_type": "meta", "name": "Skip-redundant-for-opt-in-method", "expectation": "*", "expansion": "*", "redirection": ["keep-scheme", "swap-scheme"], "source_context_list": "*", "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}], "specification": [{"test_expansion": [{"delivery_value": "opt-in", "origin": ["cross-http", "same-http"], "delivery_type": "*", "name": "opt-in-blocks", "expectation": "blocked", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}, {"delivery_value": null, "origin": ["cross-http", "same-http"], "delivery_type": "*", "name": "no-opt-in-allows", "expectation": "allowed", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}], "description": "Test behavior of optionally-blockable content", "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable", "name": "optionally-blockable", "title": "Optionally-blockable content"}, {"test_expansion": [{"delivery_value": "opt-in", "origin": ["cross-http", "same-http"], "delivery_type": "*", "name": "opt-in-blocks", "expectation": "blocked", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"delivery_value": null, "origin": ["cross-http", "same-http"], "delivery_type": "*", "name": "no-opt-in-blocks", "expectation": "blocked", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"delivery_value": "*", "origin": ["cross-ws", "same-ws"], "delivery_type": "*", "name": "ws-downgrade-blocks", "expectation": "blocked", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": "websocket", "optionally-blockable": []}}], "description": "Test behavior of blockable content.", "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable", "name": "blockable", "title": "Blockable content"}, {"test_expansion": [{"delivery_value": "*", "origin": ["same-https"], "delivery_type": "*", "name": "allowed", "expectation": "allowed", "expansion": "default", "redirection": ["no-redirect", "keep-scheme"], "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"delivery_value": "*", "origin": ["same-wss"], "delivery_type": "*", "name": "websocket-allowed", "expectation": "allowed", "expansion": "default", "redirection": ["no-redirect", "keep-scheme"], "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": "websocket", "optionally-blockable": []}}], "description": "Test behavior of allowed content.", "specification_url": "http://www.w3.org/TR/mixed-content/", "name": "allowed", "title": "Allowed content"}], "test_expansion_schema": {"delivery_value": [null, "opt-in"], "origin": ["same-https", "same-http", "cross-https", "cross-http", "same-wss", "same-ws", "cross-wss", "cross-ws"], "delivery_type": ["http-rp", "meta"], "subresource": {"blockable": ["script-tag", "link-css-tag", "xhr", "worker-classic", "worker-module", "worker-import-data", "worklet-animation", "worklet-audio", "worklet-layout", "worklet-paint", "worklet-animation-import-data", "worklet-audio-import-data", "worklet-layout-import-data", "worklet-paint-import-data", "fetch", "a-tag", "object-tag", "picture-tag", "websocket", "link-prefetch-tag", "beacon"], "optionally-blockable": ["img-tag", "audio-tag", "video-tag"]}, "expectation": ["allowed", "blocked"], "expansion": ["default", "override"], "redirection": ["no-redirect", "keep-scheme", "swap-scheme"], "source_context_list": ["top", "worker-classic-data", "worker-module-data"], "source_scheme": ["http", "https"]}, "source_context_list_schema": {"worker-classic-data": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-classic-data", "policyDeliveries": []}]}, "top": {"subresourcePolicyDeliveries": [], "description": "Policy set by the top-level Document", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}]}, "worker-module-data": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-module-data", "policyDeliveries": []}]}}, "delivery_key": "mixedContent", "source_context_schema": {"supported_delivery_type": {"iframe": ["http-rp", "meta"], "worker-module-data": [], "worker-classic-data": [], "top": ["http-rp", "meta"], "worker-classic": ["http-rp"], "worker-module": ["http-rp"], "srcdoc": ["meta"]}, "supported_subresource": {"iframe": "*", "worker-module-data": ["xhr", "fetch", "websocket"], "worker-classic-data": ["xhr", "fetch", "websocket"], "top": "*", "worker-classic": ["xhr", "fetch", "websocket"], "worker-module": ["xhr", "fetch", "websocket"], "srcdoc": "*"}}}; +var SPEC_JSON = {"subresource_schema": {"supported_delivery_type": {"picture-tag": [], "worklet-layout": [], "worklet-paint": [], "img-tag": [], "a-tag": [], "worklet-layout-import-data": [], "worklet-audio-import-data": [], "worklet-animation": [], "websocket": [], "worklet-paint-import-data": [], "video-tag": [], "object-tag": [], "worklet-audio": [], "beacon": [], "worker-module": [], "worker-import-data": [], "script-tag": [], "worklet-animation-import-data": [], "link-css-tag": [], "xhr": [], "worker-classic": [], "link-prefetch-tag": [], "audio-tag": [], "fetch": []}}, "excluded_tests": [{"delivery_value": null, "origin": "*", "delivery_type": "http-rp", "name": "Skip-redundant-no-opt-in", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"delivery_value": "*", "origin": "*", "delivery_type": "*", "name": "Redundant-subresources", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": {"blockable": ["a-tag"], "optionally-blockable": []}}, {"delivery_value": "*", "origin": ["same-https", "same-http", "cross-https", "cross-http"], "delivery_type": "*", "name": "Skip-origins-not-applicable-to-websockets", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": {"blockable": ["websocket"], "optionally-blockable": []}}, {"delivery_value": "opt-in", "origin": "*", "delivery_type": "meta", "name": "Skip-redundant-for-opt-in-method", "expectation": "*", "expansion": "*", "redirection": ["keep-scheme", "swap-scheme"], "source_context_list": "*", "source_scheme": "*", "subresource": {"blockable": "*", "optionally-blockable": "*"}}], "specification": [{"test_expansion": [{"delivery_value": "opt-in", "origin": ["cross-http", "same-http"], "delivery_type": "*", "name": "opt-in-blocks", "expectation": "blocked", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}, {"delivery_value": null, "origin": ["cross-http", "same-http"], "delivery_type": "*", "name": "no-opt-in-allows", "expectation": "allowed", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": [], "optionally-blockable": "*"}}], "description": "Test behavior of optionally-blockable content", "specification_url": "http://www.w3.org/TR/mixed-content/#category-optionally-blockable", "name": "optionally-blockable", "title": "Optionally-blockable content"}, {"test_expansion": [{"delivery_value": "opt-in", "origin": ["cross-http", "same-http"], "delivery_type": "*", "name": "opt-in-blocks", "expectation": "blocked", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"delivery_value": null, "origin": ["cross-http", "same-http"], "delivery_type": "*", "name": "no-opt-in-blocks", "expectation": "blocked", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": []}}, {"delivery_value": "*", "origin": ["cross-ws", "same-ws"], "delivery_type": "*", "name": "ws-downgrade-blocks", "expectation": "blocked", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": "websocket", "optionally-blockable": []}}], "description": "Test behavior of blockable content.", "specification_url": "http://www.w3.org/TR/mixed-content/#category-blockable", "name": "blockable", "title": "Blockable content"}, {"test_expansion": [{"delivery_value": "*", "origin": ["same-https"], "delivery_type": "*", "name": "allowed", "expectation": "allowed", "expansion": "default", "redirection": ["no-redirect", "keep-scheme"], "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": "*", "optionally-blockable": "*"}}, {"delivery_value": "*", "origin": ["same-wss"], "delivery_type": "*", "name": "websocket-allowed", "expectation": "allowed", "expansion": "default", "redirection": ["no-redirect", "keep-scheme"], "source_context_list": "*", "source_scheme": "https", "subresource": {"blockable": "websocket", "optionally-blockable": []}}], "description": "Test behavior of allowed content.", "specification_url": "http://www.w3.org/TR/mixed-content/", "name": "allowed", "title": "Allowed content"}], "test_expansion_schema": {"delivery_value": [null, "opt-in"], "origin": ["same-https", "same-http", "cross-https", "cross-http", "same-wss", "same-ws", "cross-wss", "cross-ws"], "delivery_type": ["http-rp", "meta"], "subresource": {"blockable": ["script-tag", "link-css-tag", "xhr", "worker-classic", "worker-module", "worker-import-data", "worklet-animation", "worklet-audio", "worklet-layout", "worklet-paint", "worklet-animation-import-data", "worklet-audio-import-data", "worklet-layout-import-data", "worklet-paint-import-data", "fetch", "a-tag", "object-tag", "picture-tag", "websocket", "link-prefetch-tag", "beacon"], "optionally-blockable": ["img-tag", "audio-tag", "video-tag"]}, "expectation": ["allowed", "blocked"], "expansion": ["default", "override"], "redirection": ["no-redirect", "keep-scheme", "swap-scheme"], "source_context_list": ["top", "worker-classic-data", "worker-module-data"], "source_scheme": ["http", "https"]}, "source_context_list_schema": {"worker-classic-data": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-classic-data", "policyDeliveries": []}]}, "top": {"subresourcePolicyDeliveries": [], "description": "Policy set by the top-level Document", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}]}, "worker-module-data": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "worker-module-data", "policyDeliveries": []}]}}, "delivery_key": "mixedContent", "source_context_schema": {"supported_delivery_type": {"iframe": ["http-rp", "meta"], "worker-module-data": [], "worker-classic-data": [], "top": ["http-rp", "meta"], "worker-classic": ["http-rp"], "iframe-blank": ["meta"], "worker-module": ["http-rp"], "srcdoc": ["meta"]}, "supported_subresource": {"iframe": "*", "worker-module-data": ["xhr", "fetch", "websocket"], "worker-classic-data": ["xhr", "fetch", "websocket"], "top": "*", "worker-classic": ["xhr", "fetch", "websocket"], "iframe-blank": "*", "worker-module": ["xhr", "fetch", "websocket"], "srcdoc": "*"}}}; diff --git a/tests/wpt/web-platform-tests/pointerevents/pointerevent_capture_mouse.html b/tests/wpt/web-platform-tests/pointerevents/pointerevent_capture_mouse.html index d8d54db6ba3..32056f09cc1 100644 --- a/tests/wpt/web-platform-tests/pointerevents/pointerevent_capture_mouse.html +++ b/tests/wpt/web-platform-tests/pointerevents/pointerevent_capture_mouse.html @@ -125,11 +125,10 @@ new test_driver.Actions().pointerMove(0, 0, {origin: target0}).send(); on_event(target1, "pointermove", function (event) { - if(isPointerCapture == true) { - test(function() { - assert_unreached("pointermove shouldn't trigger for this target when capture is enabled"); - }, "pointermove shouldn't trigger for the purple rectangle while the black rectangle has capture"); - } + test(function() { + assert_false(isPointerCapture, "pointermove shouldn't trigger for this target when capture is enabled"); + }, "pointermove shouldn't trigger for the purple rectangle while the black rectangle has capture"); + if(!pointermoveNoCaptureGot1) { test_pointermove1.done(); event_log.push('pointermove@target1'); diff --git a/tests/wpt/web-platform-tests/referrer-policy/spec.src.json b/tests/wpt/web-platform-tests/referrer-policy/spec.src.json index ab02dcc1b16..2674a45d6db 100644 --- a/tests/wpt/web-platform-tests/referrer-policy/spec.src.json +++ b/tests/wpt/web-platform-tests/referrer-policy/spec.src.json @@ -668,6 +668,9 @@ "meta", "http-rp" ], + "iframe-blank": [ + "meta" + ], "srcdoc": [ "meta" ], @@ -683,6 +686,7 @@ "supported_subresource": { "top": "*", "iframe": "*", + "iframe-blank": "*", "srcdoc": "*", "worker-classic": [ "xhr", diff --git a/tests/wpt/web-platform-tests/referrer-policy/spec_json.js b/tests/wpt/web-platform-tests/referrer-policy/spec_json.js index 1b507dbcf14..8a15eaee1eb 100644 --- a/tests/wpt/web-platform-tests/referrer-policy/spec_json.js +++ b/tests/wpt/web-platform-tests/referrer-policy/spec_json.js @@ -1 +1 @@ -var SPEC_JSON = {"subresource_schema": {"supported_delivery_type": {"img-tag": ["attr"], "sharedworker-classic": [], "xhr": [], "a-tag": ["attr", "rel-noref"], "area-tag": ["attr"], "iframe-tag": ["attr"], "worker-module": [], "script-tag": ["attr"], "fetch": [], "worker-classic": []}}, "excluded_tests": [{"delivery_value": "*", "origin": ["cross-http", "cross-https"], "delivery_type": "*", "name": "cross-origin-workers", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": ["worker-classic", "worker-module", "sharedworker-classic"]}, {"delivery_value": "*", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "upgraded-protocol-workers", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": ["worker-classic", "worker-module", "sharedworker-classic"]}, {"delivery_value": "*", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "mixed-content-insecure-subresources", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "*", "origin": "*", "delivery_type": "*", "name": "area-tag", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "area-tag"}, {"delivery_value": "*", "origin": "*", "delivery_type": "*", "name": "worker-requests-with-swap-origin-redirect", "expectation": "*", "expansion": "*", "redirection": "swap-origin", "source_context_list": "*", "source_scheme": "*", "subresource": ["worker-classic", "worker-module", "sharedworker-classic"]}, {"delivery_value": "*", "origin": "*", "delivery_type": "*", "name": "overhead-for-redirection", "expectation": "*", "expansion": "*", "redirection": ["keep-origin", "swap-origin"], "source_context_list": "*", "source_scheme": "*", "subresource": ["a-tag", "area-tag"]}, {"delivery_value": "*", "origin": "*", "delivery_type": "*", "name": "source-https-unsupported-by-web-platform-tests-runners", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": [null, "no-referrer-when-downgrade", "same-origin", "origin", "origin-when-cross-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"], "origin": "*", "delivery_type": "rel-noref", "name": "<link rel=noreferrer>'s delivery_value should be no-referrer", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "specification": [{"test_expansion": [{"delivery_value": null, "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "insecure-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": null, "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "upgrade-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": null, "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "downgrade-protocol", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": null, "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "secure-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}], "description": "Check that referrer URL follows no-referrer-when-downgrade policy when no explicit Referrer Policy is set.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policies", "name": "unset-referrer-policy", "title": "Referrer Policy is not explicitly defined"}, {"test_expansion": [{"delivery_value": "no-referrer", "origin": "*", "delivery_type": "*", "name": "generic", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "description": "Check that sub-resource never gets the referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer", "name": "no-referrer", "title": "Referrer Policy is set to 'no-referrer'"}, {"test_expansion": [{"delivery_value": "no-referrer-when-downgrade", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "insecure-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "no-referrer-when-downgrade", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "upgrade-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "no-referrer-when-downgrade", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "downgrade-protocol", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "no-referrer-when-downgrade", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "secure-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}], "description": "Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade", "name": "no-referrer-when-downgrade", "title": "Referrer Policy is set to 'no-referrer-when-downgrade'"}, {"test_expansion": [{"delivery_value": "origin", "origin": "*", "delivery_type": "*", "name": "generic", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "description": "Check that all subresources in all casses get only the origin portion of the referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin", "name": "origin", "title": "Referrer Policy is set to 'origin'"}, {"test_expansion": [{"delivery_value": "same-origin", "origin": "same-http", "delivery_type": "*", "name": "same-origin-insecure", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "same-origin", "origin": "same-https", "delivery_type": "*", "name": "same-origin-secure-default", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "same-origin", "origin": ["same-http", "same-https"], "delivery_type": "*", "name": "same-origin-insecure", "expectation": "omitted", "expansion": "override", "redirection": "swap-origin", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}, {"delivery_value": "same-origin", "origin": ["cross-http", "cross-https"], "delivery_type": "*", "name": "cross-origin", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "description": "Check that cross-origin subresources get no referrer information and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin", "name": "same-origin", "title": "Referrer Policy is set to 'same-origin'"}, {"test_expansion": [{"delivery_value": "origin-when-cross-origin", "origin": "same-http", "delivery_type": "*", "name": "same-origin-insecure", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "origin-when-cross-origin", "origin": "same-https", "delivery_type": "*", "name": "same-origin-secure-default", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "origin-when-cross-origin", "origin": "same-https", "delivery_type": "*", "name": "same-origin-upgrade", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "origin-when-cross-origin", "origin": "same-http", "delivery_type": "*", "name": "same-origin-downgrade", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "origin-when-cross-origin", "origin": ["same-http", "same-https"], "delivery_type": "*", "name": "same-origin-insecure", "expectation": "origin", "expansion": "override", "redirection": "swap-origin", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}, {"delivery_value": "origin-when-cross-origin", "origin": ["cross-http", "cross-https"], "delivery_type": "*", "name": "cross-origin", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "description": "Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin", "name": "origin-when-cross-origin", "title": "Referrer Policy is set to 'origin-when-cross-origin'"}, {"test_expansion": [{"delivery_value": "strict-origin", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "insecure-protocol", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "upgrade-protocol", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "downgrade-protocol", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "strict-origin", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "secure-protocol", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}], "description": "Check that non a priori insecure subresource gets only the origin portion of the referrer URL. A priori insecure subresource gets no referrer information.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin", "name": "strict-origin", "title": "Referrer Policy is set to 'strict-origin'"}, {"test_expansion": [{"delivery_value": "strict-origin-when-cross-origin", "origin": "same-http", "delivery_type": "*", "name": "same-insecure", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": "same-http", "delivery_type": "*", "name": "same-insecure", "expectation": "origin", "expansion": "override", "redirection": "swap-origin", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": "cross-http", "delivery_type": "*", "name": "cross-insecure", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "upgrade-protocol", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "downgrade-protocol", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": "same-https", "delivery_type": "*", "name": "same-secure", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": "same-https", "delivery_type": "*", "name": "same-secure", "expectation": "origin", "expansion": "override", "redirection": "swap-origin", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": "cross-https", "delivery_type": "*", "name": "cross-secure", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}], "description": "Check that a priori insecure subresource gets no referrer information. Otherwise, cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin", "name": "strict-origin-when-cross-origin", "title": "Referrer Policy is set to 'strict-origin-when-cross-origin'"}, {"test_expansion": [{"delivery_value": "unsafe-url", "origin": "*", "delivery_type": "*", "name": "generic", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "description": "Check that all sub-resources get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-unsafe-url", "name": "unsafe-url", "title": "Referrer Policy is set to 'unsafe-url'"}], "test_expansion_schema": {"delivery_value": [null, "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "origin-when-cross-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"], "origin": ["same-http", "same-https", "cross-http", "cross-https"], "delivery_type": ["attr", "rel-noref", "http-rp", "meta"], "subresource": ["iframe-tag", "img-tag", "script-tag", "a-tag", "area-tag", "xhr", "worker-classic", "worker-module", "sharedworker-classic", "fetch"], "expectation": ["omitted", "origin", "stripped-referrer"], "expansion": ["default", "override"], "redirection": ["no-redirect", "keep-origin", "swap-origin"], "source_context_list": ["top", "req", "srcdoc-inherit", "srcdoc", "iframe", "worker-classic", "worker-classic-data", "worker-module", "worker-module-data"], "source_scheme": ["http", "https"]}, "source_context_list_schema": {"srcdoc-inherit": {"subresourcePolicyDeliveries": [], "description": "srcdoc iframe should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "srcdoc"}]}, "worker-module": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-module", "policyDeliveries": ["policy"]}]}, "worker-module-data": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-module-data", "policyDeliveries": ["policy"]}]}, "worker-classic-data": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-classic-data", "policyDeliveries": ["policy"]}]}, "top": {"subresourcePolicyDeliveries": [], "description": "Policy set by the top-level Document", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}]}, "req": {"subresourcePolicyDeliveries": ["nonNullPolicy"], "description": "Subresource request's policy should override Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}]}, "worker-classic": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-classic", "policyDeliveries": ["policy"]}]}, "iframe": {"subresourcePolicyDeliveries": [], "description": "external iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "iframe", "policyDeliveries": ["policy"]}]}, "srcdoc": {"subresourcePolicyDeliveries": [], "description": "srcdoc iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "srcdoc", "policyDeliveries": ["nonNullPolicy"]}]}}, "delivery_key": "referrerPolicy", "source_context_schema": {"supported_delivery_type": {"iframe": ["meta", "http-rp"], "worker-module-data": [], "worker-classic-data": [], "top": ["meta", "http-rp"], "worker-classic": ["http-rp"], "worker-module": ["http-rp"], "srcdoc": ["meta"]}, "supported_subresource": {"iframe": "*", "worker-module-data": ["xhr", "fetch"], "worker-classic-data": ["xhr", "fetch"], "top": "*", "worker-classic": ["xhr", "fetch", "worker-classic", "worker-module"], "worker-module": ["xhr", "fetch", "worker-classic", "worker-module"], "srcdoc": "*"}}}; +var SPEC_JSON = {"subresource_schema": {"supported_delivery_type": {"img-tag": ["attr"], "sharedworker-classic": [], "xhr": [], "a-tag": ["attr", "rel-noref"], "area-tag": ["attr"], "iframe-tag": ["attr"], "worker-module": [], "script-tag": ["attr"], "fetch": [], "worker-classic": []}}, "excluded_tests": [{"delivery_value": "*", "origin": ["cross-http", "cross-https"], "delivery_type": "*", "name": "cross-origin-workers", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": ["worker-classic", "worker-module", "sharedworker-classic"]}, {"delivery_value": "*", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "upgraded-protocol-workers", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": ["worker-classic", "worker-module", "sharedworker-classic"]}, {"delivery_value": "*", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "mixed-content-insecure-subresources", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "*", "origin": "*", "delivery_type": "*", "name": "area-tag", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "area-tag"}, {"delivery_value": "*", "origin": "*", "delivery_type": "*", "name": "worker-requests-with-swap-origin-redirect", "expectation": "*", "expansion": "*", "redirection": "swap-origin", "source_context_list": "*", "source_scheme": "*", "subresource": ["worker-classic", "worker-module", "sharedworker-classic"]}, {"delivery_value": "*", "origin": "*", "delivery_type": "*", "name": "overhead-for-redirection", "expectation": "*", "expansion": "*", "redirection": ["keep-origin", "swap-origin"], "source_context_list": "*", "source_scheme": "*", "subresource": ["a-tag", "area-tag"]}, {"delivery_value": "*", "origin": "*", "delivery_type": "*", "name": "source-https-unsupported-by-web-platform-tests-runners", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": [null, "no-referrer-when-downgrade", "same-origin", "origin", "origin-when-cross-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"], "origin": "*", "delivery_type": "rel-noref", "name": "<link rel=noreferrer>'s delivery_value should be no-referrer", "expectation": "*", "expansion": "*", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "specification": [{"test_expansion": [{"delivery_value": null, "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "insecure-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": null, "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "upgrade-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": null, "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "downgrade-protocol", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": null, "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "secure-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}], "description": "Check that referrer URL follows no-referrer-when-downgrade policy when no explicit Referrer Policy is set.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policies", "name": "unset-referrer-policy", "title": "Referrer Policy is not explicitly defined"}, {"test_expansion": [{"delivery_value": "no-referrer", "origin": "*", "delivery_type": "*", "name": "generic", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "description": "Check that sub-resource never gets the referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer", "name": "no-referrer", "title": "Referrer Policy is set to 'no-referrer'"}, {"test_expansion": [{"delivery_value": "no-referrer-when-downgrade", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "insecure-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "no-referrer-when-downgrade", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "upgrade-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "no-referrer-when-downgrade", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "downgrade-protocol", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "no-referrer-when-downgrade", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "secure-protocol", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}], "description": "Check that non a priori insecure subresource gets the full Referrer URL. A priori insecure subresource gets no referrer information.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-no-referrer-when-downgrade", "name": "no-referrer-when-downgrade", "title": "Referrer Policy is set to 'no-referrer-when-downgrade'"}, {"test_expansion": [{"delivery_value": "origin", "origin": "*", "delivery_type": "*", "name": "generic", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "description": "Check that all subresources in all casses get only the origin portion of the referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin", "name": "origin", "title": "Referrer Policy is set to 'origin'"}, {"test_expansion": [{"delivery_value": "same-origin", "origin": "same-http", "delivery_type": "*", "name": "same-origin-insecure", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "same-origin", "origin": "same-https", "delivery_type": "*", "name": "same-origin-secure-default", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "same-origin", "origin": ["same-http", "same-https"], "delivery_type": "*", "name": "same-origin-insecure", "expectation": "omitted", "expansion": "override", "redirection": "swap-origin", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}, {"delivery_value": "same-origin", "origin": ["cross-http", "cross-https"], "delivery_type": "*", "name": "cross-origin", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "description": "Check that cross-origin subresources get no referrer information and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-same-origin", "name": "same-origin", "title": "Referrer Policy is set to 'same-origin'"}, {"test_expansion": [{"delivery_value": "origin-when-cross-origin", "origin": "same-http", "delivery_type": "*", "name": "same-origin-insecure", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "origin-when-cross-origin", "origin": "same-https", "delivery_type": "*", "name": "same-origin-secure-default", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "origin-when-cross-origin", "origin": "same-https", "delivery_type": "*", "name": "same-origin-upgrade", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "origin-when-cross-origin", "origin": "same-http", "delivery_type": "*", "name": "same-origin-downgrade", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "origin-when-cross-origin", "origin": ["same-http", "same-https"], "delivery_type": "*", "name": "same-origin-insecure", "expectation": "origin", "expansion": "override", "redirection": "swap-origin", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}, {"delivery_value": "origin-when-cross-origin", "origin": ["cross-http", "cross-https"], "delivery_type": "*", "name": "cross-origin", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "description": "Check that cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-origin-when-cross-origin", "name": "origin-when-cross-origin", "title": "Referrer Policy is set to 'origin-when-cross-origin'"}, {"test_expansion": [{"delivery_value": "strict-origin", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "insecure-protocol", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "upgrade-protocol", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "downgrade-protocol", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "strict-origin", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "secure-protocol", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}], "description": "Check that non a priori insecure subresource gets only the origin portion of the referrer URL. A priori insecure subresource gets no referrer information.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin", "name": "strict-origin", "title": "Referrer Policy is set to 'strict-origin'"}, {"test_expansion": [{"delivery_value": "strict-origin-when-cross-origin", "origin": "same-http", "delivery_type": "*", "name": "same-insecure", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": "same-http", "delivery_type": "*", "name": "same-insecure", "expectation": "origin", "expansion": "override", "redirection": "swap-origin", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": "cross-http", "delivery_type": "*", "name": "cross-insecure", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": ["same-https", "cross-https"], "delivery_type": "*", "name": "upgrade-protocol", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "http", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": ["same-http", "cross-http"], "delivery_type": "*", "name": "downgrade-protocol", "expectation": "omitted", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": "same-https", "delivery_type": "*", "name": "same-secure", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": "same-https", "delivery_type": "*", "name": "same-secure", "expectation": "origin", "expansion": "override", "redirection": "swap-origin", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}, {"delivery_value": "strict-origin-when-cross-origin", "origin": "cross-https", "delivery_type": "*", "name": "cross-secure", "expectation": "origin", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "https", "subresource": "*"}], "description": "Check that a priori insecure subresource gets no referrer information. Otherwise, cross-origin subresources get the origin portion of the referrer URL and same-origin get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-strict-origin-when-cross-origin", "name": "strict-origin-when-cross-origin", "title": "Referrer Policy is set to 'strict-origin-when-cross-origin'"}, {"test_expansion": [{"delivery_value": "unsafe-url", "origin": "*", "delivery_type": "*", "name": "generic", "expectation": "stripped-referrer", "expansion": "default", "redirection": "*", "source_context_list": "*", "source_scheme": "*", "subresource": "*"}], "description": "Check that all sub-resources get the stripped referrer URL.", "specification_url": "https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-unsafe-url", "name": "unsafe-url", "title": "Referrer Policy is set to 'unsafe-url'"}], "test_expansion_schema": {"delivery_value": [null, "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "origin-when-cross-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"], "origin": ["same-http", "same-https", "cross-http", "cross-https"], "delivery_type": ["attr", "rel-noref", "http-rp", "meta"], "subresource": ["iframe-tag", "img-tag", "script-tag", "a-tag", "area-tag", "xhr", "worker-classic", "worker-module", "sharedworker-classic", "fetch"], "expectation": ["omitted", "origin", "stripped-referrer"], "expansion": ["default", "override"], "redirection": ["no-redirect", "keep-origin", "swap-origin"], "source_context_list": ["top", "req", "srcdoc-inherit", "srcdoc", "iframe", "worker-classic", "worker-classic-data", "worker-module", "worker-module-data"], "source_scheme": ["http", "https"]}, "source_context_list_schema": {"srcdoc-inherit": {"subresourcePolicyDeliveries": [], "description": "srcdoc iframe should inherit parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}, {"sourceContextType": "srcdoc"}]}, "worker-module": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-module", "policyDeliveries": ["policy"]}]}, "worker-module-data": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-module-data", "policyDeliveries": ["policy"]}]}, "worker-classic-data": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-classic-data", "policyDeliveries": ["policy"]}]}, "top": {"subresourcePolicyDeliveries": [], "description": "Policy set by the top-level Document", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["policy"]}]}, "req": {"subresourcePolicyDeliveries": ["nonNullPolicy"], "description": "Subresource request's policy should override Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}]}, "worker-classic": {"subresourcePolicyDeliveries": [], "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "worker-classic", "policyDeliveries": ["policy"]}]}, "iframe": {"subresourcePolicyDeliveries": [], "description": "external iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "iframe", "policyDeliveries": ["policy"]}]}, "srcdoc": {"subresourcePolicyDeliveries": [], "description": "srcdoc iframe's policy should override parent Document's policy", "sourceContextList": [{"sourceContextType": "top", "policyDeliveries": ["anotherPolicy"]}, {"sourceContextType": "srcdoc", "policyDeliveries": ["nonNullPolicy"]}]}}, "delivery_key": "referrerPolicy", "source_context_schema": {"supported_delivery_type": {"iframe": ["meta", "http-rp"], "worker-module-data": [], "worker-classic-data": [], "top": ["meta", "http-rp"], "worker-classic": ["http-rp"], "iframe-blank": ["meta"], "worker-module": ["http-rp"], "srcdoc": ["meta"]}, "supported_subresource": {"iframe": "*", "worker-module-data": ["xhr", "fetch"], "worker-classic-data": ["xhr", "fetch"], "top": "*", "worker-classic": ["xhr", "fetch", "worker-classic", "worker-module"], "iframe-blank": "*", "worker-module": ["xhr", "fetch", "worker-classic", "worker-module"], "srcdoc": "*"}}}; diff --git a/tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js b/tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js index d279fcf40d8..811c0aeafce 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js +++ b/tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js @@ -32,7 +32,7 @@ function toMojoNDEFRecord(record) { } function toByteArray(data) { - // Convert JS objects to byte array. + // Converts JS objects to byte array. let byteArray = new Uint8Array(0); let tmpData = data; @@ -53,7 +53,7 @@ function toByteArray(data) { function compareNDEFRecords(providedRecord, receivedRecord) { assert_equals(providedRecord.recordType, receivedRecord.recordType); - // Compare media types without charset. + // Compares media types without charset. // Charset should be compared when watch method is implemented, in order // to check that written and read strings are equal. assert_equals(providedRecord.mediaType, @@ -176,6 +176,8 @@ var WebNFCTest = (() => { this.watchers_ = []; this.reading_messages_ = []; this.operations_suspended_ = false; + this.is_ndef_tech_ = true; + this.is_formatted_tag_ = false; } // NFC delegate functions. @@ -183,7 +185,7 @@ var WebNFCTest = (() => { let error = this.getHWError(); if (error) return error; - // Cancel previous pending push operation. + // Cancels previous pending push operation. if (this.pending_promise_func_) { this.cancelPendingPushOperation(); } @@ -193,16 +195,23 @@ var WebNFCTest = (() => { return new Promise(resolve => { this.pending_promise_func_ = resolve; - // Pend push operation if NFC operation is suspended. if (this.operations_suspended_) { - // Do nothing, pends push operation. + // Pends push operation if NFC operation is suspended. } else if (options.timeout && options.timeout !== Infinity && !this.push_completed_) { - // Resolve with TimeoutError, else pend push operation. + // Resolves with TimeoutError, else pend push operation. if (this.push_should_timeout_) { resolve( createNDEFError(device.mojom.NDEFErrorType.TIMER_EXPIRED)); } + } else if (!this.is_ndef_tech_) { + // Resolves with NotSupportedError if the device does not expose + // NDEF technology. + resolve(createNDEFError(device.mojom.NDEFErrorType.NOT_SUPPORTED)); + } else if (this.is_formatted_tag_ && !options.overwrite) { + // Resolves with NotAllowedError if there are NDEF records on the device + // and overwrite is false. + resolve(createNDEFError(device.mojom.NDEFErrorType.NOT_ALLOWED)); } else { resolve(createNDEFError(null)); } @@ -230,8 +239,9 @@ var WebNFCTest = (() => { } this.watchers_.push({id: id, options: options}); - // Ignore reading if NFC operation is suspended. - if(!this.operations_suspended_) { + // Ignores reading if NFC operation is suspended + // or the NFC tag does not expose NDEF technology. + if(!this.operations_suspended_ && this.is_ndef_tech_) { // Triggers onWatch if the new watcher matches existing messages. for (let message of this.reading_messages_) { if (matchesWatchOptions(message, options)) { @@ -301,6 +311,8 @@ var WebNFCTest = (() => { this.cancelPendingPushOperation(); this.bindingSet_.closeAllBindings(); this.interceptor_.stop(); + this.is_ndef_tech_ = true; + this.is_formatted_tag_ = false; } cancelPendingPushOperation() { @@ -319,9 +331,11 @@ var WebNFCTest = (() => { // Sets message that is used to deliver NFC reading updates. setReadingMessage(message) { this.reading_messages_.push(message); - // Ignore reading if NFC operation is suspended. + // Ignores reading if the NFC tag does not expose NDEF technology. + if(!this.is_ndef_tech_) return; + // Ignores reading if NFC operation is suspended. if(this.operations_suspended_) return; - // Ignore reading if NDEFPushOptions.ignoreRead is true. + // Ignores reading if NDEFPushOptions.ignoreRead is true. if(this.push_options_ && this.push_options_.ignoreRead) return; // Triggers onWatch if the new message matches existing watchers. @@ -350,7 +364,7 @@ var WebNFCTest = (() => { // Resumes pending NFC reading. for (let watcher of this.watchers_) { for (let message of this.reading_messages_) { - if (matchesWatchOptions(message, watcher.options)) { + if (matchesWatchOptions(message, watcher.options) && this.is_ndef_tech_) { this.client_.onWatch( [watcher.id], fake_tag_serial_number, toMojoNDEFMessage(message)); @@ -362,6 +376,14 @@ var WebNFCTest = (() => { this.pending_promise_func_(createNDEFError(null)); } } + + setIsNDEFTech(isNdef) { + this.is_ndef_tech_ = isNdef; + } + + setIsFormattedTag(isFormatted) { + this.is_formatted_tag_ = isFormatted; + } } let testInternal = { @@ -371,7 +393,7 @@ var WebNFCTest = (() => { class NFCTestChromium { constructor() { - Object.freeze(this); // Make it immutable. + Object.freeze(this); // Makes it immutable. } initialize() { diff --git a/tests/wpt/web-platform-tests/resources/testharness.js b/tests/wpt/web-platform-tests/resources/testharness.js index 9f7426b7d36..a44185c1eaf 100644 --- a/tests/wpt/web-platform-tests/resources/testharness.js +++ b/tests/wpt/web-platform-tests/resources/testharness.js @@ -3704,7 +3704,13 @@ policies and contribution forms [3]. }, false); addEventListener("unhandledrejection", function(e) { - var message = "Unhandled rejection: " + e.reason.message; + var reason; + if (e.reason) { + reason = e.reason.message ? e.reason.message : e.reason; + } else { + reason = e; + } + var message = "Unhandled rejection: " + reason; // There's no stack for unhandled rejections. error_handler(message); }, false); diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-error.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-error.https.html index 901c158f601..ca2f884a9b3 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-error.https.html +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-error.https.html @@ -7,34 +7,27 @@ </head> <body> <script> -var scope = "resources"; -var registration; +const scope = "./resources/in-scope"; promise_test(async (test) => { - registration = await navigator.serviceWorker.register("fetch-error-worker.js", { scope : scope }); - var activeWorker = registration.active; - if (activeWorker) - return; - activeWorker = registration.installing; - return new Promise(resolve => { - activeWorker.addEventListener('statechange', () => { - if (activeWorker.state === "activated") - resolve(); - }); - }); + const registration = await service_worker_unregister_and_register( + test, "./resources/fetch-error-worker.js", scope); + promise_test(async () => registration.unregister(), + "Unregister service worker"); + await wait_for_state(test, registration.installing, 'activated'); }, "Setup service worker"); promise_test(async (test) => { const iframe = await with_iframe(scope); - + test.add_cleanup(() => iframe.remove()); const response = await iframe.contentWindow.fetch("fetch-error-test"); - await response.text().then(assert_unreached, (error) => { assert_true(error.message.includes("Sorry")); }); - iframe.remove(); + try { + await response.text(); + assert_unreached(); + } catch (error) { + assert_true(error.message.includes("Sorry")); + } }, "Make sure a load that makes progress does not time out"); - -promise_test(async () => { - registration.unregister(); -}, "Unregister service worker"); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-error-worker.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-error-worker.js index 788252cf3b3..788252cf3b3 100644 --- a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-error-worker.js +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-error-worker.js diff --git a/tests/wpt/web-platform-tests/shadow-dom/focus/focus-method-delegatesFocus.html b/tests/wpt/web-platform-tests/shadow-dom/focus/focus-method-delegatesFocus.html index babe1760c70..9c61f663f88 100644 --- a/tests/wpt/web-platform-tests/shadow-dom/focus/focus-method-delegatesFocus.html +++ b/tests/wpt/web-platform-tests/shadow-dom/focus/focus-method-delegatesFocus.html @@ -228,5 +228,13 @@ test(() => { assert_equals(document.activeElement, slottedToFirstSlot); }, "focus() on host with delegatesFocus & tabindex=0, #slottedToFirstSlot, #slottedToSecondSlot, #belowSlots with tabindex=0"); +test(() => { + resetTabIndexAndFocus(); + setTabIndex([aboveSlots, belowSlots], 0); + belowSlots.focus(); + host.focus(); + assert_equals(shadowRoot.activeElement, belowSlots); +}, "focus() on host with delegatesFocus and already-focused non-first shadow descendant"); + </script> diff --git a/tests/wpt/web-platform-tests/tools/ci/azure/cleanup_win10.yml b/tests/wpt/web-platform-tests/tools/ci/azure/cleanup_win10.yml index 195cdee8edf..76852b58cd3 100644 --- a/tests/wpt/web-platform-tests/tools/ci/azure/cleanup_win10.yml +++ b/tests/wpt/web-platform-tests/tools/ci/azure/cleanup_win10.yml @@ -4,6 +4,7 @@ steps: - powershell: | function UninstallEdge($edgePath, $uninstallArgs) { + $exitCode = 0 try { cmd /c taskkill /f /im msedge* `> nul 2`> nul cmd /c taskkill /f /im setup.exe `> nul 2`> nul @@ -11,8 +12,11 @@ steps: $installerPath = Get-ChildItem -PATH $edgePath -Filter "setup.exe" -Recurse | Select -First 1 FullName if(-not($installerPath -eq $nul) -and (Test-Path $installerPath.FullName)) { Write-Host "Uninstall: $($installerPath.FullName) $uninstallArgs" - Start-Process "$($installerPath.FullName)" -ArgumentList $uninstallArgs -Wait - Remove-Item -Path $edgePath -Recurse -Force -ErrorAction SilentlyContinue + $setup = Start-Process "$($installerPath.FullName)" -ArgumentList $uninstallArgs -PassThru -Wait + $exitCode = $setup.ExitCode + if ($exitCode -ne $exitCodeSuccess) { + Write-Host "Uninstall failed with ExitCode=$exitCode" + } } else { Write-Host "Failed to find setup.exe under $edgePath" } @@ -20,24 +24,27 @@ steps: } catch [Exception] { Write-Host "Failed to uninstall Edge from $edgePath. ERROR= $($_.Exception.Message)" -ForegroundColor Red } + return $exitCode } function IsEdgeRunning() { return (Get-Process | Where-Object { $_.Name -eq "msedge" }).Length -gt 0 } + # Uninstall exit code success for Edge + $exitCodeSuccess = 19 # restore hosts file $hostFile = "$env:systemroot\System32\drivers\etc\hosts" Copy-Item -Path "$hostFile.back" -Destination $hostFile -Force # uninstall Edge - UninstallEdge "$env:localappdata\Microsoft\Edge\Application" "--uninstall --force-uninstall" - # uninstall Edge Canary channel - UninstallEdge "$env:localappdata\Microsoft\Edge SxS\Application" "--uninstall --msedge-sxs --system-level --force-uninstall" - # uninstall Edge Dev channel - UninstallEdge "$env:systemdrive\Program Files (x86)\Microsoft\Edge Dev\Application" "--uninstall --msedge-dev --system-level --force-uninstall" + $stableExitCode = UninstallEdge "$env:localappdata\Microsoft\Edge" "--uninstall --force-uninstall --verbose-logging" # uninstall Edge Beta channel - UninstallEdge "$env:systemdrive\Program Files (x86)\Microsoft\Edge Beta\Application" "--uninstall --msedge-beta --system-level --force-uninstall" + $betaExitCode = UninstallEdge "$env:systemdrive\Program Files (x86)\Microsoft\Edge Beta" "--uninstall --msedge-beta --force-uninstall --verbose-logging" + # uninstall Edge Dev channel + $devExitCode = UninstallEdge "$env:systemdrive\Program Files (x86)\Microsoft\Edge Dev" "--uninstall --msedge-dev --force-uninstall --verbose-logging" + # uninstall Edge Canary channel + $canaryExitCode = UninstallEdge "$env:localappdata\Microsoft\Edge SxS" "--uninstall --msedge-sxs --force-uninstall --verbose-logging" # Check if Edge is still running and try to close it. # If we fail to close it, then reboot the system @@ -50,7 +57,41 @@ steps: Restart-Computer -Force } } + if (($stableExitCode -ne $exitCodeSuccess) -and + ($betaExitCode -ne $exitCodeSuccess) -and + ($devExitCode -ne $exitCodeSuccess) -and + ($canaryExitCode -ne $exitCodeSuccess)) { + Copy-Item -Path "$env:temp\*edge*.log" -Destination $(Build.ArtifactStagingDirectory) -Force + Throw "Failed to uninstall Edge." + } else { + Write-Host "Successfully uninstalled all Edge channels" + } displayName: 'Restore hosts file and cleanup test machine' condition: always() errorActionPreference: silentlyContinue ignoreLASTEXITCODE: true + +- powershell: | + $channels = @('Edge', 'Edge Beta', 'Edge Dev', 'Edge SxS') + foreach ($channel in $channels) { + Write-Host "Deleting regkeys for $channel folder" + Remove-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft $channel" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft $channel" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:SOFTWARE\WOW6432Node\Microsoft\$channel" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:SOFTWARE\Microsoft\EdgeUpdate" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKLM:SOFTWARE\Microsoft\$channel" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKCU:SOFTWARE\Microsoft\EdgeUpdate" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "HKCU:SOFTWARE\Microsoft\$channel" -Recurse -Force -ErrorAction SilentlyContinue + + Write-Host "Deleting all remaining Edge folders" + Remove-Item -Path "$env:localappdata\Microsoft\EdgeUpdate" -Recurse -Force -ErrorAction SilentlyContinue + $edgePath = "$env:localappdata\Microsoft\$channel" + Remove-Item -Path $edgePath -Recurse -Force -ErrorAction SilentlyContinue + $edgePath = "$env:systemdrive\Program Files (x86)\Microsoft\$channel" + Remove-Item -Path $edgePath -Recurse -Force -ErrorAction SilentlyContinue + } + displayName: 'Cleanup Edge registry' + condition: always() + errorActionPreference: silentlyContinue + ignoreLASTEXITCODE: true diff --git a/tests/wpt/web-platform-tests/tools/ci/website_build.sh b/tests/wpt/web-platform-tests/tools/ci/website_build.sh index d23829f0bcd..f6b26310aab 100755 --- a/tests/wpt/web-platform-tests/tools/ci/website_build.sh +++ b/tests/wpt/web-platform-tests/tools/ci/website_build.sh @@ -52,6 +52,10 @@ touch .nojekyll # Publish the website by pushing the built contents to the `gh-pages` branch git add . +echo This submission alters the compiled files as follows + +git diff --staged + if is_pull_request ; then echo Submission comes from a pull request. Exiting without publishing. diff --git a/tests/wpt/web-platform-tests/tools/manifest/vcs.py b/tests/wpt/web-platform-tests/tools/manifest/vcs.py index d87e804c359..d4f47f6bf0a 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/vcs.py +++ b/tests/wpt/web-platform-tests/tools/manifest/vcs.py @@ -278,12 +278,11 @@ def walk(root): Unlike os.walk the implementation is not recursive.""" - listdir = os.listdir get_stat = os.stat - listdir = os.listdir - join = os.path.join is_dir = stat.S_ISDIR is_link = stat.S_ISLNK + join = os.path.join + listdir = os.listdir relpath = os.path.relpath root = os.path.abspath(root) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_webkit.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_webkit.txt index 25cc5846ee7..f85779a40bd 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_webkit.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_webkit.txt @@ -1,2 +1 @@ -mozprocess == 0.26 -selenium == 3.9.0 +mozprocess==0.26 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py index 77fe2971940..14f456aa476 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py @@ -841,7 +841,7 @@ class MarionetteRefTestExecutor(RefTestExecutor): return self.convert_result(test, result) def screenshot(self, test, viewport_size, dpi): - # https://github.com/w3c/wptrunner/issues/166 + # https://github.com/web-platform-tests/wpt/issues/7135 assert viewport_size is None assert dpi is None diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py index 5246a26fcbf..913a5e6d542 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py @@ -383,7 +383,7 @@ class SeleniumRefTestExecutor(RefTestExecutor): return self.convert_result(test, result) def screenshot(self, test, viewport_size, dpi): - # https://github.com/w3c/wptrunner/issues/166 + # https://github.com/web-platform-tests/wpt/issues/7135 assert viewport_size is None assert dpi is None diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py index 12a750fa0a3..67a433d9a58 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py @@ -282,7 +282,7 @@ class ServoWebDriverRefTestExecutor(RefTestExecutor): return test.result_cls("INTERNAL-ERROR", message), [] def screenshot(self, test, viewport_size, dpi): - # https://github.com/w3c/wptrunner/issues/166 + # https://github.com/web-platform-tests/wpt/issues/7135 assert viewport_size is None assert dpi is None diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index 65b6723cb82..a2601978b57 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -454,7 +454,7 @@ class WebDriverRefTestExecutor(RefTestExecutor): return self.convert_result(test, result) def screenshot(self, test, viewport_size, dpi): - # https://github.com/w3c/wptrunner/issues/166 + # https://github.com/web-platform-tests/wpt/issues/7135 assert viewport_size is None assert dpi is None diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py index c2cb5c4d26b..56fbf081119 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py @@ -707,6 +707,7 @@ class TestRunnerManager(threading.Thread): if self.test_runner_proc is None: return + self.browser.stop(force=True) self.logger.debug("waiting for runner process to end") self.test_runner_proc.join(10) self.logger.debug("After join") diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/webdriver_server.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/webdriver_server.py index 8b711272c7b..162ffae3fc9 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/webdriver_server.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/webdriver_server.py @@ -83,7 +83,10 @@ class WebDriverServer(object): def stop(self, force=False): self.logger.debug("Stopping WebDriver") if self.is_alive: - return self._proc.kill() + kill_result = self._proc.kill() + if force and kill_result != 0: + return self._proc.kill(9) + return kill_result return not self.is_alive @property diff --git a/tests/wpt/web-platform-tests/url/resources/setters_tests.json b/tests/wpt/web-platform-tests/url/resources/setters_tests.json index 6b7d19b1016..d54335f1bad 100644 --- a/tests/wpt/web-platform-tests/url/resources/setters_tests.json +++ b/tests/wpt/web-platform-tests/url/resources/setters_tests.json @@ -687,6 +687,17 @@ } }, { + "comment": "IPv6 literal address with port, crbug.com/1012416", + "href": "http://example.net", + "new_value": "[2001:db8::2]:4002", + "expected": { + "href": "http://[2001:db8::2]:4002/", + "host": "[2001:db8::2]:4002", + "hostname": "[2001:db8::2]", + "port": "4002" + } + }, + { "comment": "Default port number is removed", "href": "http://example.net", "new_value": "example.com:80", diff --git a/tests/wpt/web-platform-tests/web-animations/interfaces/Document/getAnimations.html b/tests/wpt/web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html index f6a6c3edd44..4730f186b34 100644 --- a/tests/wpt/web-platform-tests/web-animations/interfaces/Document/getAnimations.html +++ b/tests/wpt/web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html @@ -1,7 +1,7 @@ <!DOCTYPE html> <meta charset=utf-8> -<title>Document.getAnimations</title> -<link rel="help" href="https://drafts.csswg.org/web-animations/#dom-document-getanimations"> +<title>DocumentOrShadowRoot.getAnimations</title> +<link rel="help" href="https://drafts.csswg.org/web-animations-1/#dom-documentorshadowroot-getanimations"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="../../testcommon.js"></script> @@ -17,7 +17,8 @@ test(t => { assert_equals(document.getAnimations().length, 0, 'getAnimations returns an empty sequence for a document ' + 'with no animations'); -}, 'Test document.getAnimations for non-animated content'); +}, 'Document.getAnimations() returns an empty sequence for non-animated' + + ' content'); test(t => { const div = createDiv(t); @@ -30,7 +31,7 @@ test(t => { anim2.finish(); assert_equals(document.getAnimations().length, 0, 'getAnimation only returns running animations'); -}, 'Test document.getAnimations for script-generated animations') +}, 'Document.getAnimations() returns script-generated animations') test(t => { const div = createDiv(t); @@ -39,7 +40,8 @@ test(t => { assert_array_equals(document.getAnimations(), [ anim1, anim2 ], 'getAnimations() returns running animations'); -}, 'Test the order of document.getAnimations with script generated animations') +}, 'Document.getAnimations() returns script-generated animations in the order' + + ' they were created') test(t => { // This element exists but is not a descendent of any document, so isn't @@ -52,7 +54,7 @@ test(t => { document.body.appendChild(div); t.add_cleanup(() => { div.remove(); }); assert_equals(document.getAnimations().length, 1); -}, 'Test document.getAnimations for a disconnected node'); +}, 'Document.getAnimations() does not return a disconnected node'); test(t => { const effect = new KeyframeEffect(null, gKeyFrames, 100 * MS_PER_SEC); @@ -62,7 +64,7 @@ test(t => { assert_equals(document.getAnimations().length, 0, 'document.getAnimations() only returns animations targeting ' + 'elements in this document'); -}, 'Test document.getAnimations with null target'); +}, 'Document.getAnimations() does not return an animation with a null target'); promise_test(async t => { const iframe = document.createElement('iframe'); @@ -86,7 +88,66 @@ promise_test(async t => { assert_equals(document.getAnimations().length, 0); assert_equals(iframe.contentDocument.getAnimations().length, 1); anim.finish(); -}, 'Test document.getAnimations for elements inside same-origin iframes'); +}, 'Document.getAnimations() returns animations on elements inside same-origin' + + ' iframes'); + +test(t => { + const div = createDiv(t); + const shadow = div.attachShadow({ mode: 'open' }); + + // Create a tree with the following structure + // + // div + // | + // (ShadowRoot) + // / \ + // childA childB + // (*anim2) | + // grandChild + // (*anim1) + // + // This lets us test that: + // + // a) All children of the ShadowRoot are included + // b) Descendants of the children are included + // c) The result is sorted by composite order (since we fire anim1 before + // anim2 despite childA appearing first in tree order) + + const childA = createDiv(t); + shadow.append(childA); + + const childB = createDiv(t); + shadow.append(childB); + + const grandChild = createDiv(t); + childB.append(grandChild); + + const anim1 = grandChild.animate(gKeyFrames, 100 * MS_PER_SEC) + const anim2 = childA.animate(gKeyFrames, 100 * MS_PER_SEC) + + assert_array_equals( + div.shadowRoot.getAnimations(), + [ anim1, anim2 ], + 'getAnimations() called on ShadowRoot returns expected animations' + ); +}, 'ShadowRoot.getAnimations() return all animations in the shadow tree'); + +test(t => { + const div = createDiv(t); + const shadow = div.attachShadow({ mode: 'open' }); + + const child = createDiv(t); + shadow.append(child); + + child.animate(gKeyFrames, 100 * MS_PER_SEC) + + assert_array_equals( + document.getAnimations(), + [], + 'getAnimations() called on Document does not return animations from shadow' + + ' trees' + ); +}, 'Document.getAnimations() does NOT return animations in shadow trees'); promise_test(async t => { const div = createDiv(t); @@ -114,7 +175,7 @@ promise_test(async t => { // If getAnimations() flushed style, we should get a transitionrun event. await watcher.wait_for('transitionrun'); -}, 'Triggers a style change event'); +}, 'Document.getAnimations() triggers a style change event'); </script> </body> diff --git a/tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan.https.html b/tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan.https.html index 0a361009948..3fe95cc9147 100644 --- a/tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan.https.html +++ b/tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan.https.html @@ -191,4 +191,34 @@ test(() => { }); }, "NDEFReader.scan should fail if signal is not an AbortSignal."); +nfc_test(async (t, mockNFC) => { + const reader = new NDEFReader(); + mockNFC.setIsNDEFTech(false); + mockNFC.setReadingMessage(createMessage([createTextRecord(test_text_data)])); + + await new Promise((resolve, reject) => { + reader.onreading = () => reject("reading event should not be fired."); + reader.scan(); + t.step_timeout(resolve, 100); + }); +}, "Test that NDEFReader.onreading should not be fired if the NFC tag does not \ +expose NDEF technology."); + +nfc_test(async (t, mockNFC) => { + const reader = new NDEFReader(); + const controller = new AbortController(); + mockNFC.setReadingMessage({ records: [] }); + const readerWatcher = new EventWatcher(t, reader, ["reading", "error"]); + + const promise = readerWatcher.wait_for("reading").then(event => { + assert_equals(event.serialNumber, fake_tag_serial_number); + assert_equals(event.message.records.length, 0); + controller.abort(); + }); + // NDEFReader#scan() asynchronously dispatches the reading event. + reader.scan({signal : controller.signal}); + await promise; +}, "Test that NDEFReader.onreading should be fired on an unformatted NFC tag \ +with empty records array for NDEFMessage."); + </script> diff --git a/tests/wpt/web-platform-tests/web-nfc/NDEFWriter_push.https.html b/tests/wpt/web-platform-tests/web-nfc/NDEFWriter_push.https.html index b909bee3171..0d5722bfa01 100644 --- a/tests/wpt/web-platform-tests/web-nfc/NDEFWriter_push.https.html +++ b/tests/wpt/web-platform-tests/web-nfc/NDEFWriter_push.https.html @@ -19,6 +19,10 @@ const invalid_type_messages = // https://w3c.github.io/web-nfc/#the-push-method - Step 8. createMessage([{}]), + // NDEFMessageSource: not NDEF-formatable. + // https://w3c.github.io/web-nfc/#the-push-method - Step 8. + createMessage([]), + // https://w3c.github.io/web-nfc/#dfn-map-text-to-ndef // NDEFRecord must have data. createMessage([createTextRecord()]), @@ -442,4 +446,35 @@ nfc_test(async (t, mockNFC) => { }, "Test that mediaType should be set to 'application/octet-stream' if \ NDEFRecordInit.record's recordType is external type and NDEFRecordInit.record's \ mediaType is undefined."); + +nfc_test(async (t, mockNFC) => { + const writer = new NDEFWriter(); + mockNFC.setIsNDEFTech(false); + await promise_rejects(t, 'NotSupportedError', writer.push(test_text_data)); +}, "NDEFWriter.push should fail when the NFC device does not expose \ +NDEF technology."); + +nfc_test(async (t, mockNFC) => { + const writer = new NDEFWriter(); + await writer.push(test_text_data, { overwrite: false }); + assertNDEFMessagesEqual(test_text_data, mockNFC.pushedMessage()); +}, "NDEFWriter.push should succeed to push data to an unformatted NFC device \ +when the NDEFPushOptions.overwrite is false."); + +nfc_test(async (t, mockNFC) => { + const writer = new NDEFWriter(); + await writer.push(test_buffer_data); + assertNDEFMessagesEqual(test_buffer_data, mockNFC.pushedMessage()); + await writer.push(test_text_data, { overwrite: true }); + assertNDEFMessagesEqual(test_text_data, mockNFC.pushedMessage()); +}, "NDEFWriter.push should succeed to overwrite the existing data \ +when the NDEFPushOptions.overwrite is true."); + +nfc_test(async (t, mockNFC) => { + const writer = new NDEFWriter(); + const p = writer.push(test_text_data, { overwrite: false }); + mockNFC.setIsFormattedTag(true); + await promise_rejects(t, 'NotAllowedError', p); +}, "NDEFWriter.push should fail when there are NDEF records on the NFC device \ +and NDEFPushOptions.overwrite is false."); </script> diff --git a/tests/wpt/web-platform-tests/web-nfc/README.md b/tests/wpt/web-platform-tests/web-nfc/README.md index 87145b0e3ec..0787f1f6712 100644 --- a/tests/wpt/web-platform-tests/web-nfc/README.md +++ b/tests/wpt/web-platform-tests/web-nfc/README.md @@ -17,6 +17,8 @@ The `WebNFCTest` interface is defined as: setPushShouldTimeout(boolean result); // Sets flag to trigger the pending push to timeout. pushedMessage(); // Gets the pushed `NDEFMessageSource`. pushOptions(); // Gets the pushed `NDEFPushOptions`. + setIsNDEFTech(boolean isNDEF); // Sets if the NFC device exposes NDEF technology. + setIsFormattedTag(boolean isFormatted); // Sets if the NFC tag has formatted NDEF message. }; ``` |