diff options
92 files changed, 572 insertions, 472 deletions
diff --git a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini index 3605e8f3fc9..76b44d9e9cf 100644 --- a/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata-layout-2020/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -4,7 +4,7 @@ expected: TIMEOUT [Opening a blob URL in a new window immediately before revoking it works.] - expected: TIMEOUT + expected: FAIL [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini new file mode 100644 index 00000000000..f64b45fea6b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-002.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-002.html] + [Hit test float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini deleted file mode 100644 index 4bfb0c2053a..00000000000 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-004.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini new file mode 100644 index 00000000000..baa9f1a7541 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-005.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-005.html] + [Miss clipped float] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini index f8e7e539aae..4a1e8110f6f 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini @@ -2,6 +2,3 @@ [Hit test intersecting scaled box] expected: FAIL - [Hit test within unscaled box] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini index c131078eace..23c61ede1a1 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini @@ -17,3 +17,6 @@ [test the top of layer] expected: FAIL + [test some point of the element: top left corner] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index 955c7b89de8..ff734ccd772 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -318,15 +318,12 @@ [<iframe>: combined response Content-Type: */* text/html] expected: FAIL - [<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html] + [<iframe>: separate response Content-Type: text/html */*;charset=gbk] expected: FAIL - [<iframe>: separate response Content-Type: text/html;" text/plain] + [<iframe>: separate response Content-Type: text/plain */*] expected: FAIL - [<iframe>: separate response Content-Type: text/html;x=" text/plain] - expected: FAIL - - [<iframe>: separate response Content-Type: text/plain */*;charset=gbk] + [<iframe>: combined response Content-Type: text/html;x=" text/plain] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini index 5c001592859..2638e2f8172 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/script.window.js.ini @@ -59,3 +59,9 @@ [separate text/javascript;charset=windows-1252 error text/javascript] expected: FAIL + [separate text/javascript error] + expected: FAIL + + [separate text/javascript;charset=windows-1252 text/javascript] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini index a698534cfa0..7277f622b20 100644 --- a/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,9 +11,6 @@ [X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!] expected: FAIL - [X-Content-Type-Options%3A%20'NosniFF'] - expected: FAIL - - [X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff] + [X-Content-Type-Options%3A%20%2Cnosniff] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata-layout-2020/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini deleted file mode 100644 index 87b07c3e670..00000000000 --- a/tests/wpt/metadata-layout-2020/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-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index af14e19a466..f45aaafe1c5 100644 --- a/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini +++ b/tests/wpt/metadata-layout-2020/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini @@ -1,20 +1,16 @@ [supported-elements.html] - expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL [Host element with delegatesFocus including no focusable descendants should be skipped] - expected: NOTRUN + expected: FAIL [Element with tabindex should support autofocus] - expected: TIMEOUT + expected: FAIL [Area element should support autofocus] - expected: NOTRUN + expected: FAIL [Host element with delegatesFocus should support autofocus] - expected: NOTRUN - - [Non-HTMLElement should not support autofocus] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html.ini new file mode 100644 index 00000000000..3a2f3d05e88 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html.ini @@ -0,0 +1,4 @@ +[iframe-loading-lazy-base-url-2.tentative.html] + [When a loading=lazy iframe is loaded, it loads relative to the document's base URL computed at parse-time.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html.ini new file mode 100644 index 00000000000..21645a8a023 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html.ini @@ -0,0 +1,4 @@ +[iframe-loading-lazy-base-url.tentative.html] + [When a loading=lazy iframe is loaded, it loads relative to the document's base URL computed at parse-time.] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/iframe-loading-lazy.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html.ini index 554b0461b57..d12e6ec6867 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/iframe-loading-lazy.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html.ini @@ -1,4 +1,4 @@ -[iframe-loading-lazy.html] +[iframe-loading-lazy.tentative.html] [Test that iframes with loading='lazy' load once they enter the viewport.] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini index c6f45be1eb2..e63fe7c263e 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini @@ -1,5 +1,5 @@ [iframe_sandbox_popups_escaping-2.html] - expected: TIMEOUT + expected: CRASH [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini index 0407f0cc2b7..0218bc9ba9d 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,5 +1,4 @@ [iframe_sandbox_popups_nonescaping-2.html] - expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini index 7d2b5231af2..f4f994c5d6f 100644 --- a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html.ini @@ -1,5 +1,5 @@ [iframe_sandbox_popups_nonescaping-3.html] - expected: CRASH + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url-2.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url-2.html.ini new file mode 100644 index 00000000000..0a1cdc0abb7 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url-2.html.ini @@ -0,0 +1,4 @@ +[image-loading-lazy-base-url-2.html] + [When a loading=lazy image is loaded, it loads relative to the document's base URL computed at parse-time.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html.ini new file mode 100644 index 00000000000..c141cee1c74 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html.ini @@ -0,0 +1,4 @@ +[image-loading-lazy-base-url.html] + [When a loading=lazy image is loaded, it loads relative to the document's base URL computed at parse-time.] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/semantics/scripting-1/the-script-element/execution-timing/077.html.ini b/tests/wpt/metadata-layout-2020/html/semantics/scripting-1/the-script-element/execution-timing/077.html.ini new file mode 100644 index 00000000000..bcd2fd0eab8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/html/semantics/scripting-1/the-script-element/execution-timing/077.html.ini @@ -0,0 +1,4 @@ +[077.html] + [ adding several types of scripts through the DOM and removing some of them confuses scheduler ] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index 450c88bd32b..dbec6f2c2ff 100644 --- a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -3,6 +3,3 @@ [The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] expected: TIMEOUT - [The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini index 297595743a6..5bc8e9f3157 100644 --- a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini +++ b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini @@ -1,9 +1,10 @@ [promise-job-entry-different-function-realm.html] + expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: FAIL + expected: TIMEOUT [Thenable resolution] expected: FAIL @@ -12,5 +13,5 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini index 5ddb9bfeff6..a1effd5f801 100644 --- a/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini +++ b/tests/wpt/metadata-layout-2020/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini @@ -1,10 +1,9 @@ [promise-job-entry.html] - expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: TIMEOUT + expected: FAIL [Sanity check: this all works as expected with no promises involved] expected: FAIL @@ -16,5 +15,5 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata-layout-2020/webmessaging/without-ports/018.html.ini deleted file mode 100644 index 663a1f8fa30..00000000000 --- a/tests/wpt/metadata-layout-2020/webmessaging/without-ports/018.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[018.html] - expected: TIMEOUT - [origin of the script that invoked the method, javascript:] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini index faa00f45ecf..d4f62ed7113 100644 --- a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -7,7 +7,7 @@ expected: FAIL [Opening a blob URL in a new window immediately before revoking it works.] - expected: TIMEOUT + expected: FAIL [Opening a blob URL in a noopener about:blank window immediately before revoking it works.] expected: TIMEOUT diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 60f2b6d0563..d1c54481ae1 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -318515,7 +318515,7 @@ ], "resources": { "crossiframe-childframe.html": [ - "8c42c702d6645dbbc579da47376adeb132586679", + "58294ae02c23baf1376b77ba9f642ff7b4e59c66", [] ], "event-timing-test-utils.js": [ @@ -329156,6 +329156,10 @@ } }, "resources": { + "common.js": [ + "06f18b3e0498549df1811c6a8008857e65b4117c", + [] + ], "should-load.html": [ "a9a178ce51ed7241d30755fe32b7003680f628c8", [] @@ -329414,6 +329418,12 @@ "ef3e59037f4f67a53bc87ce3fcf1999886974c60", [] ], + "resources": { + "subframe.html": [ + "07cb999afaefe344a0f8d5ac2b792b60abcd22b4", + [] + ] + }, "same_origin_child.html": [ "a36e231fa253730402f0097901a4ad1fe1ae5192", [] @@ -329634,10 +329644,6 @@ "ccff177ae9b5066a7085f7e967ab869e665975cc", [] ], - "common.js": [ - "06f18b3e0498549df1811c6a8008857e65b4117c", - [] - ], "document-base-url-ref.html": [ "6e55b21ff0bf030b972b4030ebb9bee4a0e43954", [] @@ -329718,10 +329724,6 @@ "referrer-checker-img.py": [ "0597268d8391b339c80d3274a52265db168e676a", [] - ], - "subframe.html": [ - "07cb999afaefe344a0f8d5ac2b792b60abcd22b4", - [] ] }, "sizes": { @@ -372767,7 +372769,7 @@ ] ], "async-write-blobs-read-blobs.https.html": [ - "f9bf38d5d581dbb63be4139e7294374b0876051f", + "50d23a9c3625d5295407a783ad63908571fd55f7", [ null, { @@ -372776,7 +372778,7 @@ ] ], "async-write-image-read-image.https.html": [ - "881b8ababb2588b806bc121d0f9e95623766b4e8", + "281358dfc5f8d68d3d6d436fdd92dbc8fb8b7b5d", [ null, { @@ -372807,7 +372809,7 @@ ] ], "read-on-detaching-iframe.https.html": [ - "8022f0e269c4f28142e80366bdcbd6c2d1d231d2", + "8e8e015aa05173bb5df162401fcb84dc0ff3a386", [ null, { @@ -372816,7 +372818,7 @@ ] ], "write-on-detaching-iframe.https.html": [ - "0ed1098bcad03785e4917c1d7ad18c302136bdba", + "c6913d9e9f6446b1546f3cf6eba4203d07abcd35", [ null, { @@ -372825,7 +372827,7 @@ ] ], "write-read-on-detached-iframe.https.html": [ - "1859c4bd11b44582f66e3f5d55a42002fdba5bd4", + "c0f11772929eed601c1fc8e921ea3d933ba6444f", [ null, { @@ -372834,7 +372836,7 @@ ] ], "writeText-readText-on-detached-iframe.https.html": [ - "40854ccc7a31503f0b3b9b50ab4222d8b96fa79b", + "9cd8900aab0f9ee9399b5fdb1c175563a06884ea", [ null, { @@ -372845,7 +372847,7 @@ }, "permissions": { "readText-denied.https.html": [ - "7183b1a6eaeb1b34c048ffe68660e5920a4f50a9", + "935f520e7de2dd15e0019c798dd0966c454235cd", [ null, { @@ -372854,7 +372856,7 @@ ] ], "readText-granted.https.html": [ - "5a2865db0dbf29db2e888e932582b3e62eab91cc", + "ab76cd5e1da86e830829c45d876ae3e016a573f3", [ null, { @@ -372863,7 +372865,7 @@ ] ], "writeText-denied.https.html": [ - "19df8a398f60eae32d6446615d831cae9560134c", + "4d0530f0bc221773606b27b119d0b20100444703", [ null, { @@ -372872,7 +372874,7 @@ ] ], "writeText-granted.https.html": [ - "87411fec20c972bfc2e5987030c846ebc68c68c4", + "b03ae7ff26b59cbd00ec1a25a6953023b139ee71", [ null, { @@ -372883,7 +372885,7 @@ }, "text-write-read": { "async-write-read.https.html": [ - "1d170f2fa4a7a4a96c3615d41a3290ab0123fba7", + "a00c5b27a4d65f148d3cafaf4700a0e3e286cfee", [ null, { @@ -372892,7 +372894,7 @@ ] ], "async-write-readText.https.html": [ - "3fe05a53742add1c8975faf72901a2ea3a6cba4a", + "e8156af47f4c34395136c463ecb1dae2cd8c9870", [ null, { @@ -372901,7 +372903,7 @@ ] ], "async-writeText-read.https.html": [ - "6745d7cdb67ba9c0123bbefe9dc86da4d37bcd79", + "4a37aa1a5f73d3b9521145637c2bbbaf35dd2e96", [ null, { @@ -372910,7 +372912,7 @@ ] ], "async-writeText-readText.https.html": [ - "f9fbdff879c18dad7502a37a1f8b87c07ec9193a", + "7e56bfef2c684415eaaa4e62bcde77232fa8531f", [ null, { @@ -421238,7 +421240,7 @@ ] ], "buffered-and-duration-threshold.html": [ - "cf5d63b02a1d3ccd8444f47f9fc3a56535594f45", + "66be7663c114d1055866c59f075ff5352acfcdf3", [ null, { @@ -421302,7 +421304,7 @@ ] ], "disconnect-target.html": [ - "b395cd4181b76cbb829fd91fc49162aeb5630679", + "6d6770d3188dcb5b23806d1ab03d77e76e4e137f", [ null, { @@ -421579,7 +421581,7 @@ ] ], "retrievability.html": [ - "d5a9c04df82b294f359a6880234336fb7423c0c6", + "ab475fc52974fe2afde355332653c802c7c5f16f", [ null, { @@ -454100,8 +454102,36 @@ {} ] ], + "iframe-loading-eager.tentative.html": [ + "8acd99d23d569704a18d0a1cea13cb605b09c438", + [ + null, + {} + ] + ], + "iframe-loading-lazy-base-url-2.tentative.html": [ + "8782f3d315e47b2937f3e09154f63f1f7eb0cfbf", + [ + null, + {} + ] + ], + "iframe-loading-lazy-base-url.tentative.html": [ + "ec9f73400de7e25bd5f2dbfa42b249d34620187b", + [ + null, + {} + ] + ], "iframe-loading-lazy-referrerpolicy-change.sub.tentative.html": [ - "145df404003cdb3ee1c0688351a5300603780789", + "68734d5708da40b7e5e533cb2ddee41c8a3d719f", + [ + null, + {} + ] + ], + "iframe-loading-lazy.tentative.html": [ + "0a882ef25bc19ad5c3c531cd5a40eed2fa0ced03", [ null, {} @@ -454580,7 +454610,7 @@ ] ], "below-viewport-image-loading-lazy-load-event.html": [ - "2f54f3dbcbba1b4c3440f19d0f619b3ac4292bbb", + "b1dee3a3ca82913f0fa26f963e24b8fbe14a697c", [ null, {} @@ -454734,22 +454764,29 @@ {} ] ], - "iframe-loading-eager.html": [ - "8509e74d15566d654959d677fc45244ac9de5dd1", + "image-base-url.html": [ + "f8201c4948be8df1132c602afb134b71ebd75768", [ null, {} ] ], - "iframe-loading-lazy.html": [ - "aa241e1797c26ae4e5582bfe48caddce48ba5311", + "image-loading-eager.html": [ + "54e169f8672621b852694ef9055d87567ded45fd", [ null, {} ] ], - "image-loading-eager.html": [ - "b395f84500bf3cfa2d2f4fbe1f704d5993e24316", + "image-loading-lazy-base-url-2.html": [ + "7b96823a9451b16c7e8500862b1b6086d2f03401", + [ + null, + {} + ] + ], + "image-loading-lazy-base-url.html": [ + "90a8a43e344afd1b492ab15455ade4fe7f82a5b0", [ null, {} @@ -454763,7 +454800,7 @@ ] ], "image-loading-lazy-crossorigin-change.sub.html": [ - "3fb827df2d6159de73c9fe0417cf790d0d484ff6", + "83e61d8465f4f91ac62ed01e0683561c1e297a94", [ null, {} @@ -454798,7 +454835,7 @@ ] ], "image-loading-lazy-load-event.html": [ - "1748a5bcc431f48b7efd845d427c63a967b8fa3b", + "0da5379df48a20f16374774c989fa459dbe18ee5", [ null, {} @@ -454833,7 +454870,7 @@ ] ], "image-loading-lazy-referrerpolicy-change.sub.html": [ - "307d9571b498e108f121b97f02dc56412cd6f21e", + "110c36cca7db87de3f0c8a4f372f41b35f54d8db", [ null, {} @@ -454860,13 +454897,6 @@ {} ] ], - "image-parse-url-base.html": [ - "f8201c4948be8df1132c602afb134b71ebd75768", - [ - null, - {} - ] - ], "img.complete.html": [ "d8d5a84eb7998044fb24847cc0ac5a1185b82bb6", [ @@ -454917,7 +454947,7 @@ ] ], "not-rendered-below-viewport-image-loading-lazy.html": [ - "5f4fbdf24b3ce1a7e33a59f0b53d5e288bc9387b", + "1a84d1de305613c59dbb3566eb98ce5cf612f3bc", [ null, {} @@ -454931,7 +454961,7 @@ ] ], "not-rendered-image-loading-lazy.html": [ - "ca1c813d3b0954ea494b356c3f0e7c26a1c6cbfe", + "5f7da1a84653d60022538ab8426e0eb0eb9e0bc8", [ null, {} @@ -454944,29 +454974,8 @@ {} ] ], - "original-base-url-applied-2.html": [ - "352d77c9e829325cbe8a5783e35cdb85c3f22b01", - [ - null, - {} - ] - ], - "original-base-url-applied-iframe.html": [ - "f37a67d2c90ad12c19d885589283bcd0ba47f442", - [ - null, - {} - ] - ], - "original-base-url-applied.html": [ - "6253155b8159222dc7a374300a833edba6685e33", - [ - null, - {} - ] - ], "picture-loading-lazy.html": [ - "0ab2fb27367309814094071ccad7fa2922aa80f9", + "08c01616bd6b4ba197627969f6dae7793e689abe", [ null, {} diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini new file mode 100644 index 00000000000..f64b45fea6b --- /dev/null +++ b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-002.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-002.html] + [Hit test float] + expected: FAIL + diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini deleted file mode 100644 index 4bfb0c2053a..00000000000 --- a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-004.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[hit-test-floats-004.html] - [Miss float below something else] - expected: FAIL - diff --git a/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini new file mode 100644 index 00000000000..baa9f1a7541 --- /dev/null +++ b/tests/wpt/metadata/css/CSS2/floats/hit-test-floats-005.html.ini @@ -0,0 +1,4 @@ +[hit-test-floats-005.html] + [Miss clipped float] + expected: FAIL + diff --git a/tests/wpt/metadata/css/css-transforms/transform-scale-hittest.html.ini b/tests/wpt/metadata/css/css-transforms/transform-scale-hittest.html.ini index f8e7e539aae..4a1e8110f6f 100644 --- a/tests/wpt/metadata/css/css-transforms/transform-scale-hittest.html.ini +++ b/tests/wpt/metadata/css/css-transforms/transform-scale-hittest.html.ini @@ -2,6 +2,3 @@ [Hit test intersecting scaled box] expected: FAIL - [Hit test within unscaled box] - expected: FAIL - diff --git a/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini index 85e94926cb3..5733d536fd3 100644 --- a/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata/css/cssom-view/elementFromPosition.html.ini @@ -21,3 +21,6 @@ [test the top of layer] expected: FAIL + [test some point of the element: top left corner] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini index e92df7c5791..957dc6426e1 100644 --- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini @@ -318,15 +318,12 @@ [<iframe>: combined response Content-Type: */* text/html] expected: FAIL - [<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html] + [<iframe>: separate response Content-Type: text/html */*;charset=gbk] expected: FAIL - [<iframe>: separate response Content-Type: text/html;" text/plain] + [<iframe>: separate response Content-Type: text/plain */*] expected: FAIL - [<iframe>: separate response Content-Type: text/html;x=" text/plain] - expected: FAIL - - [<iframe>: separate response Content-Type: text/plain */*;charset=gbk] + [<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 5c001592859..2638e2f8172 100644 --- a/tests/wpt/metadata/fetch/content-type/script.window.js.ini +++ b/tests/wpt/metadata/fetch/content-type/script.window.js.ini @@ -59,3 +59,9 @@ [separate text/javascript;charset=windows-1252 error text/javascript] expected: FAIL + [separate text/javascript error] + 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 a698534cfa0..7277f622b20 100644 --- a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini +++ b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini @@ -11,9 +11,6 @@ [X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!] expected: FAIL - [X-Content-Type-Options%3A%20'NosniFF'] - expected: FAIL - - [X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff] + [X-Content-Type-Options%3A%20%2Cnosniff] 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/interaction/focus/the-autofocus-attribute/supported-elements.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/supported-elements.html.ini index 8b743f36e1d..6b68e9094e4 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,20 +1,16 @@ [supported-elements.html] - expected: TIMEOUT [Contenteditable element should support autofocus] expected: FAIL [Element with tabindex should support autofocus] - expected: TIMEOUT + expected: FAIL [Host element with delegatesFocus including no focusable descendants should be skipped] - expected: NOTRUN + expected: FAIL [Area element should support autofocus] - expected: NOTRUN + expected: FAIL [Host element with delegatesFocus should support autofocus] - expected: NOTRUN - - [Non-HTMLElement should not support autofocus] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html.ini new file mode 100644 index 00000000000..3a2f3d05e88 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html.ini @@ -0,0 +1,4 @@ +[iframe-loading-lazy-base-url-2.tentative.html] + [When a loading=lazy iframe is loaded, it loads relative to the document's base URL computed at parse-time.] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html.ini new file mode 100644 index 00000000000..21645a8a023 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html.ini @@ -0,0 +1,4 @@ +[iframe-loading-lazy-base-url.tentative.html] + [When a loading=lazy iframe is loaded, it loads relative to the document's base URL computed at parse-time.] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html.ini new file mode 100644 index 00000000000..d12e6ec6867 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html.ini @@ -0,0 +1,4 @@ +[iframe-loading-lazy.tentative.html] + [Test that iframes with loading='lazy' load once they enter the viewport.] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini index c6f45be1eb2..e63fe7c263e 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html.ini @@ -1,5 +1,5 @@ [iframe_sandbox_popups_escaping-2.html] - expected: TIMEOUT + expected: CRASH [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] 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 d43f38b40cd..3a32693ffa8 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html.ini @@ -1,6 +1,5 @@ [iframe_sandbox_popups_nonescaping-2.html] type: testharness - expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: NOTRUN + expected: FAIL 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 2568040e6e5..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,6 +1,6 @@ [iframe_sandbox_popups_nonescaping-3.html] type: testharness - expected: CRASH + expected: TIMEOUT [Check that popups from a sandboxed iframe do not escape the sandbox] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url-2.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url-2.html.ini new file mode 100644 index 00000000000..0a1cdc0abb7 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url-2.html.ini @@ -0,0 +1,4 @@ +[image-loading-lazy-base-url-2.html] + [When a loading=lazy image is loaded, it loads relative to the document's base URL computed at parse-time.] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html.ini new file mode 100644 index 00000000000..c141cee1c74 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html.ini @@ -0,0 +1,4 @@ +[image-loading-lazy-base-url.html] + [When a loading=lazy image is loaded, it loads relative to the document's base URL computed at parse-time.] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/original-base-url-applied-2.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/original-base-url-applied-2.html.ini deleted file mode 100644 index d538ddb1c5d..00000000000 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/original-base-url-applied-2.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[original-base-url-applied-2.html] - [Deferred images with loading='lazy' use the original base URL specified at the parse time] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/original-base-url-applied-iframe.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/original-base-url-applied-iframe.html.ini deleted file mode 100644 index a77305a5d0a..00000000000 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/original-base-url-applied-iframe.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[original-base-url-applied-iframe.html] - [Deferred iframes with loading='lazy' use the original base URL specified at the parse time] - expected: FAIL - diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/execution-timing/077.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/execution-timing/077.html.ini new file mode 100644 index 00000000000..bcd2fd0eab8 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/execution-timing/077.html.ini @@ -0,0 +1,4 @@ +[077.html] + [ adding several types of scripts through the DOM and removing some of them confuses scheduler ] + expected: FAIL + diff --git a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini index 01f7b72cbe7..0cef5158fae 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/events/compile-event-handler-settings-objects.html.ini @@ -4,6 +4,3 @@ [The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] expected: TIMEOUT - [The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document] - expected: FAIL - diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini index 297595743a6..5bc8e9f3157 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini @@ -1,9 +1,10 @@ [promise-job-entry-different-function-realm.html] + expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: FAIL + expected: TIMEOUT [Thenable resolution] expected: FAIL @@ -12,5 +13,5 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: FAIL + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini index 5ddb9bfeff6..a1effd5f801 100644 --- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini +++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry.html.ini @@ -1,10 +1,9 @@ [promise-job-entry.html] - expected: TIMEOUT [Fulfillment handler on fulfilled promise] expected: FAIL [Rejection handler on pending-then-rejected promise] - expected: TIMEOUT + expected: FAIL [Sanity check: this all works as expected with no promises involved] expected: FAIL @@ -16,5 +15,5 @@ expected: FAIL [Fulfillment handler on pending-then-fulfilled promise] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata/webmessaging/without-ports/018.html.ini deleted file mode 100644 index 663a1f8fa30..00000000000 --- a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[018.html] - expected: TIMEOUT - [origin of the script that invoked the method, javascript:] - expected: TIMEOUT - diff --git a/tests/wpt/web-platform-tests/clipboard-apis/async-write-blobs-read-blobs.https.html b/tests/wpt/web-platform-tests/clipboard-apis/async-write-blobs-read-blobs.https.html index f9bf38d5d58..50d23a9c362 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/async-write-blobs-read-blobs.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/async-write-blobs-read-blobs.https.html @@ -16,8 +16,8 @@ async function loadBlob(fileName) { } promise_test(async t => { - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); const blobText = new Blob(['test text'], {type: 'text/plain'}); const blobImage = await loadBlob('resources/greenbox.png'); diff --git a/tests/wpt/web-platform-tests/clipboard-apis/async-write-image-read-image.https.html b/tests/wpt/web-platform-tests/clipboard-apis/async-write-image-read-image.https.html index 881b8ababb2..281358dfc5f 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/async-write-image-read-image.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/async-write-image-read-image.https.html @@ -40,8 +40,8 @@ async function loadBlob(fileName) { } promise_test(async t => { - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); const blobInput = await loadBlob('resources/greenbox.png'); @@ -67,8 +67,8 @@ promise_test(async t => { }, 'Verify write and read clipboard [image/png Blob]'); promise_test(async t => { - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); const invalidPngBlob = new Blob(['this text is not a valid png image'], {type: 'image/png'}); diff --git a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/read-on-detaching-iframe.https.html b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/read-on-detaching-iframe.https.html index 8022f0e269c..8e8e015aa05 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/read-on-detaching-iframe.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/read-on-detaching-iframe.https.html @@ -11,11 +11,11 @@ 'use strict'; promise_test(async t => { - // Note: This tests proper behavior on a detaching iframe. text/plain is - // chosen for simplicity, and the test should fail the same way no matter what - // the input type is. - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + // This tests proper behavior on a detaching iframe. text/plain is chosen for + // simplicity, and the test should fail the same way no matter what the input + // type is. + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); const iframe = document.getElementById('iframe'); const iframeClipboard = iframe.contentWindow.navigator.clipboard; @@ -26,8 +26,8 @@ promise_test(async t => { iframe.focus(); // An iframe detaching while writing to the clipboard should fail, but not - // crash. Note the lack of await here, meaning that the iframe will detach - // while the read operation is running. + // crash. The lack of await here means that the iframe will detach while the + // write operation is running. iframeClipboard.read([clipboardItemInput]); iframe.parentNode.removeChild(iframe); }, 'Verify read fails on detaching iframe'); diff --git a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-on-detaching-iframe.https.html b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-on-detaching-iframe.https.html index 0ed1098bcad..c6913d9e9f6 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-on-detaching-iframe.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-on-detaching-iframe.https.html @@ -11,11 +11,11 @@ 'use strict'; promise_test(async t => { - // Note: This tests proper behavior on a detaching iframe. text/plain is - // chosen for simplicity, and the test should fail the same way no matter what - // the input type is. - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + // This tests proper behavior on a detaching iframe. text/plain is chosen for + // simplicity, and the test should fail the same way no matter what the input + // type is. + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); const iframe = document.getElementById('iframe'); const iframeClipboard = iframe.contentWindow.navigator.clipboard; @@ -26,8 +26,8 @@ promise_test(async t => { iframe.focus(); // An iframe detaching while writing to the clipboard should fail, but not - // crash. Note the lack of await here, meaning that the iframe will detach - // while the write operation is running. + // crash. The lack of await here means that the iframe will detach while the + // write operation is running. iframeClipboard.write([clipboardItemInput]); iframe.parentNode.removeChild(iframe); }, 'Verify write fails on detaching iframe'); diff --git a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-read-on-detached-iframe.https.html b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-read-on-detached-iframe.https.html index 1859c4bd11b..c0f11772929 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-read-on-detached-iframe.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/write-read-on-detached-iframe.https.html @@ -11,11 +11,11 @@ 'use strict'; promise_test(async t => { - // Note: This tests proper detached iframe behavior. text/plain is chosen for + // This tests proper behavior on a detaching iframe. text/plain is chosen for // simplicity, and the test should fail the same way no matter what the input // type is. - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); const iframe = document.getElementById('iframe'); const iframeClipboard = iframe.contentWindow.navigator.clipboard; diff --git a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/writeText-readText-on-detached-iframe.https.html b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/writeText-readText-on-detached-iframe.https.html index 40854ccc7a3..9cd8900aab0 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/writeText-readText-on-detached-iframe.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/detached-iframe/writeText-readText-on-detached-iframe.https.html @@ -11,8 +11,8 @@ 'use strict'; promise_test(async t => { - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); const iframe = document.getElementById('iframe'); // Clipboard API must only be available in focused documents. diff --git a/tests/wpt/web-platform-tests/clipboard-apis/permissions/readText-denied.https.html b/tests/wpt/web-platform-tests/clipboard-apis/permissions/readText-denied.https.html index 7183b1a6eae..935f520e7de 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/permissions/readText-denied.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/permissions/readText-denied.https.html @@ -10,7 +10,7 @@ 'use strict'; promise_test(async t => { - test_driver.set_permission({name: 'clipboard-read'}, 'denied'); + await test_driver.set_permission({name: 'clipboard-read'}, 'denied'); await promise_rejects_dom(t, 'NotAllowedError', navigator.clipboard.readText()); }, 'navigator.clipboard.readText() fails when permission denied'); diff --git a/tests/wpt/web-platform-tests/clipboard-apis/permissions/readText-granted.https.html b/tests/wpt/web-platform-tests/clipboard-apis/permissions/readText-granted.https.html index 5a2865db0db..ab76cd5e1da 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/permissions/readText-granted.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/permissions/readText-granted.https.html @@ -10,7 +10,7 @@ 'use strict'; promise_test(async () => { - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); await navigator.clipboard.readText(); }, 'navigator.clipboard.readText() succeeds when permission granted'); </script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/clipboard-apis/permissions/writeText-denied.https.html b/tests/wpt/web-platform-tests/clipboard-apis/permissions/writeText-denied.https.html index 19df8a398f6..4d0530f0bc2 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/permissions/writeText-denied.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/permissions/writeText-denied.https.html @@ -10,7 +10,7 @@ 'use strict'; promise_test(async t => { - test_driver.set_permission({name: 'clipboard-write'}, 'denied'); + await test_driver.set_permission({name: 'clipboard-write'}, 'denied'); await promise_rejects_dom(t, 'NotAllowedError', navigator.clipboard.writeText('xyz')); }, 'navigator.clipboard.writeText() fails when permission denied'); diff --git a/tests/wpt/web-platform-tests/clipboard-apis/permissions/writeText-granted.https.html b/tests/wpt/web-platform-tests/clipboard-apis/permissions/writeText-granted.https.html index 87411fec20c..b03ae7ff26b 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/permissions/writeText-granted.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/permissions/writeText-granted.https.html @@ -10,7 +10,7 @@ 'use strict'; promise_test(async () => { - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); await navigator.clipboard.writeText('xyz'); }, 'navigator.clipboard.writeText() succeeds when permission granted'); </script>
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-read.https.html b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-read.https.html index 1d170f2fa4a..a00c5b27a4d 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-read.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-read.https.html @@ -12,8 +12,8 @@ <script> async function readWriteTest(textInput) { promise_test(async t => { - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); const blobInput = new Blob([textInput], {type: 'text/plain'}); const clipboardItemInput = new ClipboardItem({'text/plain': blobInput}); diff --git a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-readText.https.html b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-readText.https.html index 3fe05a53742..e8156af47f4 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-readText.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-write-readText.https.html @@ -11,8 +11,8 @@ <script> async function readWriteTest(textInput) { promise_test(async t => { - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); const blobInput = new Blob([textInput], {type: 'text/plain'}); const clipboardItem = new ClipboardItem({'text/plain': blobInput}); diff --git a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-read.https.html b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-read.https.html index 6745d7cdb67..4a37aa1a5f7 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-read.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-read.https.html @@ -11,8 +11,8 @@ <script> async function readWriteTest(textInput) { promise_test(async t => { - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); await navigator.clipboard.writeText(textInput); const clipboardItems = await navigator.clipboard.read(); diff --git a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-readText.https.html b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-readText.https.html index f9fbdff879c..7e56bfef2c6 100644 --- a/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-readText.https.html +++ b/tests/wpt/web-platform-tests/clipboard-apis/text-write-read/async-writeText-readText.https.html @@ -9,8 +9,8 @@ <script> async function readWriteTest(textInput) { promise_test(async t => { - test_driver.set_permission({name: 'clipboard-read'}, 'granted'); - test_driver.set_permission({name: 'clipboard-write'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-read'}, 'granted'); + await test_driver.set_permission({name: 'clipboard-write'}, 'granted'); await navigator.clipboard.writeText(textInput); const textOutput = await navigator.clipboard.readText(); diff --git a/tests/wpt/web-platform-tests/event-timing/buffered-and-duration-threshold.html b/tests/wpt/web-platform-tests/event-timing/buffered-and-duration-threshold.html index cf5d63b02a1..66be7663c11 100644 --- a/tests/wpt/web-platform-tests/event-timing/buffered-and-duration-threshold.html +++ b/tests/wpt/web-platform-tests/event-timing/buffered-and-duration-threshold.html @@ -24,6 +24,8 @@ promise_test(async t => { const afterFirstClick = performance.now(); new PerformanceObserver(t.step_func(list => { const mouseDowns = list.getEntriesByName('mousedown'); + if (mouseDowns.length === 0) + return; assert_equals(mouseDowns.length, 1, 'Should only observe 1 click!'); assert_greater_than(mouseDowns[0].processingStart, afterFirstClick, 'The entry should not be the first click!!'); diff --git a/tests/wpt/web-platform-tests/event-timing/disconnect-target.html b/tests/wpt/web-platform-tests/event-timing/disconnect-target.html index b395cd4181b..6d6770d3188 100644 --- a/tests/wpt/web-platform-tests/event-timing/disconnect-target.html +++ b/tests/wpt/web-platform-tests/event-timing/disconnect-target.html @@ -15,6 +15,8 @@ async_test(function(t) { assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); const observer = new PerformanceObserver(t.step_func_done((entryList) => { const entries = entryList.getEntries().filter(e => e.name === 'mousedown'); + if (entries.length === 0) + return; // There must only be one click entry. assert_equals(entries.length, 1); const entry = entries[0]; diff --git a/tests/wpt/web-platform-tests/event-timing/resources/crossiframe-childframe.html b/tests/wpt/web-platform-tests/event-timing/resources/crossiframe-childframe.html index 8c42c702d66..58294ae02c2 100644 --- a/tests/wpt/web-platform-tests/event-timing/resources/crossiframe-childframe.html +++ b/tests/wpt/web-platform-tests/event-timing/resources/crossiframe-childframe.html @@ -8,7 +8,10 @@ const clickTimeMin = performance.now(); const observerPromise = new Promise(resolve => { new PerformanceObserver(entryList => { - resolve(entryList.getEntries().filter(entry => entry.name === 'mousedown')); + const mouseDowns = entryList.getEntriesByName('mousedown'); + if (mouseDowns.length === 0) + return; + resolve(mouseDowns); }).observe({ type:'event' }); }); const entries = await observerPromise; diff --git a/tests/wpt/web-platform-tests/event-timing/retrievability.html b/tests/wpt/web-platform-tests/event-timing/retrievability.html index d5a9c04df82..ab475fc5297 100644 --- a/tests/wpt/web-platform-tests/event-timing/retrievability.html +++ b/tests/wpt/web-platform-tests/event-timing/retrievability.html @@ -32,7 +32,7 @@ async_test(function(t) { assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.'); new PerformanceObserver(t.step_func(entryList => { - if (entryList.getEntriesByName('mousedown')) { + if (entryList.getEntriesByName('mousedown').length > 0) { validateEntries(); t.done(); } diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/common.js b/tests/wpt/web-platform-tests/html/semantics/embedded-content/resources/common.js index 06f18b3e049..06f18b3e049 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/common.js +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/resources/common.js diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative.html new file mode 100644 index 00000000000..8acd99d23d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-eager.tentative.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<head> + <title>Iframes with loading='eager' load immediately regardless of their + position with respect to the viewport.</title> + <link rel="author" title="Scott Little" href="mailto:sclittle@chromium.org"> + <link rel="help" href="https://github.com/scott-little/lazyload"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<script> + const t = async_test("Test that iframes with loading='eager' load " + + "immediately regardless of their position with " + + "respect to the viewport."); + + let has_in_viewport_loaded = false; + const in_viewport_iframe_onload = t.step_func(() => { + assert_false(has_in_viewport_loaded, + "The in_viewport element should load only once."); + has_in_viewport_loaded = true; + }); + + let has_below_viewport_loaded = false; + const below_viewport_iframe_onload = t.step_func(() => { + assert_false(has_below_viewport_loaded, + "The below_viewport element should load only once."); + has_below_viewport_loaded = true; + }); + + window.addEventListener("load", t.step_func_done(() => { + assert_true(has_in_viewport_loaded, + "The in_viewport element should have loaded before " + + "window.load()."); + assert_true(has_below_viewport_loaded, + "The below_viewport element should have loaded before " + + "window.load()."); + })); +</script> + +<body> + <iframe id="in_viewport" src="resources/subframe.html?in-viewport" + loading="eager" width="200px" height="100px" + onload="in_viewport_iframe_onload();"></iframe> + <div style="height:1000vh;"></div> + + <!-- The below_viewport element loads very slowly in order to ensure that the + window load event is blocked on it. --> + <iframe id="below_viewport" + src="resources/subframe.html?below-viewport&pipe=trickle(d1)" + loading="eager" width="200px" height="100px" + onload="below_viewport_iframe_onload();"></iframe> +</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html new file mode 100644 index 00000000000..8782f3d315e --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url-2.tentative.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<head> + <title>Deferred loading=lazy iframes load relative to the document's base URL + at parse-time</title> + <link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org"> + <link rel="author" title="Raj T" href="mailto:rajendrant@chromium.org"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../resources/common.js"></script> +</head> + +<script> + const below_viewport_iframe = new ElementLoadPromise("below-viewport"); + + let has_window_loaded = false; + + async_test(t => { + // Change the document's base URL to a bogus one, and scroll the + // below-viewport iframe into view. When it loads, it should load relative + // to the old base URL computed at parse-time. + window.addEventListener("load", t.step_func(() => { + window.history.pushState(2, document.title, + '/invalid-url-where-no-subresources-exist/') + has_window_loaded = true; + below_viewport_iframe.element().scrollIntoView(); + })); + + below_viewport_iframe.promise.then(t.step_func_done(() => { + assert_true(has_window_loaded, + "Below-viewport loading=lazy iframes do not block the " + + "window load event"); + assert_true(below_viewport_iframe.element() + .contentDocument.body.innerHTML.includes("<p>Subframe</p>")); + })); + + }, "When a loading=lazy iframe is loaded, it loads relative to the " + + "document's base URL computed at parse-time."); +</script> + +<body> + <div style="height:1000vh;"></div> + <script> + // Change the document's base URL so that the iframe request parses relative + // to it when it sets up the request at parse-time. + window.history.pushState(1, document.title, 'resources/') + </script> + <iframe id="below-viewport" src="subframe.html" loading="lazy" width="200px" + height="100px" onload="below_viewport_iframe.resolve()"</iframe> +</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html new file mode 100644 index 00000000000..ec9f73400de --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-base-url.tentative.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<head> + <title>Deferred iframes with loading='lazy' use the original + base URL specified at parse-time</title> + <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../resources/common.js"></script> + <base href='/html/semantics/embedded-content/the-iframe-element/resources/'> +</head> + +<script> + const below_viewport_iframe = new ElementLoadPromise("below-viewport"); + + let has_window_loaded = false; + + async_test(t => { + // Change the base URL and scroll down to load the deferred iframe. + window.addEventListener("load", t.step_func(() => { + const base = document.querySelector('base'); + base.href = '/invalid-url-where-no-subresources-exist/'; + has_window_loaded = true; + below_viewport_iframe.element().scrollIntoView(); + })); + + below_viewport_iframe.promise.then( + t.step_func_done(() => { + assert_true(has_window_loaded, + "Below-viewport loading=lazy iframes do not block the " + + "window load event"); + assert_true(below_viewport_iframe.element().contentDocument.body. + innerHTML.includes("<p>Subframe</p>"), + "The loading=lazy iframe's content is accessible upon loading"); + })); + + }, "When a loading=lazy iframe is loaded, it loads relative to the " + + "document's base URL computed at parse-time."); +</script> + +<body> + <div style="height:1000vh"></div> + <iframe id="below-viewport" src="subframe.html" loading="lazy" + width="200px" height="100px" onload="below_viewport_iframe.resolve()"> + </iframe> +</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html index 145df404003..68734d5708d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy-referrerpolicy-change.sub.tentative.html @@ -7,7 +7,7 @@ <link rel="help" href="https://github.com/scott-little/lazyload"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <script src="../the-img-element/common.js"></script> + <script src="../resources/common.js"></script> </head> <script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html new file mode 100644 index 00000000000..0a882ef25bc --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-loading-lazy.tentative.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<head> + <title>Iframes with loading='lazy' load when in the viewport</title> + <link rel="author" title="Scott Little" href="mailto:sclittle@chromium.org"> + <link rel="help" href="https://github.com/scott-little/lazyload"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> +</head> + +<script> + const t = async_test("Test that iframes with loading='lazy' load once they " + + "enter the viewport."); + + let has_window_loaded = false; + let has_in_viewport_loaded = false; + + const in_viewport_iframe_onload = t.step_func(() => { + assert_false(has_in_viewport_loaded, + "The in_viewport element should load only once."); + has_in_viewport_loaded = true; + }); + + window.addEventListener("load", t.step_func(() => { + assert_true(has_in_viewport_loaded, + "The in_viewport element should have loaded before " + + "window.load()."); + assert_false(has_window_loaded, + "The window.load() event should only fire once."); + has_window_loaded = true; + document.getElementById("below_viewport").scrollIntoView(); + })); + + const below_viewport_iframe_onload = t.step_func_done(() => { + assert_true(has_window_loaded, + "The window.load() event should have fired before " + + "below_viewport loaded."); + }); +</script> + +<body> + <iframe id="in_viewport" src="resources/subframe.html?in-viewport" + loading="lazy" width="200px" height="100px" + onload="in_viewport_iframe_onload();"></iframe> + <div style="height:1000vh;"></div> + <iframe id="below_viewport" src="resources/subframe.html?below-viewport" + loading="lazy" width="200px" height="100px" + onload="below_viewport_iframe_onload();"></iframe> + + <!-- This async script loads very slowly in order to ensure that, if the + below_viewport element has started loading, it has a chance to finish + loading before window.load() happens, so that the test will dependably + fail in that case instead of potentially passing depending on how long + different resource fetches take. --> + <script async src="/common/slow.py"></script> +</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/resources/subframe.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/resources/subframe.html index 07cb999afae..07cb999afae 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/resources/subframe.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-iframe-element/resources/subframe.html diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/below-viewport-image-loading-lazy-load-event.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/below-viewport-image-loading-lazy-load-event.html index 2f54f3dbcbb..b1dee3a3ca8 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/below-viewport-image-loading-lazy-load-event.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/below-viewport-image-loading-lazy-load-event.html @@ -6,7 +6,7 @@ <link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <script src="common.js"></script> + <script src="../resources/common.js"></script> </head> <body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/iframe-loading-eager.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/iframe-loading-eager.html deleted file mode 100644 index 8509e74d155..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/iframe-loading-eager.html +++ /dev/null @@ -1,42 +0,0 @@ -<!DOCTYPE html> -<head> - <title>Iframes with loading='eager' load immediately regardless of their position with respect to the viewport.</title> - <link rel="author" title="Scott Little" href="mailto:sclittle@chromium.org"> - <link rel="help" href="https://github.com/scott-little/lazyload"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> - -<script> - const t = async_test("Test that iframes with loading='eager' load immediately regardless of their position with respect to the viewport."); - - let has_in_viewport_loaded = false; - const in_viewport_iframe_onload = t.step_func(function() { - assert_false(has_in_viewport_loaded, "The in_viewport element should load only once."); - has_in_viewport_loaded = true; - }); - - let has_below_viewport_loaded = false; - const below_viewport_iframe_onload = t.step_func(function() { - assert_false(has_below_viewport_loaded, "The below_viewport element should load only once."); - has_below_viewport_loaded = true; - }); - - window.addEventListener("load", t.step_func_done(function() { - assert_true(has_in_viewport_loaded, "The in_viewport element should have loaded before window.load()."); - assert_true(has_below_viewport_loaded, "The below_viewport element should have loaded before window.load()."); - })); -</script> - -<body> - <iframe id="in_viewport" src="resources/subframe.html?first" loading="eager" width="200px" height="100px" onload="in_viewport_iframe_onload();"> - </iframe> - <div style="height:10000px;"></div> - - <!-- - The below_viewport element loads very slowly in order to ensure that the - window load event is blocked on it. - --> - <iframe id="below_viewport" src="resources/subframe.html?pipe=trickle(d1)" loading="eager" width="200px" height="100px" onload="below_viewport_iframe_onload();"> - </iframe> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/iframe-loading-lazy.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/iframe-loading-lazy.html deleted file mode 100644 index aa241e1797c..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/iframe-loading-lazy.html +++ /dev/null @@ -1,48 +0,0 @@ -<!DOCTYPE html> -<head> - <title>Iframes with loading='lazy' load when in the viewport</title> - <link rel="author" title="Scott Little" href="mailto:sclittle@chromium.org"> - <link rel="help" href="https://github.com/scott-little/lazyload"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> -</head> - -<script> - const t = async_test("Test that iframes with loading='lazy' load once they enter the viewport."); - - let has_window_loaded = false; - let has_in_viewport_loaded = false; - - const in_viewport_iframe_onload = t.step_func(function() { - assert_false(has_in_viewport_loaded, "The in_viewport element should load only once."); - has_in_viewport_loaded = true; - }); - - window.addEventListener("load", t.step_func(function() { - assert_true(has_in_viewport_loaded, "The in_viewport element should have loaded before window.load()."); - assert_false(has_window_loaded, "The window.load() event should only fire once."); - has_window_loaded = true; - document.getElementById("below_viewport").scrollIntoView(); - })); - - const below_viewport_iframe_onload = t.step_func_done(function() { - assert_true(has_window_loaded, "The window.load() event should have fired before below_viewport loaded."); - }); -</script> - -<body> - <iframe id="in_viewport" src="resources/subframe.html?first" loading="lazy" width="200px" height="100px" onload="in_viewport_iframe_onload();"> - </iframe> - <div style="height:10000px;"></div> - <iframe id="below_viewport" src="resources/subframe.html?second" loading="lazy" width="200px" height="100px" onload="below_viewport_iframe_onload();"> - </iframe> - - <!-- - This async script loads very slowly in order to ensure that, if the - below_viewport element has started loading, it has a chance to finish - loading before window.load() happens, so that the test will dependably fail - in that case instead of potentially passing depending on how long different - resource fetches take. - --> - <script async src="/common/slow.py"></script> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-parse-url-base.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-base-url.html index f8201c4948b..f8201c4948b 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-parse-url-base.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-base-url.html diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-eager.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-eager.html index b395f84500b..54e169f8672 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-eager.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-eager.html @@ -1,6 +1,7 @@ <!DOCTYPE html> <head> - <title>Images with loading='eager' load immediately regardless of their position with respect to the viewport</title> + <title>Images with loading='eager' load immediately regardless of their + position with respect to the viewport</title> <link rel="author" title="Scott Little" href="mailto:sclittle@chromium.org"> <link rel="help" href="https://github.com/scott-little/lazyload"> <script src="/resources/testharness.js"></script> @@ -8,33 +9,39 @@ </head> <script> - const t = async_test("Test that images with loading='eager' load immediately regardless of their position with respect to the viewport."); + const t = async_test("Test that images with loading='eager' load " + + "immediately regardless of their position with " + + "respect to the viewport."); let has_in_viewport_loaded = false; - const in_viewport_img_onload = t.step_func(function() { - assert_false(has_in_viewport_loaded, "The in_viewport element should load only once."); + const in_viewport_img_onload = t.step_func(() => { + assert_false(has_in_viewport_loaded, + "The in_viewport element should load only once."); has_in_viewport_loaded = true; }); let has_below_viewport_loaded = false; - const below_viewport_img_onload = t.step_func(function() { - assert_false(has_below_viewport_loaded, "The below_viewport element should load only once."); + const below_viewport_img_onload = t.step_func(() => { + assert_false(has_below_viewport_loaded, + "The below_viewport element should load only once."); has_below_viewport_loaded = true; }); - window.addEventListener("load", t.step_func_done(function() { - assert_true(has_in_viewport_loaded, "The in_viewport element should have loaded before window.load()."); - assert_true(has_below_viewport_loaded, "The below_viewport element should have loaded before window.load()."); + window.addEventListener("load", t.step_func_done(() => { + assert_true(has_in_viewport_loaded, + "The in_viewport element should have loaded before window.load()."); + assert_true(has_below_viewport_loaded, + "The below_viewport element should have loaded before window.load()."); })); </script> <body> - <img id="in_viewport" src="resources/image.png?first" loading="eager" onload="in_viewport_img_onload();"> + <img id="in_viewport" src="resources/image.png?in-viewport" loading="eager" onload="in_viewport_img_onload();"> <div style="height:10000px;"></div> - <!-- - The below_viewport element loads very slowly in order to ensure that the - window load event is blocked on it. - --> - <img id="below_viewport" src="resources/image.png?pipe=trickle(d2)" loading="eager" onload="below_viewport_img_onload();"> + <!-- The below_viewport element loads very slowly in order to ensure that the + window load event is blocked on it. --> + <img id="below_viewport" + src="resources/image.png?below-viewport&pipe=trickle(d2)" + loading="eager" onload="below_viewport_img_onload();"> </body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url-2.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url-2.html new file mode 100644 index 00000000000..7b96823a945 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url-2.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<head> + <title>Deferred loading=lazy images load relative to the document's base URL + at parse-time</title> + <link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org"> + <link rel="author" title="Raj T" href="mailto:rajendrant@chromium.org"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../resources/common.js"></script> +</head> + +<script> + const below_viewport_img = new ElementLoadPromise("below-viewport"); + + let has_window_loaded = false; + + async_test(t => { + // Change the document's base URL to a bogus one, and scroll the + // below-viewport img into view. When it loads, it should load relative + // to the old base URL computed at parse-time. + window.addEventListener("load", t.step_func(() => { + window.history.pushState(2, document.title, + '/invalid-url-where-no-subresources-exist/') + has_window_loaded = true; + below_viewport_img.element().scrollIntoView(); + })); + + below_viewport_img.promise.then(t.step_func_done(() => { + assert_true(has_window_loaded, + "Below-viewport loading=lazy images do not block the " + + "window load event"); + })); + + below_viewport_img.promise.catch( + t.unreached_func("The image request should not load relative to the " + + "current (incorrect) base URL.") + ); + }, "When a loading=lazy image is loaded, it loads relative to the " + + "document's base URL computed at parse-time."); +</script> + +<body> + <div style="height:1000vh;"></div> + <script> + // Change the document's base URL so that the img request parses relative + // to it when it sets up the request at parse-time. + window.history.pushState(1, document.title, 'resources/') + </script> + <img id="below-viewport" src="image.png" loading="lazy" + onload="below_viewport_img.resolve()" + onerror="below_viewport_img.reject()"> +</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html new file mode 100644 index 00000000000..90a8a43e344 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-base-url.html @@ -0,0 +1,51 @@ +<!DOCTYPE html> +<head> + <title>Deferred images with loading='lazy' use the original + base URL specified at parse-time</title> + <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="../resources/common.js"></script> + <base href='/html/semantics/embedded-content/the-img-element/resources/'> +</head> + +<script> + const below_viewport_img = new ElementLoadPromise("below-viewport"); + + let has_window_loaded = false; + + async_test(t => { + // At this point, the below-viewport image's request has been set-up, and + // its URL is the URL that was parsed relative to the document's base URL + // at this time. Any changes to the document's base URL from this point + // forward should not impact the image when we scroll it in-view. This is + // because the next step in the #updating-the-img-data algorithm is to to + // fetch the request that has already been set up. Now we'll change the + // document's base URL, and scroll the image in-view. + window.addEventListener("load", t.step_func(() => { + const base = document.querySelector('base'); + base.href = '/invalid-url-where-no-subresources-exist/'; + has_window_loaded = true; + below_viewport_img.element().scrollIntoView(); + })); + + below_viewport_img.promise.then(t.step_func_done(() => { + assert_true(has_window_loaded, + "Below-viewport loading=lazy images do not block the " + + "window load event"); + })); + + below_viewport_img.promise.catch( + t.unreached_func("The image request should not load relative to the " + + "current (incorrect) base URL.") + ); + }, "When a loading=lazy image is loaded, it loads relative to the " + + "document's base URL computed at parse-time."); +</script> + +<body> + <div style="height:1000vh"></div> + <img id="below-viewport" src="image.png" loading="lazy" + onload="below_viewport_img.resolve()" + onerror="below_viewport_img.reject()"> +</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub.html index 3fb827df2d6..83e61d8465f 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-crossorigin-change.sub.html @@ -5,7 +5,7 @@ <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <script src="common.js"></script> + <script src="../resources/common.js"></script> </head> <script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-load-event.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-load-event.html index 1748a5bcc43..0da5379df48 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-load-event.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-load-event.html @@ -5,7 +5,7 @@ <link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <script src="common.js"></script> + <script src="../resources/common.js"></script> </head> <body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-referrerpolicy-change.sub.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-referrerpolicy-change.sub.html index 307d9571b49..110c36cca7d 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-referrerpolicy-change.sub.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-referrerpolicy-change.sub.html @@ -7,7 +7,7 @@ <link rel="help" href="https://html.spec.whatwg.org/multipage/images.html#updating-the-image-data"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <script src="common.js"></script> + <script src="../resources/common.js"></script> </head> <script> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-below-viewport-image-loading-lazy.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-below-viewport-image-loading-lazy.html index 5f4fbdf24b3..1a84d1de305 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-below-viewport-image-loading-lazy.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-below-viewport-image-loading-lazy.html @@ -6,7 +6,7 @@ <link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <script src="common.js"></script> + <script src="../resources/common.js"></script> </head> <body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-image-loading-lazy.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-image-loading-lazy.html index ca1c813d3b0..5f7da1a8465 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-image-loading-lazy.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/not-rendered-image-loading-lazy.html @@ -5,7 +5,7 @@ <link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <script src="common.js"></script> + <script src="../resources/common.js"></script> </head> <body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied-2.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied-2.html deleted file mode 100644 index 352d77c9e82..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied-2.html +++ /dev/null @@ -1,51 +0,0 @@ -<!DOCTYPE html> -<head> - <title>Deferred images with loading='lazy' use the original - base URL specified at the parse time</title> - <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="common.js"></script> - <base href='/html/semantics/embedded-content/the-img-element/resources/'> -</head> - -<script> - const below_viewport_img_promise = new ElementLoadPromise("below_viewport_img"); - - let has_window_loaded = false; - - async_test(function(t) { - - // Change the base URL and scroll down to load the deferred elements. - window.addEventListener("load", t.step_func(function() { - const base = document.getElementsByTagName('base')[0]; - base.href = '/invalid-url-where-no-subresources-exist/'; - has_window_loaded = true; - below_viewport_img_promise.element().scrollIntoView(); - })); - - below_viewport_img_promise.promise.then( - t.step_func_done(function() { - assert_true(has_window_loaded, - "Below-viewport loading=lazy images do not block the " + - "window load event"); - assert_true(below_viewport_img_promise.element().complete, - "The loading=lazy image should be considered complete " + - "upon load."); - assert_greater_than(below_viewport_img_promise.element().naturalWidth, - 0, - "The loading=lazy should have non-zero width " + - "upon loading"); - }) - ).catch(t.unreached_func("The image request should not load relative to " + - "the current (incorrect) base URL.")); - }, "Deferred images with loading='lazy' use the original base URL " + - "specified at the parse time"); -</script> - -<body> - <div style="height:1000vh"></div> - <img id="below_viewport_img" src="image.png" loading="lazy" - onload="below_viewport_img_promise.resolve();" - onerror="below_viewport_img_promise.reject();"> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied-iframe.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied-iframe.html deleted file mode 100644 index f37a67d2c90..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied-iframe.html +++ /dev/null @@ -1,48 +0,0 @@ -<!DOCTYPE html> -<head> - <title>Deferred iframes with loading='lazy' use the original - base URL specified at the parse time</title> - <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="common.js"></script> - <base href='/html/semantics/embedded-content/the-img-element/resources/'> -</head> - -<script> - const below_viewport_iframe_promise = new ElementLoadPromise("below_viewport_iframe"); - - let has_window_loaded = false; - - async_test(function(t) { - - // Change the base URL and scroll down to load the deferred elements. - window.addEventListener("load", t.step_func(function() { - const base = document.getElementsByTagName('base')[0]; - base.href = '/invalid-url-where-no-subresources-exist/'; - has_window_loaded = true; - below_viewport_iframe_promise.element().scrollIntoView(); - })); - - below_viewport_iframe_promise.promise.then( - t.step_func_done(function() { - assert_true(has_window_loaded, - "Below-viewport loading=lazy iframes do not block the " + - "window load event"); - assert_true(below_viewport_iframe_promise.element().contentDocument.body. - innerHTML.includes("<p>Subframe</p>"), - "The loading=lazy iframe's content is accessible upon loading"); - }) - ).catch(t.unreached_func("The iframe request should not load relative to " + - "the current (incorrect) base URL.")); - }, "Deferred iframes with loading='lazy' use the original base URL " + - "specified at the parse time"); -</script> - -<body> - <div style="height:1000vh"></div> - <iframe id="below_viewport_iframe" src="subframe.html" loading="lazy" - width="200px" height="100px" onload="below_viewport_iframe_promise.resolve();" - onerror="below_viewport_iframe_promise.reject();"> - </iframe> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied.html deleted file mode 100644 index 6253155b815..00000000000 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/original-base-url-applied.html +++ /dev/null @@ -1,48 +0,0 @@ -<!DOCTYPE html> -<head> - <title>Deferred iframes and images with loading='lazy' use the original base URL specified at the parse time</title> - <link rel="author" title="Raj T" href="mailto:rajendrant@chromium.org"> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="common.js"></script> -</head> - -<script> - const below_viewport_iframe = new ElementLoadPromise("below_viewport_iframe"); - const below_viewport_img = new ElementLoadPromise("below_viewport_img"); - - // Change the base URL and scroll down to load the deferred elements. - window.addEventListener("load", () => { - window.history.pushState(1, document.title, '/invalid-url-where-no-subresources-exist/') - below_viewport_iframe.element().scrollIntoView(); - }); - - async_test(function(t) { - below_viewport_iframe.promise.then( - t.step_func_done(function() { - assert_true(below_viewport_iframe.element().contentDocument.body.innerHTML.includes("<p>Subframe</p>")); - })); - }, "Test that when deferred iframe is loaded, it uses the base URL computed at parse time."); - - async_test(function(t) { - below_viewport_img.promise.then( - t.step_func_done(function() { - assert_true(below_viewport_img.element().complete); - assert_greater_than(below_viewport_img.element().naturalWidth, 0); - }) - ).catch(t.unreached_func("The image load should not fail, trying to load with invalid base URL.")); - }, "Test that when deferred img is loaded, it uses the base URL computed at parse time."); -</script> - -<body> - <div style="height:10000px;"></div> - <script> - // Change the base URL so that the iframe makes use of that in its relative - // URL to absolute URL computation at parse time. - window.history.pushState(1, document.title, 'resources/') - </script> - <iframe id="below_viewport_iframe" src="subframe.html" loading="lazy" width="200px" height="100px" onload="below_viewport_iframe.resolve();"> - </iframe> - <img id="below_viewport_img" src="image.png" loading="lazy" onload="below_viewport_img.resolve();" - onerror="below_viewport_img.reject();"> -</body> diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/picture-loading-lazy.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/picture-loading-lazy.html index 0ab2fb27367..08c01616bd6 100644 --- a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/picture-loading-lazy.html +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/picture-loading-lazy.html @@ -5,7 +5,7 @@ <link rel="help" href="https://github.com/scott-little/lazyload"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> - <script src="common.js"></script> + <script src="../resources/common.js"></script> </head> <script> |