diff --git a/tests/wpt/meta/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/meta/FileAPI/url/url-in-tags-revoke.window.js.ini index 745f3e84edb..62c2d998e8f 100644 --- a/tests/wpt/meta/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/meta/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -14,6 +14,3 @@ [Opening a blob URL in a new window by clicking an tag works immediately before revoking the URL.] expected: TIMEOUT - - [Fetching a blob URL immediately before revoking it works in - - - diff --git a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase.any.js b/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase.any.js index ea9f9593102..1b0fea54b9e 100644 --- a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase.any.js +++ b/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase.any.js @@ -5,23 +5,36 @@ 'use strict'; async_test(t => { - const open_rq = createdb(t, undefined, 9); + const delete_rq = indexedDB.deleteDatabase('db-that-doesnt-exist'); + delete_rq.onerror = fail(t, 'delete_rq.error'); + delete_rq.onsuccess = t.step_func(e => { + assert_equals(e.oldVersion, 0, 'event.oldVersion'); + assert_equals(e.target.source, null, 'event.target.source'); + }); + const open_rq = createdb(t, undefined, 9); open_rq.onupgradeneeded = t.step_func(e => {}); open_rq.onsuccess = t.step_func(e => { const db = e.target.result; db.close(); - const delete_rq = indexedDB.deleteDatabase(db.name); - delete_rq.onerror = t.step_func(e => { - assert_unreached('Unexpected delete_rq.error event'); - }); - delete_rq.onsuccess = t.step_func(e => { + const delete_rq1 = indexedDB.deleteDatabase(db.name); + delete_rq1.onerror = fail(t, 'delete_rq1.error'); + delete_rq1.onsuccess = t.step_func(e => { + assert_equals(e.oldVersion, 9, 'event.oldVersion'); + assert_equals(e.target.source, null, 'event.target.source'); + }); + + const delete_rq2 = indexedDB.deleteDatabase(db.name); + delete_rq2.onerror = fail(t, 'delete_rq2.error'); + + delete_rq2.onsuccess = t.step_func_done(e => { + assert_equals(e.oldVersion, 0, 'event.oldVersion'); assert_equals(e.target.source, null, 'event.target.source'); - t.done(); }); }); -}, 'deleteDatabase() request should have no source'); +}, 'deleteDatabase() request should have no source, and deleting a non-existent\ + database should succeed with oldVersion of 0.'); async_test(t => { const open_rq = createdb(t, undefined, 9); diff --git a/tests/wpt/tests/IndexedDB/idbindex_tombstones.any.js b/tests/wpt/tests/IndexedDB/idbindex_tombstones.any.js index 7a2dcc9cb11..b91c3ddb4e7 100644 --- a/tests/wpt/tests/IndexedDB/idbindex_tombstones.any.js +++ b/tests/wpt/tests/IndexedDB/idbindex_tombstones.any.js @@ -46,6 +46,15 @@ async function run_test(testCase, transactionMode, direction) { IDBKeyRange.bound(-11, 11), direction); let results = await iterateAndReturnAllCursorResult(testCase, cursor); assert_equals(results.length, 3); + // Verify count(). + await new Promise((resolve, reject) => { + const countRequest = txn.objectStore('objectStore').index('index').count(); + countRequest.onsuccess = testCase.step_func(event => { + assert_equals(event.target.result, 3); + resolve(); + }); + countRequest.onerror = reject; + }); db.close(); } diff --git a/tests/wpt/tests/IndexedDB/resources/support.js b/tests/wpt/tests/IndexedDB/resources/support.js index 1d5d8df5ca3..fe60bb81ee6 100644 --- a/tests/wpt/tests/IndexedDB/resources/support.js +++ b/tests/wpt/tests/IndexedDB/resources/support.js @@ -238,3 +238,15 @@ async function waitUntilIndexedDBOpenForTesting(rc, dbName, version) { }); }, [dbName, version]); } + +// Returns a detached ArrayBuffer by transferring it to a message port. +function createDetachedArrayBuffer() { + const array = new Uint8Array([1, 2, 3, 4]); + const buffer = array.buffer; + assert_equals(array.byteLength, 4); + + const channel = new MessageChannel(); + channel.port1.postMessage('', [buffer]); + assert_equals(array.byteLength, 0); + return array; +} diff --git a/tests/wpt/tests/clear-site-data/clear-cache-bfcache-partitioning.tentative.https.html b/tests/wpt/tests/clear-site-data/clear-cache-bfcache-partitioning.tentative.https.html index 02a2f020cbc..bdb72d9f0e9 100644 --- a/tests/wpt/tests/clear-site-data/clear-cache-bfcache-partitioning.tentative.https.html +++ b/tests/wpt/tests/clear-site-data/clear-cache-bfcache-partitioning.tentative.https.html @@ -17,7 +17,7 @@ runBfCacheClearTest( { getUrlParams: { clear: "cache", - secondOrigin: true, + crossSite: true, }, targetOrigin: crossSiteOrigin, mode: "iframe", diff --git a/tests/wpt/tests/clear-site-data/clear-cache-bfcache.https.html b/tests/wpt/tests/clear-site-data/clear-cache-bfcache.https.html index b9967c541f1..1d33c15635f 100644 --- a/tests/wpt/tests/clear-site-data/clear-cache-bfcache.https.html +++ b/tests/wpt/tests/clear-site-data/clear-cache-bfcache.https.html @@ -40,7 +40,7 @@ runBfCacheClearTest( { targetOrigin: crossSiteOrigin, getUrlParams: { - secondOrigin: true, + crossSite: true, clear: "cache", }, mode: "iframe", diff --git a/tests/wpt/tests/clear-site-data/clear-cache-partitioning.tentative.https.html b/tests/wpt/tests/clear-site-data/clear-cache-partitioning.tentative.https.html index 2deadeef2d0..c36f1c4a0c0 100644 --- a/tests/wpt/tests/clear-site-data/clear-cache-partitioning.tentative.https.html +++ b/tests/wpt/tests/clear-site-data/clear-cache-partitioning.tentative.https.html @@ -25,7 +25,7 @@ promise_test(test => { const TEST_SITE = { iframe: { cache: true, - secondOrigin: true, + crossSite: true, } } return testCacheClear(test, [TEST_SITE, CLEAR_ORIGIN_CACHE, TEST_SITE], assert_equals); @@ -38,7 +38,7 @@ promise_test(test => { const CLEAR_ORIGIN_CACHE = { iframe: { clear: "cache", - secondOrigin: true, + crossSite: true, } } return testCacheClear(test, [TEST_SITE, CLEAR_ORIGIN_CACHE, TEST_SITE], assert_equals); @@ -55,13 +55,13 @@ promise_test(test => { promise_test(test => { const TEST_SITE = { iframe: { - secondOrigin: true, + crossSite: true, cache: true, } } const TEST_SITE_CLEAR_IFRAME = { iframe: { - secondOrigin: true, + crossSite: true, clear: "all", } } @@ -73,7 +73,7 @@ promise_test(test => { cache: true }; const TEST_SITE_CLEAR_IFRAME = { - secondOrigin: true, + crossSite: true, iframe: { clear: "cache", } @@ -83,7 +83,7 @@ promise_test(test => { promise_test(test => { const TEST_SITE = { - secondOrigin: true, + crossSite: true, iframe: { cache: true, } @@ -98,7 +98,7 @@ promise_test(test => { promise_test(test => { const TEST_SITE = { iframe: { - secondOrigin: true, + crossSite: true, iframe: { cache: true, } @@ -114,7 +114,7 @@ promise_test(test => { const TEST_CLEAR_IFRAME_IFRAME = { iframe: { - secondOrigin: true, + crossSite: true, iframe: { clear: "cache", } @@ -126,7 +126,7 @@ promise_test(test => { promise_test(test => { const TEST_SITE = { iframe: { - secondOrigin: true, + crossSite: true, iframe: { cache: true, } @@ -135,7 +135,7 @@ promise_test(test => { const TEST_CLEAR_IFRAME_IFRAME = { iframe: { - secondOrigin: true, + crossSite: true, iframe: { clear: "cache", } diff --git a/tests/wpt/tests/clear-site-data/clear-cache.https.html b/tests/wpt/tests/clear-site-data/clear-cache.https.html index c75c2e16bec..19114cc2c32 100644 --- a/tests/wpt/tests/clear-site-data/clear-cache.https.html +++ b/tests/wpt/tests/clear-site-data/clear-cache.https.html @@ -111,6 +111,38 @@ promise_test(test => { return testCacheClear(test, [TEST_SITE, TEST_SITE_CLEAR, TEST_SITE], assert_not_equals); }, "clear all: Clear document in intermediate load"); +promise_test(test => { + const TEST_SITE = { + response: "html_embed_image", + }; + const TEST_SITE_CLEAR = { + clear: "cache", + }; + return testCacheClear(test, [TEST_SITE, TEST_SITE_CLEAR, TEST_SITE], assert_not_equals); +}, "clear cache: Image-Cache gets cleared"); + +promise_test(test => { + const TEST_SITE_INITAL = { + response: "html_embed_css", + }; + const TEST_SITE_FINAL = { + response: "html_embed_css", + clear: "cache", + }; + return testCacheClear(test, [TEST_SITE_INITAL, TEST_SITE_FINAL], assert_not_equals); +}, "clear cache: CSS-Cache gets cleared"); + +promise_test(test => { + const TEST_SITE_INITAL = { + response: "html_embed_js", + }; + const TEST_SITE_FINAL = { + response: "html_embed_js", + clear: "cache", + }; + return testCacheClear(test, [TEST_SITE_INITAL, TEST_SITE_FINAL], assert_not_equals); +}, "clear cache: JS-Cache gets cleared"); + diff --git a/tests/wpt/tests/clear-site-data/support/clear-cache-helper.sub.js b/tests/wpt/tests/clear-site-data/support/clear-cache-helper.sub.js index 1e9f2c2c33a..2aaed0916c3 100644 --- a/tests/wpt/tests/clear-site-data/support/clear-cache-helper.sub.js +++ b/tests/wpt/tests/clear-site-data/support/clear-cache-helper.sub.js @@ -9,16 +9,16 @@ const subdomainOrigin = 'https://{{hosts[][www2]}}:{{ports[https][0]}}'; const crossSiteOrigin = 'https://{{hosts[alt][]}}:{{ports[https][0]}}'; -const subomdainCrossSiteOrigin = +const subdomainCrossSiteOrigin = 'https://{{hosts[alt][www2]}}:{{ports[https][0]}}'; /** * Constructs a url for an intermediate "bounce" hop which represents a tracker. * @param {string} cacheHelper - Unique uuid for this test * @param {*} options - URL generation options. - * @param {boolean} [options.second_origin = true] - whether domain should be a different origin + * @param {boolean} [options.crossSite = false] - whether domain should be a different site * @param {boolean} [options.subdomain = false] - whether the domain should start with - * a different subdomain + * a different subdomain to make a request cross origin * @param {boolean} [options.cache = false] - whether the resource should be cacheable * @param {(null|'cache'|'all')} [options.clear] - whether to send the * Clear-Site-Data header. @@ -31,24 +31,23 @@ const subomdainCrossSiteOrigin = */ function getUrl(cacheHelper, { subdomain = false, - secondOrigin = false, + crossSite = false, cache = false, clear = null, clearFirst = null, response = "single_html", iframe = null, }) { - let url = "https://"; - if (subdomain && secondOrigin) { - url += "{{hosts[alt][www2]}}"; - } else if (subdomain) { // && !second_origin - url += "{{hosts[][www2]}}"; - } else if (secondOrigin) { // && !subdomain - url += "{{hosts[alt][]}}"; - } else { // !second_origin && !subdomain - url += "{{hosts[][]}}"; + let url; + if (subdomain && crossSite) { + url = subdomainCrossSiteOrigin; + } else if (subdomain) { // && !crossSite + url = subdomainOrigin; + } else if (crossSite) { // && !subdomain + url = crossSiteOrigin; + } else { // !crossSite && !subdomain + url = sameOrigin; } - url += ":{{ports[https][0]}}"; url += "/clear-site-data/support/clear-site-data-cache.py"; url = new URL(url); let params = new URLSearchParams(); diff --git a/tests/wpt/tests/clear-site-data/support/clear-site-data-cache.py b/tests/wpt/tests/clear-site-data/support/clear-site-data-cache.py index 38f131bdd52..bab640213cc 100644 --- a/tests/wpt/tests/clear-site-data/support/clear-site-data-cache.py +++ b/tests/wpt/tests/clear-site-data/support/clear-site-data-cache.py @@ -3,12 +3,50 @@ Loaded in Step 2/4/Optional 6 (/clear-site-data/clear-cache.https.html) Sending Message for Step 3/5/Optional 7 (/clear-site-data/clear-cache.https.html) """ import uuid +import random + +def generate_png(width, height, color=(0, 0, 0)): + import zlib + import struct + def chunk(chunk_type, data): + return ( + struct.pack(">I", len(data)) + + chunk_type + + data + + struct.pack(">I", zlib.crc32(chunk_type + data) & 0xffffffff) + ) + + # PNG signature + png = b"\x89PNG\r\n\x1a\n" + + # IHDR chunk + ihdr = struct.pack(">IIBBBBB", width, height, 8, 2, 0, 0, 0) + png += chunk(b'IHDR', ihdr) + + # IDAT chunk: RGB pixels + row = b'\x00' + bytes(color * width) + raw = row * height + idat = zlib.compress(raw) + png += chunk(b'IDAT', idat) + + # IEND chunk + png += chunk(b'IEND', b'') + return png def main(request, response): # type of response: - # - "single_html": Main page html file with a different postMessage uuid on each response - # - "json": Json that always responds with a different uuid in a single-element array - # - "html_embed_json": Main page html that embeds a cachable version of the above json + # - General purpose: returns random uuid or forwards uuid from iframe + # - "single_html": Main page html file with a different postMessage uuid on each response + # - Pages for simple testing normal http cache: + # - "json": Json that always responds with a different uuid in a single-element array + # - "html_embed_json": Main page html that embeds a cachable version of the above json + # - Pages for testing specialized caches + # - "image": Image that returns random dimensions up to 1024x1024 each time + # - "html_embed_image": Main page html that embeds a cachable version of the above image + # - "css": Style sheet with random uuid variable + # - "html_embed_css": Main page html that embeds a cachable version of the above css + # - "js": Script that returns a different uuid each time + # - "html_embed_js": Main page html that embeds a cachable version of the above js file response_type = request.GET.first(b"response") cache_helper = request.GET.first(b"cache_helper") @@ -26,6 +64,12 @@ def main(request, response): headers = [] if response_type == b"json": headers += [(b"Content-Type", b"application/json")] + elif response_type == b"image": + headers += [(b"Content-Type", b"image/png")] + elif response_type == b"css": + headers += [(b"Content-Type", b"text/css")] + elif response_type == b"js": + headers += [(b"Content-Type", b"text/javascript")] else: headers += [(b"Content-Type", b"text/html")] @@ -96,6 +140,63 @@ def main(request, response): {request.url}
{url} ''' - + elif response_type == b"image": + # send uniquely sized images, because that info can be retrived from html and definitly using the image cache + # helper for below "html_embed_image" + content = generate_png(random.randint(1, 1024), random.randint(1, 1024)) + elif response_type == b"html_embed_image": + urls = [request.url_parts.path + "?response=image&cache&cache_helper=" + cache_helper.decode() + "&img=" + str(i) for i in range(2)] + content = f''' + + + + {request.url}
+
+
+ ''' + elif response_type == b"css": + # send unique UUID. helper for below "html_embed_css" + content = f''' + :root {{ + --uuid: "{uuid.uuid4()}" + }}''' + elif response_type == b"html_embed_css": + url = request.url_parts.path + "?response=css&cache&cache_helper=" + cache_helper.decode() + content = f''' + + + + + {request.url}
+ {url} + ''' + elif response_type == b"js": + # send unique UUID. helper for below "html_embed_js" + content = f''' + window.opener.postMessage("{uuid.uuid4()}", "*"); + window.close(); + ''' + elif response_type == b"html_embed_js": + url = request.url_parts.path + "?response=js&cache&cache_helper=" + cache_helper.decode() + content = f''' + + + {request.url}
+ {url} + ''' return 200, headers, content diff --git a/tests/wpt/tests/content-security-policy/parsing/invalid-bytes.html b/tests/wpt/tests/content-security-policy/parsing/invalid-bytes.html new file mode 100644 index 00000000000..d215ed46abe --- /dev/null +++ b/tests/wpt/tests/content-security-policy/parsing/invalid-bytes.html @@ -0,0 +1,52 @@ + + +Content-Security-Policy Invalid Bytes Parsing Tests + + + + + + diff --git a/tests/wpt/tests/content-security-policy/parsing/support/csp.py b/tests/wpt/tests/content-security-policy/parsing/support/csp.py new file mode 100644 index 00000000000..7d710e55462 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/parsing/support/csp.py @@ -0,0 +1,25 @@ +def main(request, response): + csp = request.GET.first(b"policy") + headers = [ + (b"Content-Type", b"text/html"), + (b"Content-Security-Policy", csp) + ] + + body = f""" + + + CSP + + +

{csp}

+ + + + + """ + return (headers, body) diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/script-url-allowed-by-hash.https.html b/tests/wpt/tests/content-security-policy/script-src/tentative/script-url-allowed-by-hash.https.html new file mode 100644 index 00000000000..a074e2551ec --- /dev/null +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/script-url-allowed-by-hash.https.html @@ -0,0 +1,123 @@ + + + + + Scripts should be allowed if a matching URL hash is present + + + + + + + + + + + diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/support/add_dynamic_script.js b/tests/wpt/tests/content-security-policy/script-src/tentative/support/add_dynamic_script.js new file mode 100644 index 00000000000..b6b780bf44d --- /dev/null +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/support/add_dynamic_script.js @@ -0,0 +1,5 @@ +var head = document.getElementsByTagName('head')[0]; +var script = document.createElement('script'); +script.type = 'text/javascript'; +script.src = new URL("./externalScript.js", document.location).toString(); +head.appendChild(script); diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/support/externalScript.js b/tests/wpt/tests/content-security-policy/script-src/tentative/support/externalScript.js new file mode 100644 index 00000000000..ed3001c8745 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/support/externalScript.js @@ -0,0 +1 @@ +top.postMessage('SCRIPT_RAN', '*'); \ No newline at end of file diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe.sub.html b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe.sub.html new file mode 100644 index 00000000000..ee89531b575 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe.sub.html @@ -0,0 +1,11 @@ + + + + + + + diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta.sub.html b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta.sub.html new file mode 100644 index 00000000000..d4c1bbd0583 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta.sub.html @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta_multiple.html b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta_multiple.html new file mode 100644 index 00000000000..2837dde2142 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/support/iframe_meta_multiple.html @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/support/util.js b/tests/wpt/tests/content-security-policy/script-src/tentative/support/util.js new file mode 100644 index 00000000000..e813b8b13e5 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/support/util.js @@ -0,0 +1,12 @@ +function base64urlEncode(data) { + let result = btoa(data); + return result.replace(/=+$/g, '').replace(/\+/g, "-").replace(/\//g, "_"); +} + +const sha256ofURL = async (url) => { + const buffer = new TextEncoder().encode(url.toString()); + const hashBuffer = await window.crypto.subtle.digest('SHA-256', buffer); + const hashArray = Array.from(new Uint8Array(hashBuffer)); + const arr = hashArray.map(b => String.fromCharCode(b)).join(''); + return base64urlEncode(arr); +}; diff --git a/tests/wpt/tests/content-security-policy/script-src/tentative/url-hash-in-header-and-meta.https.html b/tests/wpt/tests/content-security-policy/script-src/tentative/url-hash-in-header-and-meta.https.html new file mode 100644 index 00000000000..77cadf521e4 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/script-src/tentative/url-hash-in-header-and-meta.https.html @@ -0,0 +1,99 @@ + + + + Tests for policies provided both in the header and by a meta tag + + + + + + + + + + diff --git a/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-allowed-by-hash.sub.html b/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-allowed-by-hash.sub.html new file mode 100644 index 00000000000..25078da2da6 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-allowed-by-hash.sub.html @@ -0,0 +1,25 @@ + + + + + + eval-allowed + + + + + + + + +
+ + + diff --git a/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-hashes-override-unsafe-eval.sub.html b/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-hashes-override-unsafe-eval.sub.html new file mode 100644 index 00000000000..d40fac0c302 --- /dev/null +++ b/tests/wpt/tests/content-security-policy/unsafe-eval/tentative/eval-hashes-override-unsafe-eval.sub.html @@ -0,0 +1,35 @@ + + + + + + eval-blocked + + + + + + + + +
+ + + \ No newline at end of file diff --git a/tests/wpt/tests/cookie-store/cookieStore_special_names.https.any.js b/tests/wpt/tests/cookie-store/cookieStore_special_names.https.any.js index 1e12674a7f7..b4a948ad8a2 100644 --- a/tests/wpt/tests/cookie-store/cookieStore_special_names.https.any.js +++ b/tests/wpt/tests/cookie-store/cookieStore_special_names.https.any.js @@ -54,6 +54,13 @@ }, `cookieStore.set with ${prefix} prefix a path option`); }); +['__HostHttp-', '__hosthttp-', '__Http-', '__http-'].forEach(prefix => { + promise_test(async testCase => { + await promise_rejects_js(testCase, TypeError, + cookieStore.set({ name: `${prefix}cookie-name`, value: 'cookie-value'})); + }, `cookieStore.set with ${prefix} prefix rejects`); +}); + promise_test(async testCase => { let exceptionThrown = false; try { diff --git a/tests/wpt/tests/cookies/attributes/max-age.html b/tests/wpt/tests/cookies/attributes/max-age.html index 7b7ff6ed4c4..8614ac48289 100644 --- a/tests/wpt/tests/cookies/attributes/max-age.html +++ b/tests/wpt/tests/cookies/attributes/max-age.html @@ -61,7 +61,7 @@ { cookie: ['test="9! = foo;bar\";" parser; max-age=6', "test9; max-age=2.63,"], expected: 'test="9! = foo; test9', - name: "Set mulitiple cookies with valid max-age values", + name: "Set multiple cookies with valid max-age values", }, { cookie: ["test=10; max-age=0", "test10; max-age=0"], @@ -75,4 +75,4 @@ } - \ No newline at end of file + diff --git a/tests/wpt/tests/cookies/prefix/__HostHttp.https.tentative.html b/tests/wpt/tests/cookies/prefix/__HostHttp.https.tentative.html new file mode 100644 index 00000000000..462ae8f19f0 --- /dev/null +++ b/tests/wpt/tests/cookies/prefix/__HostHttp.https.tentative.html @@ -0,0 +1,63 @@ + + + + + diff --git a/tests/wpt/tests/cookies/prefix/__Http.https.tentative.html b/tests/wpt/tests/cookies/prefix/__Http.https.tentative.html new file mode 100644 index 00000000000..4b1ec700721 --- /dev/null +++ b/tests/wpt/tests/cookies/prefix/__Http.https.tentative.html @@ -0,0 +1,61 @@ + + + + + diff --git a/tests/wpt/tests/css/css-anchor-position/position-try-fallbacks-004.html b/tests/wpt/tests/css/css-anchor-position/position-try-fallbacks-004.html new file mode 100644 index 00000000000..9c66d9ff0a0 --- /dev/null +++ b/tests/wpt/tests/css/css-anchor-position/position-try-fallbacks-004.html @@ -0,0 +1,42 @@ + +Retrying fallbacks after failing with a non-existing fallback + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/tests/wpt/tests/css/css-anchor-position/position-try-pseudo-element.html b/tests/wpt/tests/css/css-anchor-position/position-try-pseudo-element.html index 23c572a4104..90f29694e2d 100644 --- a/tests/wpt/tests/css/css-anchor-position/position-try-pseudo-element.html +++ b/tests/wpt/tests/css/css-anchor-position/position-try-pseudo-element.html @@ -9,7 +9,6 @@ position: relative; width: 195px; height: 200px; - left: 999999px; /* force fallback */ } #target::before { position-try-fallbacks: --f1, --f2; diff --git a/tests/wpt/tests/css/css-animations/parsing/animation-trigger-type-computed.tentative.html b/tests/wpt/tests/css/css-animations/parsing/animation-trigger-behavior-computed.tentative.html similarity index 76% rename from tests/wpt/tests/css/css-animations/parsing/animation-trigger-type-computed.tentative.html rename to tests/wpt/tests/css/css-animations/parsing/animation-trigger-behavior-computed.tentative.html index 073758a28b9..1847018b1d3 100644 --- a/tests/wpt/tests/css/css-animations/parsing/animation-trigger-type-computed.tentative.html +++ b/tests/wpt/tests/css/css-animations/parsing/animation-trigger-behavior-computed.tentative.html @@ -2,7 +2,7 @@ -CSS Animations: getComputedStyle().animationTriggerType +CSS Animations: getComputedStyle().animationTriggerBehavior @@ -13,7 +13,7 @@
diff --git a/tests/wpt/tests/css/css-animations/parsing/animation-trigger-behavior-valid.tentative.html b/tests/wpt/tests/css/css-animations/parsing/animation-trigger-behavior-valid.tentative.html new file mode 100644 index 00000000000..73b0fbc36c5 --- /dev/null +++ b/tests/wpt/tests/css/css-animations/parsing/animation-trigger-behavior-valid.tentative.html @@ -0,0 +1,24 @@ + + + + +CSS Animations: parsing animation-trigger-behavior with valid values + + + + + + + + + + + diff --git a/tests/wpt/tests/css/css-animations/parsing/animation-trigger-shorthand.tentative.html b/tests/wpt/tests/css/css-animations/parsing/animation-trigger-shorthand.tentative.html index 784790e750c..80d32d611c3 100644 --- a/tests/wpt/tests/css/css-animations/parsing/animation-trigger-shorthand.tentative.html +++ b/tests/wpt/tests/css/css-animations/parsing/animation-trigger-shorthand.tentative.html @@ -12,7 +12,7 @@ test_shorthand_value('animation-trigger', 'view() once contain 0% contain 100% cover 0% cover 100%', { - 'animation-trigger-type': 'once', + 'animation-trigger-behavior': 'once', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'contain', 'animation-trigger-range-end': 'contain', @@ -22,7 +22,7 @@ test_shorthand_value('animation-trigger', 'view() once contain 20% contain 80% cover 10% cover 90%', { - 'animation-trigger-type': 'once', + 'animation-trigger-behavior': 'once', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'contain 20%', 'animation-trigger-range-end': 'contain 80%', @@ -32,7 +32,7 @@ test_shorthand_value('animation-trigger', 'view() once contain 0% contain 100% cover 0%', { - 'animation-trigger-type': 'once', + 'animation-trigger-behavior': 'once', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'contain', 'animation-trigger-range-end': 'contain', @@ -42,7 +42,7 @@ test_shorthand_value('animation-trigger', 'view() once contain 20% contain 80% cover 10%', { - 'animation-trigger-type': 'once', + 'animation-trigger-behavior': 'once', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'contain 20%', 'animation-trigger-range-end': 'contain 80%', @@ -52,7 +52,7 @@ test_shorthand_value('animation-trigger', 'view() once contain 0% contain 100% cover', { - 'animation-trigger-type': 'once', + 'animation-trigger-behavior': 'once', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'contain', 'animation-trigger-range-end': 'contain', @@ -62,7 +62,7 @@ test_shorthand_value('animation-trigger', 'view() alternate contain 0% contain 100%', { - 'animation-trigger-type': 'alternate', + 'animation-trigger-behavior': 'alternate', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'contain', 'animation-trigger-range-end': 'contain', @@ -72,7 +72,7 @@ test_shorthand_value('animation-trigger', 'view() alternate contain 20% contain 80%', { - 'animation-trigger-type': 'alternate', + 'animation-trigger-behavior': 'alternate', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'contain 20%', 'animation-trigger-range-end': 'contain 80%', @@ -82,7 +82,7 @@ test_shorthand_value('animation-trigger', 'view() alternate contain 0%', { - 'animation-trigger-type': 'alternate', + 'animation-trigger-behavior': 'alternate', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'contain', 'animation-trigger-range-end': 'contain', @@ -92,7 +92,7 @@ test_shorthand_value('animation-trigger', 'view() alternate contain 10%', { - 'animation-trigger-type': 'alternate', + 'animation-trigger-behavior': 'alternate', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'contain 10%', 'animation-trigger-range-end': 'contain', @@ -102,7 +102,7 @@ test_shorthand_value('animation-trigger', 'view() alternate contain', { - 'animation-trigger-type': 'alternate', + 'animation-trigger-behavior': 'alternate', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'contain', 'animation-trigger-range-end': 'contain', @@ -111,7 +111,7 @@ }); test_shorthand_value('animation-trigger', 'view() alternate', { - 'animation-trigger-type': 'alternate', + 'animation-trigger-behavior': 'alternate', 'animation-trigger-timeline': 'view()', 'animation-trigger-range-start': 'normal', 'animation-trigger-range-end': 'normal', @@ -120,7 +120,7 @@ }); test_shorthand_value('animation-trigger', 'repeat', { - 'animation-trigger-type': 'repeat', + 'animation-trigger-behavior': 'repeat', 'animation-trigger-timeline': 'auto', 'animation-trigger-range-start': 'normal', 'animation-trigger-range-end': 'normal', diff --git a/tests/wpt/tests/css/css-animations/parsing/animation-trigger-type-valid.tentative.html b/tests/wpt/tests/css/css-animations/parsing/animation-trigger-type-valid.tentative.html deleted file mode 100644 index a94e8ec8899..00000000000 --- a/tests/wpt/tests/css/css-animations/parsing/animation-trigger-type-valid.tentative.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - -CSS Animations: parsing animation-trigger-type with valid values - - - - - - - - - - - diff --git a/tests/wpt/tests/css/css-borders/corner-shape/corner-shape-iframe-border.html b/tests/wpt/tests/css/css-borders/corner-shape/corner-shape-iframe-border.html new file mode 100644 index 00000000000..3ba18ec1bac --- /dev/null +++ b/tests/wpt/tests/css/css-borders/corner-shape/corner-shape-iframe-border.html @@ -0,0 +1,16 @@ + + + + + +

-

Drag circle above to the box below. It should be copied to the box once you drop it there.

-
- +

+

Drag circle above to the box below. It should be copied to the box once you drop it there.

+
+ diff --git a/tests/wpt/tests/html/editing/dnd/images/007.html b/tests/wpt/tests/html/editing/dnd/images/007.html index afacc9205cc..2ca3568651e 100644 --- a/tests/wpt/tests/html/editing/dnd/images/007.html +++ b/tests/wpt/tests/html/editing/dnd/images/007.html @@ -6,32 +6,35 @@ -dataURL image drag and drop to iframe - + dataURL image drag and drop to iframe + -

PNG circle

-

Drag circle above to the box below. It should be copied to the box once you drop it there.

-

- +

PNG circle

+

Drag circle above to the box below. It should be copied to the box once you drop it there.

+

+ diff --git a/tests/wpt/tests/html/editing/dnd/images/008.html b/tests/wpt/tests/html/editing/dnd/images/008.html index 2747c60ff6b..99c242e7c24 100644 --- a/tests/wpt/tests/html/editing/dnd/images/008.html +++ b/tests/wpt/tests/html/editing/dnd/images/008.html @@ -6,34 +6,35 @@ -dataURL image drag and drop between iframes - + dataURL image drag and drop between iframes + -

-

Drag circle above to the box below. It should be copied to the box once you drop it there.

-

- +

+

Drag circle above to the box below. It should be copied to the box once you drop it there.

+

+ diff --git a/tests/wpt/tests/html/editing/dnd/images/009.html b/tests/wpt/tests/html/editing/dnd/images/009.html index ebb252ab0bc..ecb1e8b7c18 100644 --- a/tests/wpt/tests/html/editing/dnd/images/009.html +++ b/tests/wpt/tests/html/editing/dnd/images/009.html @@ -6,48 +6,49 @@ -Image drag and drop from iframe - - + Image drag and drop from iframe + + -

-

Drag circle above to the box below. It should be copied to the box once you drop it there.

-
- +

+

Drag circle above to the box below. It should be copied to the box once you drop it there.

+
+ diff --git a/tests/wpt/tests/html/editing/dnd/images/010.html b/tests/wpt/tests/html/editing/dnd/images/010.html index d41b36c261a..4743e1520c8 100644 --- a/tests/wpt/tests/html/editing/dnd/images/010.html +++ b/tests/wpt/tests/html/editing/dnd/images/010.html @@ -6,34 +6,37 @@ -Image drag and drop to iframe - + Image drag and drop to iframe + -

PNG circle

-

Drag circle above to the box below. It should be copied to the box once you drop it there.

-

- +

PNG circle

+

Drag circle above to the box below. It should be copied to the box once you drop it there.

+

+ diff --git a/tests/wpt/tests/html/semantics/embedded-content/the-object-element/historical.html b/tests/wpt/tests/html/semantics/embedded-content/the-object-element/historical.html index c7a577a9d41..01b290f061e 100644 --- a/tests/wpt/tests/html/semantics/embedded-content/the-object-element/historical.html +++ b/tests/wpt/tests/html/semantics/embedded-content/the-object-element/historical.html @@ -30,4 +30,17 @@ async_test(t => { obj.onerror = t.unreached_func(); document.body.appendChild(obj); }, "object's typemustmatch content attribute should not be supported"); + +async_test(t => { + const obj = document.createElement("object"); + t.add_cleanup(() => obj.remove()); + obj.setAttribute("data", "/common/blank.html"); + obj.setAttribute("codebase", "https://test.invalid/"); + obj.onload = t.step_func_done(() => { + assert_not_equals(obj.contentDocument, null, "/common/blank.html should be loaded"); + assert_equals(obj.contentDocument.location.origin, location.origin, "document should be loaded with current origin as base"); + }); + obj.onerror = t.unreached_func(); + document.body.appendChild(obj); +}, "object's codebase content attribute should not be supported"); diff --git a/tests/wpt/tests/html/semantics/forms/the-input-element/radio-focus-navigation-disabled.html b/tests/wpt/tests/html/semantics/forms/the-input-element/radio-focus-navigation-disabled.html new file mode 100644 index 00000000000..1aaedf8bb1a --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-input-element/radio-focus-navigation-disabled.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
+ +
+
+ + + +
+
+ +
+ + diff --git a/tests/wpt/tests/html/semantics/forms/the-input-element/resources/focus-utils.js b/tests/wpt/tests/html/semantics/forms/the-input-element/resources/focus-utils.js new file mode 100644 index 00000000000..04026306411 --- /dev/null +++ b/tests/wpt/tests/html/semantics/forms/the-input-element/resources/focus-utils.js @@ -0,0 +1,28 @@ +'use strict'; + +function waitForRender() { + return new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))); +} + +async function navigateFocusForward() { + await waitForRender(); + const kTab = '\uE004'; + await new test_driver.Actions() + .keyDown(kTab) + .keyUp(kTab) + .send(); + await waitForRender(); +} + +async function navigateFocusBackward() { + await waitForRender(); + const kShift = '\uE008'; + const kTab = '\uE004'; + await new test_driver.Actions() + .keyDown(kShift) + .keyDown(kTab) + .keyUp(kTab) + .keyUp(kShift) + .send(); + await waitForRender(); +} diff --git a/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/form-submit-dialog-shadow.html b/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/form-submit-dialog-shadow.html new file mode 100644 index 00000000000..a5f40a580ec --- /dev/null +++ b/tests/wpt/tests/html/semantics/interactive-elements/the-dialog-element/form-submit-dialog-shadow.html @@ -0,0 +1,27 @@ + + + + + + + +
+ +
+
+ + diff --git a/tests/wpt/tests/html/semantics/menu/tentative/focus-menu-elements-arrowoperations.html b/tests/wpt/tests/html/semantics/menu/tentative/focus-menu-elements-arrowoperations.html index d41799f8504..4476806b015 100644 --- a/tests/wpt/tests/html/semantics/menu/tentative/focus-menu-elements-arrowoperations.html +++ b/tests/wpt/tests/html/semantics/menu/tentative/focus-menu-elements-arrowoperations.html @@ -24,31 +24,53 @@ + + + + + + + + +
+ + Commands A + Commands B + Commands C + +
+ + + Command D + + + + Command E + Command F + Commands G + + + + Command H + Command I + + + \ No newline at end of file diff --git a/tests/wpt/tests/html/semantics/menu/tentative/menubar-invoke-menulist.html b/tests/wpt/tests/html/semantics/menu/tentative/menubar-invoke-menulist.html index 3fe0caf62c7..4d228d48da2 100644 --- a/tests/wpt/tests/html/semantics/menu/tentative/menubar-invoke-menulist.html +++ b/tests/wpt/tests/html/semantics/menu/tentative/menubar-invoke-menulist.html @@ -54,20 +54,64 @@ test(() => { menubaritem.disabled = false; menubaritem.click(); assert_true(menulist.matches(':popover-open'), - 'The menulist should be able to open successfully.'); + 'toggle-popover opens the menulist'); - menulist.hidePopover(); + menubaritem.click(); + assert_false(menulist.matches(':popover-open'), + "toggle-popover closes the menulist"); + + menubaritem.setAttribute("command", "show-popover"); + menubaritem.click(); + assert_true(menulist.matches(':popover-open'), + "show-popover shows the menulist"); + + menubaritem.setAttribute("command", "hide-popover"); + menubaritem.click(); + assert_false(menulist.matches(':popover-open'), + "hide-popover hides the menulist"); +}, "Menuitem with toggle-popover, show-popover, hide-popover commands can invoke menulist popover."); + +test(() => { + menubaritem.setAttribute("command", "toggle-menu"); + menubaritem.setAttribute("commandfor", "more"); + + menubaritem.disabled = true; + menubaritem.click(); + assert_false(menulist.matches(':popover-open'), + 'The menulist should not open because the menuitem is disabled.'); + + menubaritem.disabled = false; + menubaritem.click(); + assert_true(menulist.matches(':popover-open'), + 'toggle-menu opens the menulist'); + + menubaritem.click(); + assert_false(menulist.matches(':popover-open'), + "toggle-menu closes the menulist"); menubaritem.setAttribute("command", "show-menu"); menubaritem.click(); - assert_true(menulist.matches(':popover-open')); + assert_true(menulist.matches(':popover-open'), + "show-menu opens the menulist"); menubaritem.setAttribute("command", "hide-menu"); menubaritem.click(); - assert_false(menulist.matches(':popover-open')); + assert_false(menulist.matches(':popover-open'), + "hide-menu hides the menulist"); +}, "Menuitem with toggle-menu, show-menu, hide-menu commands can invoke menulist popover."); + +test(() => { + menubaritem.command = "show-menu"; + menubaritem.commandForElement = menulist; + + menubaritem.click(); + assert_true(menulist.matches(':popover-open'), + 'show-menu opens the menulist.'); menulist.hidePopover(); -}, "Menuitem with valid command/commandfor can invoke menulist popover."); + assert_false(menulist.matches(':popover-open'), + 'The global hidePopover() method hides the menulist'); +}, "hidePopover() on menulist closes the popover."); test(() => { menubaritem.setAttribute("command", "toggle-menu"); @@ -84,7 +128,7 @@ test(() => { }, "Menuitem with invalid command/commandfor cannot invoke menulist popover."); test(() => { - checkableMenuitem.command = "show-menu"; + checkableMenuitem.command = "toggle-menu"; checkableMenuitem.commandForElement = menulist; checkableMenuitem.click(); @@ -93,11 +137,10 @@ test(() => { assert_true(menulist.matches(":popover-open"), "menulist matches :popover-open"); - checkableMenuitem.setAttribute("command", "hide-menu"); checkableMenuitem.click(); assert_false(checkableMenuitem.checked, - "checkable menu item is still checked"); + "checkable menu item is no longer checked"); assert_false(menulist.matches(":popover-open"), "menulist no longer matches :popover-open"); }, "Checkable menuitems can still invoke menulist popovers"); diff --git a/tests/wpt/tests/html/semantics/menu/tentative/menuitem-activate.html b/tests/wpt/tests/html/semantics/menu/tentative/menuitem-activate.html new file mode 100644 index 00000000000..2c403420772 --- /dev/null +++ b/tests/wpt/tests/html/semantics/menu/tentative/menuitem-activate.html @@ -0,0 +1,58 @@ + + + + + + + + + + Open first menu + + + + Toggle menu + Show popover + + + + First item! + + +
+ + diff --git a/tests/wpt/tests/html/semantics/permission-element/display-values.tentative.html b/tests/wpt/tests/html/semantics/permission-element/display-values.tentative.html new file mode 100644 index 00000000000..89dc540e117 --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/display-values.tentative.html @@ -0,0 +1,76 @@ + + + + + Permission Element: display style validation + + + + + + + + diff --git a/tests/wpt/tests/html/semantics/permission-element/text-decoration-ref.html b/tests/wpt/tests/html/semantics/permission-element/text-decoration-ref.html new file mode 100644 index 00000000000..c420d08cc7c --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/text-decoration-ref.html @@ -0,0 +1,8 @@ + + + +
+ +
+ + \ No newline at end of file diff --git a/tests/wpt/tests/html/semantics/permission-element/text-decoration-tentative.html b/tests/wpt/tests/html/semantics/permission-element/text-decoration-tentative.html new file mode 100644 index 00000000000..be4bd040d6b --- /dev/null +++ b/tests/wpt/tests/html/semantics/permission-element/text-decoration-tentative.html @@ -0,0 +1,18 @@ + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/tests/wpt/tests/html/semantics/popovers/popovertarget-disabled-fieldset.html b/tests/wpt/tests/html/semantics/popovers/popovertarget-disabled-fieldset.html new file mode 100644 index 00000000000..df8ea10dce8 --- /dev/null +++ b/tests/wpt/tests/html/semantics/popovers/popovertarget-disabled-fieldset.html @@ -0,0 +1,32 @@ + + + + + + +
popover
+ +
+ + +
+ + diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/idlharness.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/idlharness.tentative.html similarity index 100% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/idlharness.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/idlharness.tentative.html diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestelement-interface.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestelement-interface.tentative.html new file mode 100644 index 00000000000..ae2f8f99f64 --- /dev/null +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestelement-interface.tentative.html @@ -0,0 +1,72 @@ + + + + + + + + + +
+
+ + diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interestevent-dispatch-shadow.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestevent-dispatch-shadow.tentative.html similarity index 97% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interestevent-dispatch-shadow.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestevent-dispatch-shadow.tentative.html index ac1b72b0ef8..c509e733c7d 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interestevent-dispatch-shadow.tentative.html +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestevent-dispatch-shadow.tentative.html @@ -58,8 +58,8 @@ const shadow = host.attachShadow({ mode: "open" }); const button = shadow.appendChild(document.createElement("button")); const interestee = host.appendChild(document.createElement("div")); - button.interestTargetElement = interestee; - button.style = "interest-target-delay: 0s"; + button.interestForElement = interestee; + button.style = "interest-delay: 0s"; let event = null; let eventTarget = null; let eventSource = null; diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interestevent-interface.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestevent-interface.tentative.html similarity index 100% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interestevent-interface.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestevent-interface.tentative.html diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-anchor-event-dispatch.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-anchor-event-dispatch.tentative.html similarity index 92% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-anchor-event-dispatch.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-anchor-event-dispatch.tentative.html index ae9198a91d5..b7224ac4b56 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-anchor-event-dispatch.tentative.html +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-anchor-event-dispatch.tentative.html @@ -12,12 +12,12 @@
-Anchor -Anchor +Anchor +Anchor @@ -57,7 +57,7 @@
-Anchor +Anchor
Child div
diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-area-event-dispatch.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-area-event-dispatch.tentative.html similarity index 93% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-area-event-dispatch.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-area-event-dispatch.tentative.html index 4bd5165198e..2b1950cb6a1 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-area-event-dispatch.tentative.html +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-area-event-dispatch.tentative.html @@ -12,14 +12,14 @@
- + - + diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-basic-delays.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-basic-delays.tentative.html similarity index 94% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-basic-delays.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-basic-delays.tentative.html index 9a4806a8ae6..3e594cb3e00 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-basic-delays.tentative.html +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-basic-delays.tentative.html @@ -12,13 +12,13 @@
- + @@ -56,7 +56,7 @@ promise_test(async function (t) { svgInterestee = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); t.add_cleanup(async () => { - interestbutton.interestTargetElement = interestee; + interestbutton.interestForElement = interestee; svgInterestee.remove(); await hoverOver(otherbutton); }); @@ -66,7 +66,7 @@ assert_true(svgInterestee instanceof Element); let event = null; svgInterestee.addEventListener("interest", (e) => (event = e), { once: true }); - interestbutton.interestTargetElement = svgInterestee; + interestbutton.interestForElement = svgInterestee; await hoverOver(interestbutton); assert_true(!!event, "InterestEvent is fired"); assert_equals(event.source, interestbutton, "event.source is set to right element"); diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-css-properties.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-css-properties.tentative.html similarity index 94% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-css-properties.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-css-properties.tentative.html index 0aa45a41b3b..41c3938222d 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-css-properties.tentative.html +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-css-properties.tentative.html @@ -49,6 +49,6 @@ function testprop(prop) { ]); } -testprop('interest-target-show-delay'); -testprop('interest-target-hide-delay'); +testprop('interest-show-delay'); +testprop('interest-hide-delay'); diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-css-shorthands.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-css-shorthands.tentative.html new file mode 100644 index 00000000000..282525193f1 --- /dev/null +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-css-shorthands.tentative.html @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-hide-delay.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-hide-delay.tentative.html similarity index 93% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-hide-delay.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-hide-delay.tentative.html index 8828d879cac..4e2bf980125 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-hide-delay.tentative.html +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-hide-delay.tentative.html @@ -30,13 +30,13 @@ description = `method ${invokerMethod}`; // msSinceMouseOver() function is used to check that not-too-much time has // passed, and if it has, the test is simply skipped. Because of this // methodology, many/most of these tests will pass on browsers that do not -// implement `interesttarget`. See the `interesttarget-basic-delays` test. +// implement `interestfor`. See the `interestfor-basic-delays` test. const invokerHideDelay = 100; // The CSS delay setting. const hoverWaitTime = 200; // How long to wait to cover the delay for sure. async function makeTestParts(t) { // This ensures the tests in this file don't succeed sometimes, due to the above NOTE. - assert_true(HTMLAnchorElement.prototype.hasOwnProperty('interestTargetElement'),'interesttarget is not supported'); + assert_true(HTMLAnchorElement.prototype.hasOwnProperty('interestForElement'),'interestfor is not supported'); let {popover, invoker, unrelated} = await createPopoverAndInvokerForHoverTests(t, /*showdelayMs*/ 0, invokerHideDelay); let specificInvokerElement; invoker.innerHTML = 'Click me'; @@ -67,7 +67,7 @@ promise_test(async (t) => { await hoverOrFocus(invokerMethod,unrelated); await waitForHoverTime(hoverWaitTime); assert_false(popover.matches(':popover-open'),'interest should be lost after delay'); -},`The interest-target-hide-delay causes interest to be lost after a delay, ${description}`); +},`The interest-hide-delay causes interest to be lost after a delay, ${description}`); promise_test(async (t) => { const {popover,invoker,unrelated} = await makeTestParts(t); @@ -87,7 +87,7 @@ promise_test(async (t) => { const {popover,invoker,unrelated} = await makeTestParts(t); await hoverOrFocus(invokerMethod,popover); await waitForHoverTime(hoverWaitTime); - assert_true(popover.matches(':popover-open'),'hovering the interest target element should keep it showing'); + assert_true(popover.matches(':popover-open'),'hovering the interest for element should keep it showing'); const token = await mouseOverOrFocusAndRecord(t,invokerMethod,unrelated); let showing = popover.matches(':popover-open'); if (msSinceMouseOver(token) >= invokerHideDelay) @@ -96,7 +96,7 @@ promise_test(async (t) => { await hoverOrFocus(invokerMethod,unrelated); await waitForHoverTime(hoverWaitTime); assert_false(popover.matches(':popover-open'),'hovering unrelated element should cause interest lost after delay'); -},`hovering/focusing the interest target element keeps the invoker from losing interest, ${description}`); +},`hovering/focusing the interest for element keeps the invoker from losing interest, ${description}`); promise_test(async (t) => { const {popover,invoker,unrelated,specificInvokerElement} = await makeTestParts(t); diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-input-modalities.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-input-modalities.tentative.html similarity index 89% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-input-modalities.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-input-modalities.tentative.html index ce2962bfa84..990972adce6 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-input-modalities.tentative.html +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-input-modalities.tentative.html @@ -14,17 +14,17 @@ - + -Link +Link - + - + SVG A @@ -33,19 +33,19 @@ -
Target
- + -Link +Link - + - + SVG A
Popover
- +
Another Popover
- - - + + +
Target
@@ -32,8 +32,8 @@ :target-of-interest { background-color: yellow; } - [interesttarget] { - interest-target-delay: 0s; + [interestfor] { + interest-delay: 0s; } #target { inset:auto; @@ -43,7 +43,7 @@ - +
Popover with
diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-plain-inline-element.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-plain-inline-element.tentative.html similarity index 93% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-plain-inline-element.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-plain-inline-element.tentative.html index 68ce00193f7..c08a1673baa 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-plain-inline-element.tentative.html +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-plain-inline-element.tentative.html @@ -24,7 +24,7 @@

Test passes if there is a filled green square and no red.

- xxxxx + xxxxx
diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-popover-focus.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-popover-focus.tentative.html similarity index 94% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-popover-focus.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-popover-focus.tentative.html index 9dfc39a37a6..d9b1bca5b10 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-popover-focus.tentative.html +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-popover-focus.tentative.html @@ -10,13 +10,13 @@ - +
Popover with
diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-pseudo-classes.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-pseudo-classes.tentative.html similarity index 95% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-pseudo-classes.tentative.html rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-pseudo-classes.tentative.html index 924c4d5fbc8..2004aa2b3d9 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-pseudo-classes.tentative.html +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/interestfor-pseudo-classes.tentative.html @@ -12,7 +12,7 @@
Unrelated
- +
Target popover with all kinds of focusable things @@ -33,7 +33,7 @@ - +
Something after the button
Something else
@@ -27,5 +27,5 @@ promise_test(async function() { assert_not_equals(selection, "", "Something should be selected"); assert_true(selection.includes("Something after"),'The selection should include the outside text'); assert_false(selection.includes("RSTUVWXYZ"),'The selection should not include the button text'); -}, "Buttons with `interesttarget` should not be user-selectable"); +}, "Buttons with `interestfor` should not be user-selectable"); diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/resources/invoker-utils.js b/tests/wpt/tests/html/semantics/the-button-element/interest-for/resources/invoker-utils.js similarity index 91% rename from tests/wpt/tests/html/semantics/the-button-element/interest-target/resources/invoker-utils.js rename to tests/wpt/tests/html/semantics/the-button-element/interest-for/resources/invoker-utils.js index b12190c7b04..f06d668632f 100644 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/resources/invoker-utils.js +++ b/tests/wpt/tests/html/semantics/the-button-element/interest-for/resources/invoker-utils.js @@ -95,7 +95,7 @@ async function createPopoverAndInvokerForHoverTests(test, showdelayMs, hideDelay document.body.appendChild(unrelated); unrelated.textContent = 'Unrelated'; unrelated.setAttribute('style','position:fixed; top:0;'); - // Ensure we never hover over or focus on an active interesttarget element. + // Ensure we never hover over or focus on an active interestfor element. unrelated.focus(); await hoverOver(unrelated); const popover = document.createElement('div'); @@ -104,10 +104,10 @@ async function createPopoverAndInvokerForHoverTests(test, showdelayMs, hideDelay popover.textContent = 'Popover'; document.body.appendChild(popover); let invoker = document.createElement('button'); - invoker.interestTargetElement = popover; + invoker.interestForElement = popover; invoker.setAttribute('style',` - interest-target-show-delay: ${showdelayMs}ms; - interest-target-hide-delay: ${hideDelayMs}ms; + interest-show-delay: ${showdelayMs}ms; + interest-hide-delay: ${hideDelayMs}ms; position:fixed; top:200px; width:fit-content; @@ -115,10 +115,10 @@ async function createPopoverAndInvokerForHoverTests(test, showdelayMs, hideDelay `); invoker.innerText = 'Invoker'; document.body.appendChild(invoker); - const actualShowDelay = Number(getComputedStyle(invoker).interestTargetShowDelay.slice(0,-1))*1000; - assert_equals(actualShowDelay,showdelayMs,'interest-target-show-delay is incorrect'); - const actualHideDelay = Number(getComputedStyle(invoker).interestTargetHideDelay.slice(0,-1))*1000; - assert_equals(actualHideDelay,hideDelayMs,'interest-target-hide-delay is incorrect'); + const actualShowDelay = Number(getComputedStyle(invoker).interestShowDelay.slice(0,-1))*1000; + assert_equals(actualShowDelay,showdelayMs,'interest-show-delay is incorrect'); + const actualHideDelay = Number(getComputedStyle(invoker).interestHideDelay.slice(0,-1))*1000; + assert_equals(actualHideDelay,hideDelayMs,'interest-hide-delay is incorrect'); test.add_cleanup(() => { popover.remove(); invoker.remove(); diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interestelement-interface.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-target/interestelement-interface.tentative.html deleted file mode 100644 index 41616d97bd0..00000000000 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interestelement-interface.tentative.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - -
- - diff --git a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-css-shorthands.tentative.html b/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-css-shorthands.tentative.html deleted file mode 100644 index e3260d1b052..00000000000 --- a/tests/wpt/tests/html/semantics/the-button-element/interest-target/interesttarget-css-shorthands.tentative.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/tests/wpt/tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-detached-iframe.html b/tests/wpt/tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-detached-iframe.html new file mode 100644 index 00000000000..45e00eb5934 --- /dev/null +++ b/tests/wpt/tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-detached-iframe.html @@ -0,0 +1,310 @@ + + + + + + + diff --git a/tests/wpt/tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/resources/empty.html b/tests/wpt/tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/resources/empty.html new file mode 100644 index 00000000000..0e76edd65b7 --- /dev/null +++ b/tests/wpt/tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/resources/empty.html @@ -0,0 +1 @@ + diff --git a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic.https.html.ini b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic.https.html.ini new file mode 100644 index 00000000000..23d29dad740 --- /dev/null +++ b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic.https.html.ini @@ -0,0 +1,3 @@ +[simulate_characteristic.https.html] + expected: + if product != "chrome": ERROR diff --git a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic_response.https.html.ini b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic_response.https.html.ini new file mode 100644 index 00000000000..1b63a4f8c79 --- /dev/null +++ b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic_response.https.html.ini @@ -0,0 +1,3 @@ +[simulate_characteristic_response.https.html] + expected: + if product != "chrome": ERROR diff --git a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor.https.html.ini b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor.https.html.ini new file mode 100644 index 00000000000..b51cd5cbc67 --- /dev/null +++ b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor.https.html.ini @@ -0,0 +1,3 @@ +[simulate_descriptor.https.html] + expected: + if product != "chrome": ERROR diff --git a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor_response.https.html.ini b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor_response.https.html.ini new file mode 100644 index 00000000000..8b7aed64878 --- /dev/null +++ b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor_response.https.html.ini @@ -0,0 +1,3 @@ +[simulate_descriptor_response.https.html] + expected: + if product != "chrome": ERROR diff --git a/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_service.https.html.ini b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_service.https.html.ini new file mode 100644 index 00000000000..ffd2d728d47 --- /dev/null +++ b/tests/wpt/tests/infrastructure/metadata/infrastructure/testdriver/bidi/bluetooth/simulate_service.https.html.ini @@ -0,0 +1,3 @@ +[simulate_service.https.html] + expected: + if product != "chrome": ERROR diff --git a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/resources/bidi-bluetooth-helper.js b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/resources/bidi-bluetooth-helper.js index 87a2a55fa0e..bea234ffe4a 100644 --- a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/resources/bidi-bluetooth-helper.js +++ b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/resources/bidi-bluetooth-helper.js @@ -2,6 +2,9 @@ const DEVICE_NAME = 'LE Device'; const DEVICE_ADDRESS = '09:09:09:09:09:09'; +const HEART_RATE_SERVICE_UUID = '0000180d-0000-1000-8000-00805f9b34fb' +const DATE_TIME_CHARACTERISTIC_UUID = '00002a08-0000-1000-8000-00805f9b34fb' +const CHARACTERISTIC_USER_DESCRIPTION_DESCRIPTOR_UUID = '00002901-0000-1000-8000-00805f9b34fb' /** * Waits until the document has finished loading. diff --git a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic.https.html b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic.https.html new file mode 100644 index 00000000000..973b92e6cf9 --- /dev/null +++ b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic.https.html @@ -0,0 +1,46 @@ + + + +TestDriver bidi.bluetooth.simulate_characteristic method + + + + + + + \ No newline at end of file diff --git a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic_response.https.html b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic_response.https.html new file mode 100644 index 00000000000..3aa9f94b8f6 --- /dev/null +++ b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_characteristic_response.https.html @@ -0,0 +1,58 @@ + + + +TestDriver bidi.bluetooth.simulate_characteristic_response method + + + + + + + \ No newline at end of file diff --git a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor.https.html b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor.https.html new file mode 100644 index 00000000000..34c5d6e4534 --- /dev/null +++ b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor.https.html @@ -0,0 +1,54 @@ + + + +TestDriver bidi.bluetooth.simulate_descriptor method + + + + + + + \ No newline at end of file diff --git a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor_response.https.html b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor_response.https.html new file mode 100644 index 00000000000..303cc133d8d --- /dev/null +++ b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_descriptor_response.https.html @@ -0,0 +1,67 @@ + + + +TestDriver bidi.bluetooth.simulate_descriptor_response method + + + + + + + \ No newline at end of file diff --git a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_gatt_connection_response.https.html b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_gatt_connection_response.https.html index 449b2846114..c1bb50936c5 100644 --- a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_gatt_connection_response.https.html +++ b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_gatt_connection_response.https.html @@ -1,5 +1,6 @@ + TestDriver bidi.bluetooth.simulate_gatt_connection_response method diff --git a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_gatt_disconnection.https.html b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_gatt_disconnection.https.html index 0b8a8df93a6..695910275e5 100644 --- a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_gatt_disconnection.https.html +++ b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_gatt_disconnection.https.html @@ -1,5 +1,6 @@ + TestDriver bidi.bluetooth.simulate_gatt_disconnection method diff --git a/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_service.https.html b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_service.https.html new file mode 100644 index 00000000000..c6230dd1c34 --- /dev/null +++ b/tests/wpt/tests/infrastructure/testdriver/bidi/bluetooth/simulate_service.https.html @@ -0,0 +1,36 @@ + + + +TestDriver bidi.bluetooth.simulate_service method + + + + + + + \ No newline at end of file diff --git a/tests/wpt/tests/interfaces/CSP.idl b/tests/wpt/tests/interfaces/CSP.idl index d4a6377ebb3..cee3015c7ed 100644 --- a/tests/wpt/tests/interfaces/CSP.idl +++ b/tests/wpt/tests/interfaces/CSP.idl @@ -3,20 +3,18 @@ // (https://github.com/w3c/webref) // Source: Content Security Policy Level 3 (https://w3c.github.io/webappsec-csp/) -[Exposed=Window] -interface CSPViolationReportBody : ReportBody { - [Default] object toJSON(); - readonly attribute USVString documentURL; - readonly attribute USVString? referrer; - readonly attribute USVString? blockedURL; - readonly attribute DOMString effectiveDirective; - readonly attribute DOMString originalPolicy; - readonly attribute USVString? sourceFile; - readonly attribute DOMString? sample; - readonly attribute SecurityPolicyViolationEventDisposition disposition; - readonly attribute unsigned short statusCode; - readonly attribute unsigned long? lineNumber; - readonly attribute unsigned long? columnNumber; +dictionary CSPViolationReportBody : ReportBody { + USVString documentURL; + USVString? referrer; + USVString? blockedURL; + DOMString effectiveDirective; + DOMString originalPolicy; + USVString? sourceFile; + DOMString? sample; + SecurityPolicyViolationEventDisposition disposition; + unsigned short statusCode; + unsigned long? lineNumber; + unsigned long? columnNumber; }; enum SecurityPolicyViolationEventDisposition { diff --git a/tests/wpt/tests/interfaces/crash-reporting.idl b/tests/wpt/tests/interfaces/crash-reporting.idl index ba21afcf397..d10f3573791 100644 --- a/tests/wpt/tests/interfaces/crash-reporting.idl +++ b/tests/wpt/tests/interfaces/crash-reporting.idl @@ -3,11 +3,9 @@ // (https://github.com/w3c/webref) // Source: Crash Reporting (https://wicg.github.io/crash-reporting/) -[Exposed=(Window,Worker)] -interface CrashReportBody : ReportBody { - [Default] object toJSON(); - readonly attribute DOMString? reason; - readonly attribute DOMString? stack; - readonly attribute boolean? is_top_level; - readonly attribute DocumentVisibilityState? page_visibility; +dictionary CrashReportBody : ReportBody { + DOMString? reason; + DOMString? stack; + boolean? is_top_level; + DocumentVisibilityState? page_visibility; }; diff --git a/tests/wpt/tests/interfaces/csp-next.idl b/tests/wpt/tests/interfaces/csp-next.idl index d94b36cf885..f17c4b3a5f2 100644 --- a/tests/wpt/tests/interfaces/csp-next.idl +++ b/tests/wpt/tests/interfaces/csp-next.idl @@ -10,12 +10,10 @@ enum ScriptingPolicyViolationType { "eval" }; -[Exposed=(Window,Worker), SecureContext] -interface ScriptingPolicyReportBody : ReportBody { - [Default] object toJSON(); - readonly attribute DOMString violationType; - readonly attribute USVString? violationURL; - readonly attribute USVString? violationSample; - readonly attribute unsigned long lineno; - readonly attribute unsigned long colno; +dictionary ScriptingPolicyReportBody : ReportBody { + DOMString violationType; + USVString? violationURL; + USVString? violationSample; + unsigned long lineno; + unsigned long colno; }; diff --git a/tests/wpt/tests/interfaces/css-highlight-api.idl b/tests/wpt/tests/interfaces/css-highlight-api.idl index 61bf6d4caba..8d98b1230f1 100644 --- a/tests/wpt/tests/interfaces/css-highlight-api.idl +++ b/tests/wpt/tests/interfaces/css-highlight-api.idl @@ -27,7 +27,12 @@ interface HighlightRegistry { }; partial interface HighlightRegistry { - sequence highlightsFromPoint(float x, float y, optional HighlightsFromPointOptions options = {}); + sequence highlightsFromPoint(float x, float y, optional HighlightsFromPointOptions options = {}); +}; + +dictionary HighlightHitResult { + Highlight highlight; + sequence ranges; }; dictionary HighlightsFromPointOptions { diff --git a/tests/wpt/tests/interfaces/deprecation-reporting.idl b/tests/wpt/tests/interfaces/deprecation-reporting.idl index 4cf76ba8114..8f6e963918f 100644 --- a/tests/wpt/tests/interfaces/deprecation-reporting.idl +++ b/tests/wpt/tests/interfaces/deprecation-reporting.idl @@ -3,13 +3,11 @@ // (https://github.com/w3c/webref) // Source: Deprecation Reporting (https://wicg.github.io/deprecation-reporting/) -[Exposed=(Window,Worker)] -interface DeprecationReportBody : ReportBody { - [Default] object toJSON(); - readonly attribute DOMString id; - readonly attribute object? anticipatedRemoval; - readonly attribute DOMString message; - readonly attribute DOMString? sourceFile; - readonly attribute unsigned long? lineNumber; - readonly attribute unsigned long? columnNumber; +dictionary DeprecationReportBody : ReportBody { + DOMString id; + object? anticipatedRemoval; + DOMString message; + DOMString? sourceFile; + unsigned long? lineNumber; + unsigned long? columnNumber; }; diff --git a/tests/wpt/tests/interfaces/digital-credentials.idl b/tests/wpt/tests/interfaces/digital-credentials.idl index 60b63975640..885f0f6c0f9 100644 --- a/tests/wpt/tests/interfaces/digital-credentials.idl +++ b/tests/wpt/tests/interfaces/digital-credentials.idl @@ -33,4 +33,5 @@ dictionary DigitalCredentialCreateRequest { interface DigitalCredential : Credential { readonly attribute DOMString protocol; [SameObject] readonly attribute object data; + static boolean userAgentAllowsProtocol(DOMString protocol); }; diff --git a/tests/wpt/tests/interfaces/fedcm.idl b/tests/wpt/tests/interfaces/fedcm.idl index 5ce2d260f11..e4a2998f7c0 100644 --- a/tests/wpt/tests/interfaces/fedcm.idl +++ b/tests/wpt/tests/interfaces/fedcm.idl @@ -19,6 +19,18 @@ dictionary DisconnectedAccount { required USVString account_id; }; +dictionary IdentityCredentialErrorInit { + DOMString error; + DOMString url; +}; + +[Exposed=Window, SecureContext] +interface IdentityCredentialError : DOMException { + constructor(optional DOMString message = "", optional IdentityCredentialErrorInit options = {}); + readonly attribute DOMString error; + readonly attribute DOMString url; +}; + partial dictionary CredentialRequestOptions { IdentityCredentialRequestOptions identity; }; @@ -79,6 +91,7 @@ dictionary IdentityProviderAPIConfig { required USVString login_url; USVString disconnect_endpoint; IdentityProviderBranding branding; + boolean supports_use_other_account = false; USVString account_label; }; @@ -102,6 +115,7 @@ dictionary IdentityProviderAccountList { dictionary IdentityAssertionResponse { USVString token; USVString continue_on; + IdentityCredentialErrorInit error; }; dictionary IdentityProviderClientMetadata { @@ -122,6 +136,6 @@ dictionary IdentityResolveOptions { [Exposed=Window, SecureContext] interface IdentityProvider { static undefined close(); - static undefined resolve(DOMString token, optional IdentityResolveOptions options = {}); + static Promise resolve(DOMString token, optional IdentityResolveOptions options = {}); static Promise> getUserInfo(IdentityProviderConfig config); }; diff --git a/tests/wpt/tests/interfaces/interest-invokers.tentative.idl b/tests/wpt/tests/interfaces/interest-invokers.tentative.idl index fe164e23575..53838c1f802 100644 --- a/tests/wpt/tests/interfaces/interest-invokers.tentative.idl +++ b/tests/wpt/tests/interfaces/interest-invokers.tentative.idl @@ -1,5 +1,5 @@ interface mixin InterestInvokerElement { - [CEReactions,Reflect=interesttarget] attribute Element? interestTargetElement; + [CEReactions,Reflect=interestfor] attribute Element? interestForElement; }; HTMLAnchorElement includes InterestInvokerElement; diff --git a/tests/wpt/tests/interfaces/intervention-reporting.idl b/tests/wpt/tests/interfaces/intervention-reporting.idl index 3c3b8001e74..e1fabd8bf24 100644 --- a/tests/wpt/tests/interfaces/intervention-reporting.idl +++ b/tests/wpt/tests/interfaces/intervention-reporting.idl @@ -3,12 +3,10 @@ // (https://github.com/w3c/webref) // Source: Intervention Reporting (https://wicg.github.io/intervention-reporting/) -[Exposed=(Window,Worker)] -interface InterventionReportBody : ReportBody { - [Default] object toJSON(); - readonly attribute DOMString id; - readonly attribute DOMString message; - readonly attribute DOMString? sourceFile; - readonly attribute unsigned long? lineNumber; - readonly attribute unsigned long? columnNumber; +dictionary InterventionReportBody : ReportBody { + DOMString id; + DOMString message; + DOMString? sourceFile; + unsigned long? lineNumber; + unsigned long? columnNumber; }; diff --git a/tests/wpt/tests/interfaces/mediacapture-streams.idl b/tests/wpt/tests/interfaces/mediacapture-streams.idl index f6c8e2b82da..6000b0f2ae3 100644 --- a/tests/wpt/tests/interfaces/mediacapture-streams.idl +++ b/tests/wpt/tests/interfaces/mediacapture-streams.idl @@ -73,7 +73,7 @@ dictionary MediaTrackCapabilities { sequence resizeMode; ULongRange sampleRate; ULongRange sampleSize; - sequence echoCancellation; + sequence<(boolean or DOMString)> echoCancellation; sequence autoGainControl; sequence noiseSuppression; DoubleRange latency; @@ -96,7 +96,7 @@ dictionary MediaTrackConstraintSet { ConstrainDOMString resizeMode; ConstrainULong sampleRate; ConstrainULong sampleSize; - ConstrainBoolean echoCancellation; + ConstrainBooleanOrDOMString echoCancellation; ConstrainBoolean autoGainControl; ConstrainBoolean noiseSuppression; ConstrainDouble latency; @@ -115,7 +115,7 @@ dictionary MediaTrackSettings { DOMString resizeMode; unsigned long sampleRate; unsigned long sampleSize; - boolean echoCancellation; + (boolean or DOMString) echoCancellation; boolean autoGainControl; boolean noiseSuppression; double latency; @@ -137,6 +137,11 @@ enum VideoResizeModeEnum { "crop-and-scale" }; +enum EchoCancellationModeEnum { + "all", + "remote-only" +}; + [Exposed=Window] interface MediaStreamTrackEvent : Event { constructor(DOMString type, MediaStreamTrackEventInit eventInitDict); @@ -234,6 +239,11 @@ dictionary ConstrainDOMStringParameters { (DOMString or sequence) ideal; }; +dictionary ConstrainBooleanOrDOMStringParameters { + (boolean or DOMString) exact; + (boolean or DOMString) ideal; +}; + typedef ([Clamp] unsigned long or ConstrainULongRange) ConstrainULong; typedef (double or ConstrainDoubleRange) ConstrainDouble; @@ -244,6 +254,8 @@ typedef (DOMString or sequence or ConstrainDOMStringParameters) ConstrainDOMString; +typedef (boolean or DOMString or ConstrainBooleanOrDOMStringParameters) ConstrainBooleanOrDOMString; + dictionary CameraDevicePermissionDescriptor : PermissionDescriptor { boolean panTiltZoom = false; }; diff --git a/tests/wpt/tests/interfaces/permissions-policy.idl b/tests/wpt/tests/interfaces/permissions-policy.idl index b17304de8d0..46eb6914a34 100644 --- a/tests/wpt/tests/interfaces/permissions-policy.idl +++ b/tests/wpt/tests/interfaces/permissions-policy.idl @@ -19,14 +19,12 @@ partial interface HTMLIFrameElement { [SameObject] readonly attribute PermissionsPolicy permissionsPolicy; }; -[Exposed=Window] -interface PermissionsPolicyViolationReportBody : ReportBody { - [Default] object toJSON(); - readonly attribute DOMString featureId; - readonly attribute DOMString? sourceFile; - readonly attribute long? lineNumber; - readonly attribute long? columnNumber; - readonly attribute DOMString disposition; - readonly attribute DOMString? allowAttribute; - readonly attribute DOMString? srcAttribute; +dictionary PermissionsPolicyViolationReportBody : ReportBody { + DOMString featureId; + DOMString? sourceFile; + long? lineNumber; + long? columnNumber; + DOMString disposition; + DOMString? allowAttribute; + DOMString? srcAttribute; }; diff --git a/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl b/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl index 02a35798204..8fbd91dfd5b 100644 --- a/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl +++ b/tests/wpt/tests/interfaces/privacy-preserving-attribution.idl @@ -1,68 +1,69 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Privacy-Preserving Attribution: Level 1 (https://w3c.github.io/ppa/) +// Source: Attribution Level 1 (https://w3c.github.io/ppa/) partial interface Navigator { - [SecureContext, SameObject] readonly attribute PrivateAttribution privateAttribution; + [SecureContext, SameObject] readonly attribute Attribution attribution; }; -enum PrivateAttributionProtocol { "dap-12-histogram", "tee-00" }; +enum PrivateAttributionAggregationProtocol { "dap-12-histogram", "tee-00" }; -dictionary PrivateAttributionAggregationService { +dictionary AttributionAggregationService { required DOMString protocol; }; [SecureContext, Exposed=Window] -interface PrivateAttributionAggregationServices { - readonly maplike; +interface AttributionAggregationServices { + readonly maplike; }; [SecureContext, Exposed=Window] -interface PrivateAttribution { - readonly attribute PrivateAttributionAggregationServices aggregationServices; +interface Attribution { + readonly attribute AttributionAggregationServices aggregationServices; }; -dictionary PrivateAttributionImpressionOptions { +dictionary AttributionImpressionOptions { required unsigned long histogramIndex; unsigned long matchValue = 0; sequence conversionSites = []; + sequence conversionCallers = []; unsigned long lifetimeDays = 30; }; -dictionary PrivateAttributionImpressionResult { +dictionary AttributionImpressionResult { }; [SecureContext, Exposed=Window] -partial interface PrivateAttribution { - Promise saveImpression(PrivateAttributionImpressionOptions options); +partial interface Attribution { + Promise saveImpression(AttributionImpressionOptions options); }; -dictionary PrivateAttributionConversionOptions { +dictionary AttributionConversionOptions { required USVString aggregationService; double epsilon = 1.0; required unsigned long histogramSize; unsigned long lookbackDays; - sequence matchValue = []; + sequence matchValues = []; sequence impressionSites = []; - sequence intermediarySites = []; + sequence impressionCallers = []; - PrivateAttributionLogic logic = "last-touch"; + AttributionLogic logic = "last-touch"; unsigned long value = 1; unsigned long maxValue = 1; }; -enum PrivateAttributionLogic { +enum AttributionLogic { "last-touch", }; -dictionary PrivateAttributionConversionResult { +dictionary AttributionConversionResult { required Uint8Array report; }; [SecureContext, Exposed=Window] -partial interface PrivateAttribution { - Promise measureConversion(PrivateAttributionConversionOptions options); +partial interface Attribution { + Promise measureConversion(AttributionConversionOptions options); }; diff --git a/tests/wpt/tests/interfaces/reporting.idl b/tests/wpt/tests/interfaces/reporting.idl index c0a400a999e..4511e4dca60 100644 --- a/tests/wpt/tests/interfaces/reporting.idl +++ b/tests/wpt/tests/interfaces/reporting.idl @@ -3,17 +3,13 @@ // (https://github.com/w3c/webref) // Source: Reporting API (https://w3c.github.io/reporting/) -[Exposed=(Window,Worker)] -interface ReportBody { - [Default] object toJSON(); +dictionary ReportBody { }; -[Exposed=(Window,Worker)] -interface Report { - [Default] object toJSON(); - readonly attribute DOMString type; - readonly attribute DOMString url; - readonly attribute ReportBody? body; +dictionary Report { + DOMString type; + DOMString url; + ReportBody? body; }; [Exposed=(Window,Worker)] diff --git a/tests/wpt/tests/interfaces/secure-payment-confirmation.idl b/tests/wpt/tests/interfaces/secure-payment-confirmation.idl index c0cbc41e99c..3847651c1f3 100644 --- a/tests/wpt/tests/interfaces/secure-payment-confirmation.idl +++ b/tests/wpt/tests/interfaces/secure-payment-confirmation.idl @@ -83,6 +83,7 @@ dictionary PaymentCredentialInstrument { required USVString displayName; required USVString icon; boolean iconMustBeShown = true; + USVString details; }; dictionary PaymentEntityLogo { diff --git a/tests/wpt/tests/interfaces/speech-api.idl b/tests/wpt/tests/interfaces/speech-api.idl index 9620e60dc50..af24a12885e 100644 --- a/tests/wpt/tests/interfaces/speech-api.idl +++ b/tests/wpt/tests/interfaces/speech-api.idl @@ -8,6 +8,7 @@ interface SpeechRecognition : EventTarget { constructor(); // recognition parameters + attribute SpeechGrammarList grammars; attribute DOMString lang; attribute boolean continuous; attribute boolean interimResults; @@ -107,6 +108,25 @@ dictionary SpeechRecognitionEventInit : EventInit { required SpeechRecognitionResultList results; }; +// The object representing a speech grammar. This interface has been deprecated and exists in this spec for the sole purpose of maintaining backwards compatibility. +[Exposed=Window] +interface SpeechGrammar { + attribute DOMString src; + attribute float weight; +}; + +// The object representing a speech grammar collection. This interface has been deprecated and exists in this spec for the sole purpose of maintaining backwards compatibility. +[Exposed=Window] +interface SpeechGrammarList { + constructor(); + readonly attribute unsigned long length; + getter SpeechGrammar item(unsigned long index); + undefined addFromURI(DOMString src, + optional float weight = 1.0); + undefined addFromString(DOMString string, + optional float weight = 1.0); +}; + // The object representing a phrase for contextual biasing. [SecureContext, Exposed=Window] interface SpeechRecognitionPhrase { diff --git a/tests/wpt/tests/interfaces/sri.idl b/tests/wpt/tests/interfaces/sri.idl index 94ccb39f1ec..d179ca467d1 100644 --- a/tests/wpt/tests/interfaces/sri.idl +++ b/tests/wpt/tests/interfaces/sri.idl @@ -3,11 +3,9 @@ // (https://github.com/w3c/webref) // Source: Subresource Integrity (https://w3c.github.io/webappsec-subresource-integrity/) -[Exposed=Window] -interface IntegrityPolicyViolationReportBody : ReportBody { - [Default] object toJSON(); - readonly attribute USVString documentURL; - readonly attribute USVString blockedURL; - readonly attribute USVString destination; - readonly attribute boolean reportOnly; +dictionary IntegrityViolationReportBody : ReportBody { + USVString documentURL; + USVString blockedURL; + USVString destination; + boolean reportOnly; }; diff --git a/tests/wpt/tests/interfaces/webgpu.idl b/tests/wpt/tests/interfaces/webgpu.idl index 1fc896c6b16..28e7e5da96d 100644 --- a/tests/wpt/tests/interfaces/webgpu.idl +++ b/tests/wpt/tests/interfaces/webgpu.idl @@ -128,6 +128,7 @@ enum GPUFeatureName { "dual-source-blending", "subgroups", "texture-formats-tier1", + "texture-formats-tier2", }; [Exposed=(Window, Worker), SecureContext] diff --git a/tests/wpt/tests/largest-contentful-paint/background-image-set-image.html b/tests/wpt/tests/largest-contentful-paint/background-image-set-image.html index 4dbb97c7f5e..27a70c7b6f4 100644 --- a/tests/wpt/tests/largest-contentful-paint/background-image-set-image.html +++ b/tests/wpt/tests/largest-contentful-paint/background-image-set-image.html @@ -1,41 +1,42 @@ - - - - - Background image-set images should be LCP candidates - - - - - + +Background image-set images should be LCP candidates + + +

fallback

- - - \ No newline at end of file + diff --git a/tests/wpt/tests/lint.ignore b/tests/wpt/tests/lint.ignore index 597f692249f..3ed39f9c416 100644 --- a/tests/wpt/tests/lint.ignore +++ b/tests/wpt/tests/lint.ignore @@ -830,3 +830,6 @@ SET TIMEOUT: wasm/core/js/harness/testharness.js ASSERT_THROWS: wasm/core/js/harness/testharness.js GENERATE_TESTS: wasm/core/js/harness/testharness.js PROMISE_REJECTS: wasm/core/js/harness/testharness.js + +# Legitimate use of test_driver_internal +TEST DRIVER INTERNAL: resources/testdriver.js diff --git a/tests/wpt/tests/navigation-api/navigate-event/navigate-multiple-history-pushState.html b/tests/wpt/tests/navigation-api/navigate-event/navigate-multiple-history-pushState.html new file mode 100644 index 00000000000..bcf9267d73c --- /dev/null +++ b/tests/wpt/tests/navigation-api/navigate-event/navigate-multiple-history-pushState.html @@ -0,0 +1,37 @@ + + + + diff --git a/tests/wpt/tests/navigation-api/navigate-event/navigate-multiple-location.html b/tests/wpt/tests/navigation-api/navigate-event/navigate-multiple-location.html new file mode 100644 index 00000000000..54681205a5e --- /dev/null +++ b/tests/wpt/tests/navigation-api/navigate-event/navigate-multiple-location.html @@ -0,0 +1,38 @@ + + + +
+ diff --git a/tests/wpt/tests/navigation-api/navigation-methods/return-value/resources/helpers.js b/tests/wpt/tests/navigation-api/navigation-methods/return-value/resources/helpers.js index 63d706ed285..c1885650a05 100644 --- a/tests/wpt/tests/navigation-api/navigation-methods/return-value/resources/helpers.js +++ b/tests/wpt/tests/navigation-api/navigation-methods/return-value/resources/helpers.js @@ -87,11 +87,38 @@ window.assertCommittedFulfillsFinishedRejectsDOM = async (t, result, expectedEnt assert_equals(committedValue, expectedEntry); }; +// We cannot use Promise.all() because the automatic coercion behavior when +// promises from multiple realms are involved causes it to hang if one of the +// promises is from a detached iframe's realm. See discussion at +// https://github.com/whatwg/html/issues/11252#issuecomment-2984143855. +window.waitForAllLenient = (iterable) => { + const { promise: all, resolve, reject } = Promise.withResolvers(); + let remaining = 0; + let results = []; + for (const promise of iterable) { + let index = remaining++; + promise.then(v => { + results[index] = v; + --remaining; + if (!remaining) { + resolve(results); + } + return v; + }, v => reject(v)); + } + + if (!remaining) { + resolve(results); + } + + return all; +} + window.assertBothRejectExactly = async (t, result, expectedRejection, w = window) => { assertReturnValue(result, w); let committedReason, finishedReason; - await Promise.all([ + await waitForAllLenient([ result.committed.then( t.unreached_func("committed must not fulfill"), t.step_func(r => { committedReason = r; }) @@ -111,7 +138,7 @@ window.assertBothRejectDOM = async (t, result, expectedDOMExceptionCode, w = win // Don't use await here so that we can catch out-of-order settlements. let committedReason, finishedReason; - await Promise.all([ + await waitForAllLenient([ result.committed.then( t.unreached_func("committed must not fulfill"), t.step_func(r => { committedReason = r; }) diff --git a/tests/wpt/tests/permissions/edge-cases.https.html b/tests/wpt/tests/permissions/edge-cases.https.html new file mode 100644 index 00000000000..e2dbe0dce40 --- /dev/null +++ b/tests/wpt/tests/permissions/edge-cases.https.html @@ -0,0 +1,23 @@ + + +Permissions API - Test invalid permission name + + + + + + + + + diff --git a/tests/wpt/tests/permissions/event-model.https.html b/tests/wpt/tests/permissions/event-model.https.html new file mode 100644 index 00000000000..f59dfb62d70 --- /dev/null +++ b/tests/wpt/tests/permissions/event-model.https.html @@ -0,0 +1,115 @@ + + +Permissions API - Event Model Tests + + + + + + + + + diff --git a/tests/wpt/tests/permissions/revocation.https.html b/tests/wpt/tests/permissions/revocation.https.html new file mode 100644 index 00000000000..f86d6936373 --- /dev/null +++ b/tests/wpt/tests/permissions/revocation.https.html @@ -0,0 +1,59 @@ + + +Permissions API - Revocation Tests + + + + + + + + + diff --git a/tests/wpt/tests/permissions/worker.https.html b/tests/wpt/tests/permissions/worker.https.html new file mode 100644 index 00000000000..05b4e25c18d --- /dev/null +++ b/tests/wpt/tests/permissions/worker.https.html @@ -0,0 +1,59 @@ + + +Permissions API in Worker + + + + + + + diff --git a/tests/wpt/tests/pointerevents/compat/pointerevent_mouse_target_after_pointer_target_host_of_shadow_removed.html b/tests/wpt/tests/pointerevents/compat/pointerevent_mouse_target_after_pointer_target_host_of_shadow_removed.html new file mode 100644 index 00000000000..719bc79150b --- /dev/null +++ b/tests/wpt/tests/pointerevents/compat/pointerevent_mouse_target_after_pointer_target_host_of_shadow_removed.html @@ -0,0 +1,91 @@ + + + + + +Retarget source mouse event target to host parent if the target shadow of preceding pointer event is removed + + + + + + + +
Initial Position
+
+ + diff --git a/tests/wpt/tests/pointerevents/compat/pointerevent_mouse_target_after_pointer_target_root_element_in_shadow_removed.html b/tests/wpt/tests/pointerevents/compat/pointerevent_mouse_target_after_pointer_target_root_element_in_shadow_removed.html new file mode 100644 index 00000000000..9d4a5fa1fe6 --- /dev/null +++ b/tests/wpt/tests/pointerevents/compat/pointerevent_mouse_target_after_pointer_target_root_element_in_shadow_removed.html @@ -0,0 +1,91 @@ + + + + + +Retarget source mouse event target to host if the root element in the target shadow of preceding pointer event is removed + + + + + + + +
Initial Position
+
+ + diff --git a/tests/wpt/tests/pointerevents/compat/pointerevent_mouse_target_after_pointer_target_slot_removed.html b/tests/wpt/tests/pointerevents/compat/pointerevent_mouse_target_after_pointer_target_slot_removed.html new file mode 100644 index 00000000000..b87f4d27009 --- /dev/null +++ b/tests/wpt/tests/pointerevents/compat/pointerevent_mouse_target_after_pointer_target_slot_removed.html @@ -0,0 +1,110 @@ + + + + + +Retarget source mouse event target to slot parent if the target slot of preceding pointer event is removed + + + + + + + + + + +
Initial Position
+
+ + diff --git a/tests/wpt/tests/resource-timing/resources/display_paragraph.js b/tests/wpt/tests/resource-timing/resources/display_paragraph.js new file mode 100644 index 00000000000..cf02bea7677 --- /dev/null +++ b/tests/wpt/tests/resource-timing/resources/display_paragraph.js @@ -0,0 +1,5 @@ +function display_paragraph() { + const paragraph = document.createElement('p'); + paragraph.textContent = "Please display me."; + document.body.appendChild(paragraph); +} diff --git a/tests/wpt/tests/resource-timing/resources/test-initiator.js b/tests/wpt/tests/resource-timing/resources/test-initiator.js index e4b367f8a0c..7c354243260 100644 --- a/tests/wpt/tests/resource-timing/resources/test-initiator.js +++ b/tests/wpt/tests/resource-timing/resources/test-initiator.js @@ -5,9 +5,12 @@ function testResourceInitiatorUrl(resourceName, expectedUrl) { for (const entry of entries) { if (entry.name.endsWith(resourceName)) { observer.disconnect(); - assert_equals(entry.initiatorUrl, expectedUrl, `Test ${resourceName} initiatorUrl`); - resolve(); - return; + try { + assert_equals(entry.initiatorUrl, expectedUrl, `Test ${resourceName} initiatorUrl`); + resolve(); + } catch(error) { + reject(error); + } } } reject(resourceName + " not found"); diff --git a/tests/wpt/tests/resource-timing/tentative/document-initiated.html b/tests/wpt/tests/resource-timing/tentative/document-initiated.html index bbbd3afc9a5..2f7abbffca2 100644 --- a/tests/wpt/tests/resource-timing/tentative/document-initiated.html +++ b/tests/wpt/tests/resource-timing/tentative/document-initiated.html @@ -8,7 +8,7 @@ - + @@ -17,6 +17,7 @@ + @@ -39,6 +41,7 @@ + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-disarmed-by-apis.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-disarmed-by-apis.tentative.html new file mode 100644 index 00000000000..3fe7f5c6fb4 --- /dev/null +++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-disarmed-by-apis.tentative.html @@ -0,0 +1,147 @@ + + + + + + + + + + + + +
+
+
+
+
+
+
+
+ + + diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html index 6914cb09b89..e15adf4346a 100644 --- a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html +++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-animations.tentative.html @@ -70,7 +70,7 @@ const view_timeline = new ViewTimeline({ subject: subject }); function setupAnimationTrigger() { const trigger = new AnimationTrigger({ - type: "alternate", + behavior: "alternate", timeline: view_timeline, rangeStart: `${TRIGGER_START_PX}px`, rangeEnd: `${TRIGGER_END_PX}px` @@ -129,4 +129,4 @@ }, "Single trigger controls multiple animations"); - \ No newline at end of file + diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html index 5fccdf27550..8c17dceba44 100644 --- a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html +++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-multiple-triggers.tentative.html @@ -78,7 +78,7 @@ } function setupAnimationTrigger(view_timeline) { const trigger = new AnimationTrigger({ - type: "repeat", + behavior: "repeat", timeline: view_timeline, rangeStart: `${TRIGGER_START_PX}px`, rangeEnd: `${TRIGGER_END_PX}px` diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-range-px-roundtrip.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-range-px-roundtrip.tentative.html new file mode 100644 index 00000000000..966ac6cc3aa --- /dev/null +++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-range-px-roundtrip.tentative.html @@ -0,0 +1,29 @@ + + + + + + + + +
+ + + diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-repeat.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-repeat.tentative.html index 6c01e762e5a..36ca98f08a4 100644 --- a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-repeat.tentative.html +++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-repeat.tentative.html @@ -21,7 +21,7 @@ } .target { animation: myAnim linear 0.5s both; - animation-trigger-type: repeat; + animation-trigger-behavior: repeat; animation-trigger-range: 250px 300px; animation-trigger-exit-range: 200px 350px; } diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-timeline-subject-removed.tentative.html b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-timeline-subject-removed.tentative.html new file mode 100644 index 00000000000..a8ff4d066af --- /dev/null +++ b/tests/wpt/tests/scroll-animations/animation-trigger/animation-trigger-timeline-subject-removed.tentative.html @@ -0,0 +1,122 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/tests/wpt/tests/scroll-animations/animation-trigger/support/support.js b/tests/wpt/tests/scroll-animations/animation-trigger/support/support.js index f5aa18e82f1..82f89bc3d7e 100644 --- a/tests/wpt/tests/scroll-animations/animation-trigger/support/support.js +++ b/tests/wpt/tests/scroll-animations/animation-trigger/support/support.js @@ -84,3 +84,46 @@ async function testAnimationTrigger(test, scroll_fn, target, await scroll_fn(); await Promise.all(evt_promises); } + +function computeContainOffset(scroller, subject, pct) { + const contain_start = subject.offsetTop + subject.offsetHeight + - scroller.offsetTop - scroller.clientHeight; + const contain_end = subject.offsetTop - scroller.offsetTop; + + return contain_start + (pct / 100) * (contain_end - contain_start); +} + +function setupAnimationAndTrigger(target, subject, duration) { + const animation = new Animation( + new KeyframeEffect( + target, + [ + { transform: "scale(1)", backgroundColor: "yellow" }, + { transform: "scale(2)", backgroundColor: "yellow" }, + ], + { duration: duration, fill: "both" } + )); + + let trigger = new AnimationTrigger({ + behavior: "alternate", + timeline: new ViewTimeline({ subject: subject, axis: "y" }), + rangeStart: "contain 0%", + rangeEnd: "contain 100%" + }); + + trigger.addAnimation(animation); +} + +async function waitForAnimation(targetCurrentTime, animation) { + return new Promise(resolve => { + function waitForCurrentTime() { + if ((targetCurrentTime - animation.currentTime) * animation.playbackRate <= 0) { + resolve(); + return; + } + + requestAnimationFrame(waitForCurrentTime); + } + waitForCurrentTime(); + }); +} diff --git a/tests/wpt/tests/selection/move-by-word-korean.html b/tests/wpt/tests/selection/move-by-word-korean.html new file mode 100644 index 00000000000..1368fc906f0 --- /dev/null +++ b/tests/wpt/tests/selection/move-by-word-korean.html @@ -0,0 +1,52 @@ + + +Korean/Latin transition is treated as a word boundary + + + + + + + + + + + +
희진DJ
+ + + diff --git a/tests/wpt/tests/shadow-dom/reference-target/tentative/interesttarget.tentative.html b/tests/wpt/tests/shadow-dom/reference-target/tentative/interestfor.tentative.html similarity index 66% rename from tests/wpt/tests/shadow-dom/reference-target/tentative/interesttarget.tentative.html rename to tests/wpt/tests/shadow-dom/reference-target/tentative/interestfor.tentative.html index e8d7c814d86..da983ace612 100644 --- a/tests/wpt/tests/shadow-dom/reference-target/tentative/interesttarget.tentative.html +++ b/tests/wpt/tests/shadow-dom/reference-target/tentative/interestfor.tentative.html @@ -8,23 +8,23 @@ - + - + - + diff --git a/tests/wpt/tests/shadow-dom/reference-target/tentative/resources/property-reflection-helper.js b/tests/wpt/tests/shadow-dom/reference-target/tentative/resources/property-reflection-helper.js index 88b7f743831..46daa4e10be 100644 --- a/tests/wpt/tests/shadow-dom/reference-target/tentative/resources/property-reflection-helper.js +++ b/tests/wpt/tests/shadow-dom/reference-target/tentative/resources/property-reflection-helper.js @@ -139,7 +139,7 @@ function run_test_for_all_reflecting_properties(setup_function, test_function, t test_function(setup_function, test_name_suffix, referencing_element_type, referenced_element_type, "anchor", "anchorElement", Behavior.ReflectsHost); test_function(setup_function, test_name_suffix, referencing_element_type, referenced_element_type, "commandfor", "commandForElement", Behavior.ReflectsHost); test_function(setup_function, test_name_suffix, referencing_element_type, referenced_element_type, "popovertarget", "popoverTargetElement", Behavior.ReflectsHost); - test_function(setup_function, test_name_suffix, referencing_element_type, referenced_element_type, "interesttarget", "interestTargetElement", Behavior.ReflectsHost); + test_function(setup_function, test_name_suffix, referencing_element_type, referenced_element_type, "interestfor", "interestForElement", Behavior.ReflectsHost); const expected_htmlFor_property_behavior = (referencing_element_type == "output") ? Behavior.ReflectsHostIDInDOMTokenList : Behavior.ReflectsHostID; test_function(setup_function, test_name_suffix, referencing_element_type, referenced_element_type, "for", "htmlFor", expected_htmlFor_property_behavior); @@ -160,4 +160,4 @@ function run_test_for_all_reflecting_properties(setup_function, test_function, t test_function(setup_function, test_name_suffix, referencing_element_type, referenced_element_type, "for", "control", expected_control_property_behavior); } } -} \ No newline at end of file +} diff --git a/tests/wpt/tests/soft-navigation-heuristics/back.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/back.tentative.html index 01dae7baab6..09ff178380e 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/back.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/back.tentative.html @@ -10,26 +10,19 @@ + Click me!
-
- Click me! -
diff --git a/tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html index ee9d1e12335..afd3e9efff0 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/click-event-bubbles.tentative.html @@ -10,19 +10,16 @@
- Click me! + Click me!
diff --git a/tests/wpt/tests/soft-navigation-heuristics/dropped-entries.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/dropped-entries.tentative.html index d27ad452be0..76a5cffa9da 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/dropped-entries.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/dropped-entries.tentative.html @@ -11,32 +11,19 @@ -
Click me! +
diff --git a/tests/wpt/tests/soft-navigation-heuristics/first-interaction-not-softnav.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/first-interaction-not-softnav.tentative.html index 2c9e2aa7c01..27ba7df53cb 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/first-interaction-not-softnav.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/first-interaction-not-softnav.tentative.html @@ -14,23 +14,19 @@

Then click me!

diff --git a/tests/wpt/tests/soft-navigation-heuristics/hash.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/hash.tentative.html index 3a8419c71da..bb78d66f67a 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/hash.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/hash.tentative.html @@ -10,20 +10,14 @@ + Click me!
-
- Click me! -
- \ No newline at end of file + diff --git a/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-image-softnav-lcp.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-image-softnav-lcp.tentative.html index 7a2018d20ee..b14a46dfbfb 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-image-softnav-lcp.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-image-softnav-lcp.tentative.html @@ -10,23 +10,16 @@ + Click me!
-
- -
+
- diff --git a/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-text-softnav-lcp.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-text-softnav-lcp.tentative.html index 501d1c5fb6f..50234fe9f4f 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-text-softnav-lcp.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-text-softnav-lcp.tentative.html @@ -10,22 +10,18 @@ + Click me!
- +
- - diff --git a/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-two-image-softnavs-lcp.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-two-image-softnavs-lcp.tentative.html index 4a394649c52..59ebbe34508 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-two-image-softnavs-lcp.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/image-lcp-followed-by-two-image-softnavs-lcp.tentative.html @@ -10,64 +10,18 @@ + Click me!
-
- -
+
- - diff --git a/tests/wpt/tests/soft-navigation-heuristics/lcp/tentative/background-image-set-image.html b/tests/wpt/tests/soft-navigation-heuristics/lcp/tentative/background-image-set-image.html index a99ba5bdd78..78a41dbc776 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/lcp/tentative/background-image-set-image.html +++ b/tests/wpt/tests/soft-navigation-heuristics/lcp/tentative/background-image-set-image.html @@ -34,7 +34,7 @@ Notes: - - - - - - - -
Click!
- - diff --git a/tests/wpt/tests/soft-navigation-heuristics/lcp/tentative/cross-origin-image.sub.html b/tests/wpt/tests/soft-navigation-heuristics/lcp/tentative/cross-origin-image.sub.html index 78886e7b4dc..777dcf70640 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/lcp/tentative/cross-origin-image.sub.html +++ b/tests/wpt/tests/soft-navigation-heuristics/lcp/tentative/cross-origin-image.sub.html @@ -17,7 +17,7 @@ - + - + + + + + + + + + diff --git a/tests/wpt/tests/soft-navigation-heuristics/load-classic-script-history-push.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/load-classic-script-history-push.tentative.html index 4e375b2164d..7c2ffa1f6c1 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/load-classic-script-history-push.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/load-classic-script-history-push.tentative.html @@ -10,22 +10,18 @@ -
Click me! +
diff --git a/tests/wpt/tests/soft-navigation-heuristics/load-module-script-history-push.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/load-module-script-history-push.tentative.html index e82cd13f4a5..c298a968a24 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/load-module-script-history-push.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/load-module-script-history-push.tentative.html @@ -10,23 +10,19 @@ -
Click me! +
diff --git a/tests/wpt/tests/soft-navigation-heuristics/multiple-nested-events.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/multiple-nested-events.tentative.html index e51841865d6..14f4ba42c3f 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/multiple-nested-events.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/multiple-nested-events.tentative.html @@ -9,32 +9,26 @@ -
Click me! -
- - diff --git a/tests/wpt/tests/soft-navigation-heuristics/multiple-paint-entries-buffered.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/multiple-paint-entries-buffered.tentative.html index dbb945a0a81..86a4f4400d4 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/multiple-paint-entries-buffered.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/multiple-paint-entries-buffered.tentative.html @@ -11,33 +11,20 @@ -
Click me! +
- - - diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigate-child.html b/tests/wpt/tests/soft-navigation-heuristics/navigate-child.html index e3c17e2dbaa..24cbf4d57fa 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigate-child.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigate-child.html @@ -14,17 +14,25 @@ Click me!
diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-back.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-back.tentative.html index cb96d9caf95..37dc8328afd 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-back.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-back.tentative.html @@ -10,11 +10,8 @@ -
-
- Click me! -
-
+ Click me! +
- diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-forward.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-forward.tentative.html index f483ad376b6..c371b9f6c68 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-forward.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-forward.tentative.html @@ -10,10 +10,8 @@ + Click me!
-
- Click me! -
- - diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html index e20578ea79e..bde93b22aab 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-hash.tentative.html @@ -18,11 +18,9 @@ testNavigationApi("Test soft navigation with the Navigation API", e => { e.intercept({handler: async () => { await addImageToMain(); - main.appendChild(img); }}); timestamps[counter]["eventEnd"] = performance.now(); }, link); - diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-traverseto.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-traverseto.tentative.html index e4cabb095aa..5077d2b6130 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-traverseto.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-traverseto.tentative.html @@ -10,10 +10,8 @@ + Click me!
-
- Click me! -
- - - diff --git a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html index 4d88f3d0b7d..97070271c38 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/navigation-api-view-transition.tentative.html @@ -51,4 +51,3 @@ - diff --git a/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html index a460b922eb7..799082bd399 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/popstate-multiple-backs.tentative.html @@ -10,10 +10,8 @@ + Click me!
-
- Click me! -
diff --git a/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html index f89991d76b0..9a4b6ab6735 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/popstate.tentative.html @@ -10,10 +10,8 @@ + Click me!
-
- Click me! -
- - - - diff --git a/tests/wpt/tests/soft-navigation-heuristics/replacestate-null-then-push.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/replacestate-null-then-push.tentative.html index 8a81c6be202..8a7b967853b 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/replacestate-null-then-push.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/replacestate-null-then-push.tentative.html @@ -15,20 +15,14 @@ Click me!
- - diff --git a/tests/wpt/tests/soft-navigation-heuristics/resources/history_push.js b/tests/wpt/tests/soft-navigation-heuristics/resources/history_push.js index 6647dd740a2..6b725eb2131 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/resources/history_push.js +++ b/tests/wpt/tests/soft-navigation-heuristics/resources/history_push.js @@ -1 +1 @@ -history.pushState({}, '', URL); +history.pushState({}, '', DEFAULTURL); diff --git a/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js b/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js index 9ee79d36f76..666040833a2 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js +++ b/tests/wpt/tests/soft-navigation-heuristics/resources/soft-navigation-helper.js @@ -1,14 +1,99 @@ var counter = 0; -var interacted; var timestamps = []; -const MAX_CLICKS = 50; -const URL = 'foobar.html'; -const readValue = (value, defaultValue) => { - return value !== undefined ? value : defaultValue; + +const SOFT_NAV_ENTRY_BUFFER_LIMIT = 50; +// this is used by injected scripts +const DEFAULTURL = 'foobar.html'; +const DEFAULTIMG = '/soft-navigation-heuristics/resources/images/lcp-256x256-alt-1.png'; + +/** + * Common Utils not related to these tests. + * TODO: Could be moved out? + */ + +// Helper method for use with history.back(), when we want to be +// sure that its asynchronous effect has completed. +async function waitForUrlToEndWith(url) { + return new Promise((resolve, reject) => { + window.addEventListener('popstate', () => { + if (location.href.endsWith(url)) { + resolve(); + } else { + reject( + 'Got ' + location.href + ' - expected URL ends with "' + url + '"'); + } + }, { once: true }); + }); }; -const withTimeoutMessage = - async (t, promise, message, timeout = 1000) => { +function getNextEntry(type) { + return new Promise(resolve => { + new PerformanceObserver((list, observer) => { + const entries = list.getEntries(); + observer.disconnect(); + assert_equals(entries.length, 1, 'Only one entry.'); + resolve(entries[0]); + }).observe({ type, includeSoftNavigationObservations: true }); + }); +} + +function getBufferedEntries(type) { + return new Promise((resolve, reject) => { + new PerformanceObserver((list, observer, options) => { + if (options.droppedEntriesCount) { + reject(options.droppedEntriesCount); + } + resolve(list.getEntries()); + observer.disconnect(); + }).observe({ type, buffered: true, includeSoftNavigationObservations: true }); + }); +} + +/** + * Helpers somewhat specific to these test types, "exported" and used by tests. + */ + +async function addImageToMain(url = DEFAULTIMG, id = 'imagelcp') { + const main = document.getElementById('main'); + const img = new Image(); + img.src = url + '?' + Math.random(); + img.id = id; + img.setAttribute('elementtiming', id); + main.appendChild(img); + return img; +} + +function addTextParagraphToMain(text, element_timing = '') { + const main = document.getElementById('main'); + const p = document.createElement('p'); + const textNode = document.createTextNode(text); + p.setAttribute('elementtiming', element_timing); + p.style = 'font-size: 3em'; + p.appendChild(textNode); + main.appendChild(p); + return p; +} + +function addTextToDivOnMain() { + const main = document.getElementById('main'); + const prevDiv = document.getElementsByTagName('div')[0]; + if (prevDiv) { + main.removeChild(prevDiv); + } + const div = document.createElement('div'); + const text = document.createTextNode('Lorem Ipsum'); + div.style = 'font-size: 3em'; + div.appendChild(text); + main.appendChild(div); + return div; +} + + +/** + * Internal Helpers + */ + +async function _withTimeoutMessage(t, promise, message, timeout = 1000) { return Promise.race([ promise, new Promise((resolve, reject) => { @@ -19,319 +104,283 @@ const withTimeoutMessage = ]); } -// Helper method for use with history.back(), when we want to be -// sure that its asynchronous effect has completed. -const waitForUrlToEndWith = async (url) => { - return new Promise((resolve, reject) => { - window.addEventListener('popstate', () => { - if (location.href.endsWith(url)) { - resolve(); - } else { - reject( - 'Got ' + location.href + ' - expected URL ends with "' + url + '"'); - } - }, {once: true}); +function _maybeAddUrlCleanupForTesting(t, numClicks) { + // TODO: any way to early-exit if we are running headless? + if (numClicks > 50) return; + t.add_cleanup(async () => { + // Go back to the original URL + for (let i = 0; i < numClicks; i++) { + history.back(); + await new Promise(resolve => { + addEventListener('popstate', resolve, { once: true }); + }); + } }); -}; +} -const testSoftNavigation = options => { - const addContent = options.addContent; - const link = options.link; - const pushState = - readValue(options.pushState, url => {history.pushState({}, '', url)}); - const clicks = readValue(options.clicks, 1); - const extraValidations = readValue(options.extraValidations, () => {}); + +/** + * Test body and validations + */ + +function testSoftNavigation(options) { const testName = options.testName; - const pushUrl = readValue(options.pushUrl, URL); - const eventType = readValue(options.eventType, 'click'); - const interactionFunc = options.interactionFunc; - const eventPrepWork = options.eventPrepWork; - const preTestWork = options.preTestWork; + if (!testName) throw new Error("testName is a required option."); + promise_test(async t => { - if (preTestWork) { - await preTestWork(); - } - await withTimeoutMessage( - t, waitInitialLCP(), 'Timed out waiting for initial LCP'); - const preClickLcp = await withTimeoutMessage( - t, getLcpEntries(), 'Timed out waiting for LCP entries'); - setEvent(t, link, pushState, addContent, pushUrl, eventType, eventPrepWork); - let first_navigation_id; - for (let i = 0; i < clicks; ++i) { - const firstClick = (i === 0); - let paint_entries_promise = waitOnPaintEntriesPromise(firstClick); - interacted = false; - const soft_nav_promise = waitOnSoftNav(); - interact(link, interactionFunc); - - const navigation_id = await withTimeoutMessage( - t, soft_nav_promise, 'Timed out waiting for soft navigation', 3000); - if (!first_navigation_id) { - first_navigation_id = navigation_id; - } - // Ensure paint timing entries are fired before moving on to the next - // click. - await withTimeoutMessage( - t, paint_entries_promise, 'Timed out waiting for paint entries'); - } - assert_equals( - document.softNavigations, clicks, - 'Soft Navigations detected are the same as the number of clicks'); - await withTimeoutMessage( - t, validateSoftNavigationEntry(clicks, extraValidations, pushUrl), - 'Timed out waiting for soft navigation entry validation'); - - await withTimeoutMessage( - t, - runEntryValidations( - preClickLcp, first_navigation_id, clicks + 1, options.validate), - 'Timed out waiting for entry validations'); - }, testName); -}; - -const testNavigationApi = (testName, navigateEventHandler, link) => { - promise_test(async t => { - navigation.addEventListener('navigate', navigateEventHandler); - const navigated = new Promise(resolve => { - navigation.addEventListener('navigatesuccess', resolve); - navigation.addEventListener('navigateerror', resolve); - }); - await waitInitialLCP(); - const preClickLcp = await getLcpEntries(); - let paint_entries_promise = waitOnPaintEntriesPromise(); - const soft_nav_promise = waitOnSoftNav(); - interact(link); - const first_navigation_id = await soft_nav_promise; - await navigated; - await paint_entries_promise; - assert_equals(document.softNavigations, 1, 'Soft Navigation detected'); - await validateSoftNavigationEntry(1, () => {}, 'foobar.html'); - - await runEntryValidations(preClickLcp, first_navigation_id); - }, testName); -}; - -const runEntryValidations = async ( - preClickLcp, first_navigation_id, entries_expected_number = 2, - validate = null) => { - const postClickLcp = await getLcpEntries(); - const postClickLcpWithoutSoftNavs = await getLcpEntriesWithoutSoftNavs(); - assert_greater_than( - postClickLcp.length, preClickLcp.length, - 'Soft navigation should have triggered at least an LCP entry'); - - if (validate) { - await validate(); - } - assert_equals( - postClickLcpWithoutSoftNavs.length, preClickLcp.length, - 'Soft navigation should not have triggered an LCP entry when the ' + - 'observer did not opt in'); - assert_not_equals( - postClickLcp[postClickLcp.length - 1].size, - preClickLcp[preClickLcp.length - 1].size, - 'Soft navigation LCP element should not have identical size to the hard ' + - 'navigation LCP element'); - assert_equals( - postClickLcp[preClickLcp.length].navigationId, first_navigation_id, - 'Soft navigation LCP should have the same navigation ' + - 'ID as the last soft nav entry'); -}; - -const interact = - (link, interactionFunc = undefined) => { - if (test_driver) { - if (interactionFunc) { - interactionFunc(); - } else { - test_driver.click(link); - } - timestamps[counter] = {'syncPostInteraction': performance.now()}; - } - } - -const setEvent = - (t, button, pushState, addContent, pushUrl, eventType, prepWork) => { - const eventObject = - (eventType == 'click' || eventType.startsWith('key')) ? button : - window; - eventObject.addEventListener(eventType, async e => { - let prepWorkFailed = false; - if (prepWork && !prepWork(t)) { - prepWorkFailed = true; - } - // This is the end of the event's sync processing. - if (!timestamps[counter]['eventEnd']) { - timestamps[counter]['eventEnd'] = performance.now(); - } - if (prepWorkFailed) { - return; - } - // Jump through a task, to ensure task tracking is working properly. + const { + clickTarget = document.getElementById("link"), + eventListenerCb = () => { }, + interactionFunc = () => { if (test_driver) test_driver.click(clickTarget); }, + registerInteractionEvent = (cb) => clickTarget.addEventListener('click', cb), + registerRouteChange = (cb) => registerInteractionEvent(async (event) => { + // The default route change handler is ClickEvent + Yield, in order to: + // - mark timeOrigin. + // - ensure task tracking is working properly. await new Promise(r => t.step_timeout(r, 0)); + cb(event); + }), + numClicks = 1, - const url = URL + '?' + counter; - if (pushState) { - // Change the URL; pushState may be asynchronous, e.g. to deal - // with history.back()'s asynchronous effect. - if (pushUrl) { - await pushState(url); - } else { - await pushState(); - } - } - + addContent = () => addTextParagraphToMain(), + clearContent = () => { }, + pushState = url => { history.pushState({}, '', url); }, + pushUrl = DEFAULTURL, + dontExpectSoftNavs = false, + onRouteChange = async (event) => { + await pushState(`${pushUrl}?${counter}`); // Wait 10 ms to make sure the timestamps are correct. await new Promise(r => t.step_timeout(r, 10)); + await clearContent(); + await addContent(); + }, - await addContent(url); + extraSetup = () => { }, + extraValidations = () => { }, + } = options; - interacted = true; - ++counter; - }); - }; + _maybeAddUrlCleanupForTesting(t); -const validateSoftNavigationEntry = - async (clicks, extraValidations, pushUrl) => { - const [entries, options] = await new Promise(resolve => { - new PerformanceObserver((list, obs, options) => { - resolve([list.getEntries(), options]); - }).observe({type: 'soft-navigation', buffered: true}); - }); - const expectedClicks = Math.min(clicks, MAX_CLICKS); + await extraSetup(t); - assert_equals( - entries.length, expectedClicks, 'Performance observer got an entry'); - for (let i = 0; i < entries.length; ++i) { - const entry = entries[i]; - assert_true( - entry.name.includes(pushUrl ? pushUrl : document.location.href), - 'The soft navigation name is properly set'); - const entryTimestamp = entry.startTime; - assert_less_than_equal( - timestamps[i]['syncPostInteraction'], entryTimestamp, - 'Entry timestamp is lower than the post interaction one'); - assert_greater_than_equal( - entryTimestamp, timestamps[i]['eventEnd'], - 'Event start timestamp matches'); - assert_not_equals( - entry.navigationId, - performance.getEntriesByType('navigation')[0].navigationId, - 'The navigation ID was re-generated and different from the initial one.'); - if (i > 0) { - assert_not_equals( - entry.navigationId, entries[i - 1].navigationId, - 'The navigation ID was re-generated between clicks'); - } - } - assert_equals( - performance.getEntriesByType('soft-navigation').length, expectedClicks, - 'Performance timeline got an entry'); - await extraValidations(entries, options); -}; + // Allow things to settle before starting the test. Specifically, + // wait for final LCP candidate to arrive. + // TODO: Make this explicitly wait by marking the candidate, or just making + // the image `blocking=rendering`? + await new Promise((r) => { + requestAnimationFrame(() => { + t.step_timeout(r, 1000); + }) + }) -const waitInitialLCP = - () => { - return new Promise(resolve => { - new PerformanceObserver(resolve).observe( - {type: 'largest-contentful-paint', buffered: true}); - }); - } + const lcps_before = await _withTimeoutMessage(t, + getBufferedEntries('largest-contentful-paint'), + 'Timed out waiting for LCP entries'); -const waitOnSoftNav = () => { - return new Promise(resolve => { - new PerformanceObserver(list => { - const entries = list.getEntries(); - assert_equals(entries.length, 1, 'Only one soft navigation entry'); - resolve(entries[0].navigationId); - }).observe({type: 'soft-navigation'}); - }); -}; + // This "click event" starts the user interaction. + registerInteractionEvent(async event => { + eventListenerCb(event); -const getLcpEntries = async () => { - const entries = await new Promise(resolve => { - new PerformanceObserver(list => { - resolve(list.getEntries()); - }).observe({ - type: 'largest-contentful-paint', - buffered: true, - includeSoftNavigationObservations: true + // Event listener is no-op and yields immediately. Mark its sync end time: + // TODO: This is very brittle, as some tests "customize" it. + if (!timestamps[counter]['eventEnd']) { + timestamps[counter]['eventEnd'] = performance.now(); + } }); - }); - return entries; -}; -const getLcpEntriesWithoutSoftNavs = async () => { - const entries = await new Promise(resolve => { - new PerformanceObserver(list => { - resolve(list.getEntries()); - }).observe({type: 'largest-contentful-paint', buffered: true}); - }); - return entries; -}; + // This "route event" starts the UI/URL changes. Often also the event. + registerRouteChange(async event => { + await onRouteChange(event); + ++counter; + }); -const addImage = async (element, url = 'blue.png', id = 'imagelcp') => { - const img = new Image(); - img.src = '/images/' + url + '?' + Math.random(); - img.id = id; - img.setAttribute('elementtiming', id); - await img.decode(); - element.appendChild(img); -}; -const addImageToMain = async (url = 'blue.png', id = 'imagelcp') => { - await addImage(document.getElementById('main'), url, id); -}; + const softNavEntries = []; + const icps = []; + for (let i = 0; i < numClicks; ++i) { + // Use getNextEntry instead of getBufferedEntries so that: + // - For tests with more than 1 click, we wait for all expectations + // to arrive between clicks + // - For tests with more than buffer-limit clicks, we actually measure. + const soft_nav_promise = getNextEntry('soft-navigation'); + const icp_promise = getNextEntry('interaction-contentful-paint'); -const addTextParagraphToMain = (text, element_timing = '') => { - const main = document.getElementById('main'); - const p = document.createElement('p'); - const textNode = document.createTextNode(text); - p.appendChild(textNode); - if (element_timing) { - p.setAttribute('elementtiming', element_timing); - } - p.style = 'font-size: 3em'; - main.appendChild(p); - return p; -}; -const addTextToDivOnMain = () => { - const main = document.getElementById('main'); - const prevDiv = document.getElementsByTagName('div')[0]; - if (prevDiv) { - main.removeChild(prevDiv); - } - const div = document.createElement('div'); - const text = document.createTextNode('Lorem Ipsum'); - div.appendChild(text); - div.style = 'font-size: 3em'; - main.appendChild(div); -}; + await interactionFunc(); + timestamps[counter] = { 'syncPostInteraction': performance.now() }; -const waitOnPaintEntriesPromise = (expectLCP = true) => { - return new Promise((resolve, reject) => { - if (performance.softNavPaintMetricsSupported) { - const paint_entries = []; - new PerformanceObserver(list => { - paint_entries.push(...list.getEntries()); - if (paint_entries.length == 2) { - resolve(); - } else if (paint_entries.length > 2) { - reject(); - } - }).observe({type: 'paint', includeSoftNavigationObservations: true}); - } else if (expectLCP) { - new PerformanceObserver(list => { - resolve(); - }).observe({ - type: 'largest-contentful-paint', - includeSoftNavigationObservations: true - }); - } else { - step_timeout(() => { - requestAnimationFrame(() => { - requestAnimationFrame(resolve); - }); - }, 100); + // TODO: is it possible to still await these entries, but change to + // expect a timeout without resolution, to actually expect non arrives? + if (dontExpectSoftNavs) continue; + + softNavEntries.push(await _withTimeoutMessage(t, + soft_nav_promise, 'Timed out waiting for soft navigation', 3000)); + + icps.push(await _withTimeoutMessage(t, + icp_promise, 'Timed out waiting for icp', 3000)); } + + const lcps_after = await getBufferedEntries('largest-contentful-paint'); + + const expectedNumberOfSoftNavs = (dontExpectSoftNavs) ? 0 : numClicks; + + await _withTimeoutMessage(t, + validateSoftNavigationEntries(t, softNavEntries, expectedNumberOfSoftNavs, pushUrl), + 'Timed out waiting for soft navigation entry validation'); + + await _withTimeoutMessage(t, + validateIcpEntries(t, softNavEntries, lcps_before, icps, lcps_after), + 'Timed out waiting for ICP entry validations'); + + await _withTimeoutMessage(t, + extraValidations(t, softNavEntries, lcps_before, icps), + 'Timed out waiting for extra validations'); + }, testName); +} + +// TODO: Find a way to remove the need for this +function testNavigationApi(testName, navigateEventHandler, link) { + navigation.addEventListener('navigate', navigateEventHandler); + testSoftNavigation({ + testName, + link, + pushState: () => { }, }); -}; +} + +async function validateSoftNavigationEntries(t, softNavEntries, expectedNumSoftNavs, pushUrl) { + assert_equals(softNavEntries.length, expectedNumSoftNavs, + 'Soft Navigations detected are the same as the number of clicks'); + + const hardNavEntry = performance.getEntriesByType('navigation')[0]; + const all_navigation_ids = new Set( + [hardNavEntry.navigationId, ...softNavEntries.map(entry => entry.navigationId)]); + + assert_equals( + all_navigation_ids.size, expectedNumSoftNavs + 1, + 'The navigation ID was re-generated between all hard and soft navs'); + + if (expectedNumSoftNavs > SOFT_NAV_ENTRY_BUFFER_LIMIT) { + // TODO: Consider exposing args to `extraValidationsSN` so the + // dropped entry count test can make these assertions directly. + // Having it here has the advantage of testing ALL tests, but, it has + // the disadvantage of not being able to assert that for sure we hit this + // code path in that specific test. (tested locally that it does, but + // what if buffer sizes change in the future?) + const expectedDroppedEntriesCount = expectedNumSoftNavs - SOFT_NAV_ENTRY_BUFFER_LIMIT; + await promise_rejects_exactly(t, expectedDroppedEntriesCount, + getBufferedEntries('soft-navigation'), + "This should reject with the number of dropped entries") + } + + for (let i = 0; i < softNavEntries.length; ++i) { + const softNavEntry = softNavEntries[i]; + assert_regexp_match( + softNavEntry.name, new RegExp(pushUrl), + 'The soft navigation name is properly set'); + + // TODO: Carefully look at these and re-enable, also: assert_between_inclusive + // const timeOrigin = softNavEntry.startTime; + // assert_greater_than_equal( + // timeOrigin, timestamps[i]['eventEnd'], + // 'Event start timestamp matches'); + // assert_less_than_equal( + // timeOrigin, timestamps[i]['syncPostInteraction'], + // 'Entry timestamp is lower than the post interaction one'); + } +} + + +async function validateIcpEntries(t, softNavEntries, lcps, icps, lcps_after) { + assert_equals( + lcps.length, lcps_after.length, + 'Soft navigation should not have triggered more LCP entries.'); + + assert_greater_than_equal( + icps.length, softNavEntries.length, + 'Should have at least one ICP entry per soft navigation.'); + + const lcp = lcps.at(-1); + + // Group ICP entries by their navigation ID. + const icpsByNavId = new Map(); + for (const icp of icps) { + if (!icpsByNavId.has(icp.navigationId)) { + icpsByNavId.set(icp.navigationId, []); + } + icpsByNavId.get(icp.navigationId).push(icp); + } + + // For each soft navigation, find and validate its corresponding ICP entry. + for (const softNav of softNavEntries) { + const navId = softNav.navigationId; + assert_true(icpsByNavId.has(navId), + `An ICP entry should be present for navigationId ${navId}`); + + // Get the largest ICP entry for this specific navigation. + // TODO: validate multiple candidates (i.e. each is newer + larger). + const icp = icpsByNavId.get(navId).at(-1); + + assert_not_equals(lcp.size, icp.size, + `LCP element should not have identical size to ICP element for navigationId ${navId}.`); + assert_not_equals(lcp.startTime, icp.startTime, + `LCP element should not have identical startTime to ICP element for navigationId ${navId}.`); + } +} + + +// Receives an image InteractionContentfulPaint |entry| and checks |entry|'s attribute values. +// The |timeLowerBound| parameter is a lower bound on the loadTime value of the entry. +// The |options| parameter may contain some string values specifying the following: +// * 'renderTimeIs0': the renderTime should be 0 (image does not pass Timing-Allow-Origin checks). +// When not present, the renderTime should not be 0 (image passes the checks). +// * 'sizeLowerBound': the |expectedSize| is only a lower bound on the size attribute value. +// When not present, |expectedSize| must be exactly equal to the size attribute value. +// * 'approximateSize': the |expectedSize| is only approximate to the size attribute value. +// This option is mutually exclusive to 'sizeLowerBound'. +function checkImage(entry, expectedUrl, expectedID, expectedSize, timeLowerBound, options = []) { + assert_equals(entry.name, '', "Entry name should be the empty string"); + assert_equals(entry.entryType, 'interaction-contentful-paint', + "Entry type should be interaction-contentful-paint"); + assert_equals(entry.duration, 0, "Entry duration should be 0"); + // The entry's url can be truncated. + assert_equals(expectedUrl.substr(0, 100), entry.url.substr(0, 100), + `Expected URL ${expectedUrl} should at least start with the entry's URL ${entry.url}`); + assert_equals(entry.id, expectedID, "Entry ID matches expected one"); + assert_equals(entry.element, document.getElementById(expectedID), + "Entry element is expected one"); + if (options.includes('skip')) { + return; + } + assert_greater_than_equal(performance.now(), entry.renderTime, + 'renderTime should occur before the entry is dispatched to the observer.'); + assert_approx_equals(entry.startTime, entry.renderTime, 0.001, + 'startTime should be equal to renderTime to the precision of 1 millisecond.'); + if (options.includes('sizeLowerBound')) { + assert_greater_than(entry.size, expectedSize); + } else if (options.includes('approximateSize')) { + assert_approx_equals(entry.size, expectedSize, 1); + } else { + assert_equals(entry.size, expectedSize); + } + + assert_greater_than_equal(entry.paintTime, timeLowerBound, + 'paintTime should represent the time when the UA started painting'); + + // PaintTimingMixin + if ("presentationTime" in entry && entry.presentationTime !== null) { + assert_greater_than(entry.presentationTime, entry.paintTime); + assert_equals(entry.presentationTime, entry.renderTime); + } else { + assert_equals(entry.renderTime, entry.paintTime); + } + + if (options.includes('animated')) { + assert_less_than(entry.renderTime, image_delay, + 'renderTime should be smaller than the delay applied to the second frame'); + assert_greater_than(entry.renderTime, 0, + 'renderTime should be larger than 0'); + } + else { + assert_between_inclusive(entry.loadTime, timeLowerBound, entry.renderTime, + 'loadTime should occur between the lower bound and the renderTime'); + } +} diff --git a/tests/wpt/tests/soft-navigation-heuristics/second-interaction-not-softnav.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/second-interaction-not-softnav.tentative.html index a9bb337060d..7382d769b7e 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/second-interaction-not-softnav.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/second-interaction-not-softnav.tentative.html @@ -14,8 +14,8 @@

Then click me!

- diff --git a/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/lcp-unbuffered.html b/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/lcp-unbuffered.html index cf6dd768313..1df6bd11d0f 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/lcp-unbuffered.html +++ b/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/lcp-unbuffered.html @@ -42,8 +42,8 @@ /*min_num_entries=*/ 1, /*timeout_ms=*/ 3000, ); - const lcpPromise = SoftNavigationTestHelper.getPerformanceEntries( - /*type=*/ "largest-contentful-paint", + const icpPromise = SoftNavigationTestHelper.getPerformanceEntries( + /*type=*/ "interaction-contentful-paint", /*include_soft_navigation_observations=*/ true, /*min_num_entries=*/ 1, ); @@ -54,7 +54,7 @@ // and a soft navigation LCP entry. const results = await Promise.allSettled([ helper.withTimeoutMessage(softNavPromise, "Soft navigation entry never arrived.", 3000), - helper.withTimeoutMessage(lcpPromise, "LCP entry never arrived.", 3000), + helper.withTimeoutMessage(icpPromise, "ICP entry never arrived.", 3000), ]); // If either or both of soft nav entry or soft nav LCP are missing, @@ -74,9 +74,9 @@ ); // Examine the soft navigation LCP entry. - const lcps = results[1].value; - assert_equals(lcps.length, 1, "Expecting one LCP after click."); - assert_equals(lcps[0].id, "lcp-img", "LCP after click should be for the image."); + const icps = results[1].value; + assert_equals(icps.length, 1, "Expecting one LCP after click."); + assert_equals(icps[0].id, "lcp-img", "LCP after click should be for the image."); // Examine timestamps. assert_less_than( @@ -86,18 +86,18 @@ ); assert_less_than( softNavs[0].startTime, - lcps[0].startTime, + icps[0].startTime, "LCP should start after soft navigation.", ); // Examine navigation ids. assert_equals( - lcps[0].navigationId, + icps[0].navigationId, softNavs[0].navigationId, "LCP should have the same navigation id as soft navigation.", ); assert_not_equals( - lcps[0].navigationId, + icps[0].navigationId, firstLcp[0].navigationId, "LCP should have a different navigation id than first LCP.", ); diff --git a/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/lcp.html b/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/lcp.html index cc582c6cbc3..2b57e6ce196 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/lcp.html +++ b/tests/wpt/tests/soft-navigation-heuristics/smoke/tentative/lcp.html @@ -48,8 +48,7 @@ } // Now that we've clicked, we expect to see a soft navigation, - // and a soft navigation LCP entry; and since there was already - // an LCP entry, we expect two LCP entries. + // and a soft navigation LCP entry; const results = await Promise.allSettled([ helper.getBufferedPerformanceEntriesWithTimeout( /*type=*/ "soft-navigation", @@ -57,9 +56,9 @@ /*min_num_entries=*/ 1, ), helper.getBufferedPerformanceEntriesWithTimeout( - /*type=*/ "largest-contentful-paint", + /*type=*/ "interaction-contentful-paint", /*include_soft_navigation_observations=*/ true, - /*min_num_entries=*/ 2, + /*min_num_entries=*/ 1, ), ]); @@ -80,11 +79,11 @@ ); // Examine the soft navigation LCP entries. - const lcp_including_soft_nav = results[1].value; + const icps = results[1].value; assert_equals( - lcp_including_soft_nav.length, - 2, - "Expecting 2 entries: initial LCP and soft nav LCP.", + icps.length, + 1, + "Expecting 1 entry.", ); // Now observe the hard navs again. There should only be one entry. @@ -106,46 +105,17 @@ "click-target", "Hard nav LCP entry is (still) for the click target.", ); + assert_equals( - lcp_including_soft_nav[0].id, - "click-target", - "First soft nav LCP entry is for the click target.", - ); - assert_equals( - lcp_including_soft_nav[1].id, + icps[0].id, "lcp-img", - "Second soft nav LCP entry is for the image.", + "Soft nav LCP entry is for the image.", ); assert_equals( - hard_nav_lcp[0], - lcp_including_soft_nav[0], - "Hard nav and first soft nav LCP entries are the same entry.", - ); - // Since we don't rust assert_equals fully, we also compare - // render time and navigation ID. :-) - assert_equals( - hard_nav_lcp[0].renderTime, - lcp_including_soft_nav[0].renderTime, - "Hard nav and first soft nav LCP entries have the same render time.", - ); - assert_equals( - hard_nav_lcp[0].navigationId, - lcp_including_soft_nav[0].navigationId, - "Hard nav and first soft nav LCP entries have the same navigation ID.", - ); - - // Compare the two soft nav LCP entries, and show that the navigation ID - // changes for the second one to be that of the soft navigation entry. - assert_not_equals( - lcp_including_soft_nav[0].navigationId, - lcp_including_soft_nav[1].navigationId, - "Soft nav LCP entries have have different navigation IDs.", - ); - assert_equals( - lcp_including_soft_nav[1].navigationId, + icps[0].navigationId, soft_navs[0].navigationId, - "Second soft nav LCP entry has the same navigation ID as the soft nav entry.", + "Soft nav LCP entry has the same navigation ID as the soft nav entry.", ); }, "Detect soft navigation and LCP after a click."); diff --git a/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-main-descendent.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-main-descendent.tentative.html index 96ff55260c3..4eac03e9c51 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-main-descendent.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-main-descendent.tentative.html @@ -15,16 +15,15 @@
diff --git a/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-non-main.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-non-main.tentative.html deleted file mode 100644 index 86da167c339..00000000000 --- a/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-non-main.tentative.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - -Detect simple soft navigation. - - - - - - - - Click me! - - - - diff --git a/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-web-component-lifecycle.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-web-component-lifecycle.tentative.html index 43848935038..5a5e8d14ec4 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-web-component-lifecycle.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection-web-component-lifecycle.tentative.html @@ -28,8 +28,9 @@ Click me! - diff --git a/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection.tentative.html index 618984d8592..64ca5aa4ef1 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/soft-navigation-detection.tentative.html @@ -10,17 +10,13 @@ -
Click me! +
diff --git a/tests/wpt/tests/soft-navigation-heuristics/softnav-after-lcp-paint-larger-than-viewport.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/softnav-after-lcp-paint-larger-than-viewport.tentative.html index 3c930d8be4c..04d7a76a1f2 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/softnav-after-lcp-paint-larger-than-viewport.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/softnav-after-lcp-paint-larger-than-viewport.tentative.html @@ -19,8 +19,6 @@
- - diff --git a/tests/wpt/tests/soft-navigation-heuristics/softnav-after-lcp-paint.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/softnav-after-lcp-paint.tentative.html index cf9a9942ca6..bcae0ca2436 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/softnav-after-lcp-paint.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/softnav-after-lcp-paint.tentative.html @@ -17,8 +17,10 @@
diff --git a/tests/wpt/tests/soft-navigation-heuristics/softnav-before-lcp-paint.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/softnav-before-lcp-paint.tentative.html deleted file mode 100644 index d5dc4b74fb3..00000000000 --- a/tests/wpt/tests/soft-navigation-heuristics/softnav-before-lcp-paint.tentative.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - -Detect simple soft navigation. - - - - - - - - -
-
- -
-
- - - diff --git a/tests/wpt/tests/soft-navigation-heuristics/softnav-between-lcp-render-and-paint.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/softnav-between-lcp-render-and-paint.tentative.html index 56c7073de63..8398e947d52 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/softnav-between-lcp-render-and-paint.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/softnav-between-lcp-render-and-paint.tentative.html @@ -17,8 +17,10 @@
diff --git a/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-anim-image-softnav-lcp.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-anim-image-softnav-lcp.tentative.html index b34a6e81a58..36ba86ec47d 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-anim-image-softnav-lcp.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-anim-image-softnav-lcp.tentative.html @@ -18,6 +18,8 @@ diff --git a/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-image-softnav-lcp.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-image-softnav-lcp.tentative.html index 3a8398347ce..3b1e6999462 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-image-softnav-lcp.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-image-softnav-lcp.tentative.html @@ -16,16 +16,15 @@
diff --git a/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-text-softnav-lcp.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-text-softnav-lcp.tentative.html index 929f59f019d..8738b7f2fe5 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-text-softnav-lcp.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/text-lcp-followed-by-text-softnav-lcp.tentative.html @@ -16,19 +16,15 @@
- - - diff --git a/tests/wpt/tests/soft-navigation-heuristics/visited-link.tentative.html b/tests/wpt/tests/soft-navigation-heuristics/visited-link.tentative.html index 0bb31aaac15..221d81357c0 100644 --- a/tests/wpt/tests/soft-navigation-heuristics/visited-link.tentative.html +++ b/tests/wpt/tests/soft-navigation-heuristics/visited-link.tentative.html @@ -36,21 +36,20 @@ div.appendChild(text); main.appendChild(div); } - const link = document.getElementById("link"); testSoftNavigation({ + testName: "Test that a visited link doesn't trigger LCP after a soft " + + "navigation is detected", addContent: async () => { await visitFakeURLAndAddInvisibleText(); }, - link: link, - validate: async () => { + extraValidations: async (t) => { await new Promise(r => step_timeout(r, 100)); - const postVisitedLcp = await getLcpEntries(); - assert_not_equals(postVisitedLcp[postVisitedLcp.length - 1].id, + const icps = await getBufferedEntries('interaction-contentful-paint'); + assert_not_equals(icps[icps.length - 1].id, "visited", - "Soft Nav LCP ID should not be visited"); + "Soft Nav ICP ID should not be visited"); }, - test: "Test that a visited link doesn't trigger LCP after a soft " + - "navigation is detected"}); + }); diff --git a/tests/wpt/tests/svg/animations/crashtests/firefox-bug-1957178.html b/tests/wpt/tests/svg/animations/crashtests/firefox-bug-1957178.html new file mode 100644 index 00000000000..c8b1a4c2ee2 --- /dev/null +++ b/tests/wpt/tests/svg/animations/crashtests/firefox-bug-1957178.html @@ -0,0 +1,10 @@ + + + + + + diff --git a/tests/wpt/tests/svg/painting/reftests/marker-path-002.svg b/tests/wpt/tests/svg/painting/reftests/marker-path-002.svg index 7467c7d5233..97ad69815bd 100644 --- a/tests/wpt/tests/svg/painting/reftests/marker-path-002.svg +++ b/tests/wpt/tests/svg/painting/reftests/marker-path-002.svg @@ -11,6 +11,7 @@ + diff --git a/tests/wpt/tests/svg/painting/reftests/marker-path-011.svg b/tests/wpt/tests/svg/painting/reftests/marker-path-011.svg index b6627f86e8c..b8bace4b683 100644 --- a/tests/wpt/tests/svg/painting/reftests/marker-path-011.svg +++ b/tests/wpt/tests/svg/painting/reftests/marker-path-011.svg @@ -11,6 +11,7 @@ + diff --git a/tests/wpt/tests/svg/painting/reftests/marker-path-012.svg b/tests/wpt/tests/svg/painting/reftests/marker-path-012.svg index 1586951b1f2..80bceceae3c 100644 --- a/tests/wpt/tests/svg/painting/reftests/marker-path-012.svg +++ b/tests/wpt/tests/svg/painting/reftests/marker-path-012.svg @@ -11,6 +11,7 @@ + diff --git a/tests/wpt/tests/svg/render/reftests/blending-001.svg b/tests/wpt/tests/svg/render/reftests/blending-001.svg index f8fcf9fae49..40c54547eb7 100644 --- a/tests/wpt/tests/svg/render/reftests/blending-001.svg +++ b/tests/wpt/tests/svg/render/reftests/blending-001.svg @@ -11,6 +11,7 @@ + - +