mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #26561 - servo-wpt-sync:wpt_update_18-05-2020, r=servo-wpt-sync
Sync WPT with upstream (18-05-2020) Automated downstream sync of changes from upstream as of 18-05-2020. [no-wpt-sync] r? @servo-wpt-sync
This commit is contained in:
commit
7867bb6429
92 changed files with 576 additions and 476 deletions
|
@ -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
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-004.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-005.html]
|
||||
[Miss clipped float]
|
||||
expected: FAIL
|
||||
|
|
@ -2,6 +2,3 @@
|
|||
[Hit test intersecting scaled box]
|
||||
expected: FAIL
|
||||
|
||||
[Hit test within unscaled box]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -17,3 +17,6 @@
|
|||
[test the top of layer]
|
||||
expected: FAIL
|
||||
|
||||
[test some point of the element: top left corner]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_1.html]
|
||||
[Multiple history traversals from the same task]
|
||||
expected: FAIL
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[077.html]
|
||||
[ adding several types of scripts through the DOM and removing some of them confuses scheduler ]
|
||||
expected: FAIL
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[018.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, javascript:]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"iframe-loading-lazy.html": [
|
||||
"aa241e1797c26ae4e5582bfe48caddce48ba5311",
|
||||
"image-base-url.html": [
|
||||
"f8201c4948be8df1132c602afb134b71ebd75768",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"image-loading-eager.html": [
|
||||
"b395f84500bf3cfa2d2f4fbe1f704d5993e24316",
|
||||
"54e169f8672621b852694ef9055d87567ded45fd",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"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,
|
||||
{}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-004.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[hit-test-floats-005.html]
|
||||
[Miss clipped float]
|
||||
expected: FAIL
|
||||
|
|
@ -2,6 +2,3 @@
|
|||
[Hit test intersecting scaled box]
|
||||
expected: FAIL
|
||||
|
||||
[Hit test within unscaled box]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -21,3 +21,6 @@
|
|||
[test the top of layer]
|
||||
expected: FAIL
|
||||
|
||||
[test some point of the element: top left corner]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_1.html]
|
||||
[Multiple history traversals from the same task]
|
||||
expected: FAIL
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[iframe-loading-lazy.tentative.html]
|
||||
[Test that iframes with loading='lazy' load once they enter the viewport.]
|
||||
expected: FAIL
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[077.html]
|
||||
[ adding several types of scripts through the DOM and removing some of them confuses scheduler ]
|
||||
expected: FAIL
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[018.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, javascript:]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -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');
|
||||
|
|
|
@ -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'});
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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>
|
|
@ -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');
|
||||
|
|
|
@ -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>
|
|
@ -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});
|
||||
|
|
|
@ -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});
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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!!');
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue