diff --git a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini index 76b398963ae..dd4ffcf4345 100644 --- a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -1,5 +1,4 @@ [url-in-tags-revoke.window.html] - expected: TIMEOUT [Fetching a blob URL immediately before revoking it works in an iframe.] expected: FAIL @@ -15,6 +14,3 @@ [Opening a blob URL in a new window by clicking an tag works immediately before revoking the URL.] expected: FAIL - [Fetching a blob URL immediately before revoking it works in diff --git a/tests/wpt/web-platform-tests/compression/decompression-corrupt-input.any.js b/tests/wpt/web-platform-tests/compression/decompression-corrupt-input.tentative.any.js similarity index 100% rename from tests/wpt/web-platform-tests/compression/decompression-corrupt-input.any.js rename to tests/wpt/web-platform-tests/compression/decompression-corrupt-input.tentative.any.js diff --git a/tests/wpt/web-platform-tests/conformance-checkers/messages.json b/tests/wpt/web-platform-tests/conformance-checkers/messages.json index 94d3bc461f5..2dcd3830d72 100644 --- a/tests/wpt/web-platform-tests/conformance-checkers/messages.json +++ b/tests/wpt/web-platform-tests/conformance-checkers/messages.json @@ -2187,7 +2187,7 @@ "html/media-queries/011-novalid.html": "Bad value \u201cscreen and (min-width: 400dpi)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: \u201c400dpi\u201d is not a \u201cwidth\u201d value", "html/media-queries/013-novalid.html": "Bad value \u201cscreen and (min-width:\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Parse Error.", "html/media-queries/014-novalid.html": "Bad value \u201cscreen and (min-width: 400px) and\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Parse Error.", - "html/media-queries/019-novalid.html": "Bad value \u201cscreen and (color: 1em)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Too many values or values are not recognized", + "html/media-queries/019-novalid.html": "Bad value \u201cscreen and (color: 1em)\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: \u201c1em\u201d is not a \u201ccolor\u201d value", "html/media-queries/020-novalid.html": "Bad value \u201c,\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Parse Error.", "html/media-queries/021-novalid.html": "Bad value \u201cscreen,,print\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Parse Error.", "html/media-queries/022-novalid.html": "Bad value \u201cscreen,\u201d for attribute \u201cmedia\u201d on element \u201clink\u201d: Bad media query: Parse Error.", diff --git a/tests/wpt/web-platform-tests/content-dpr/image-pseudo-element-content-dpr-ref.html b/tests/wpt/web-platform-tests/content-dpr/image-pseudo-element-content-dpr-ref.html new file mode 100644 index 00000000000..baa25ac87c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-dpr/image-pseudo-element-content-dpr-ref.html @@ -0,0 +1,12 @@ + + + Content-DPR: pseudo elements + + + + + The following squares should be identical
+ + + + diff --git a/tests/wpt/web-platform-tests/content-dpr/image-pseudo-element-content-dpr.html b/tests/wpt/web-platform-tests/content-dpr/image-pseudo-element-content-dpr.html new file mode 100644 index 00000000000..7770df39997 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-dpr/image-pseudo-element-content-dpr.html @@ -0,0 +1,17 @@ + + + Content-DPR: pseudo elements + + + + + + + The following squares should be identical
+ + + diff --git a/tests/wpt/web-platform-tests/content-dpr/image-with-content-dpr-and-explicit-dimensions-ref.html b/tests/wpt/web-platform-tests/content-dpr/image-with-content-dpr-and-explicit-dimensions-ref.html new file mode 100644 index 00000000000..27ce1be8b0d --- /dev/null +++ b/tests/wpt/web-platform-tests/content-dpr/image-with-content-dpr-and-explicit-dimensions-ref.html @@ -0,0 +1,10 @@ + + + Content-DPR: render natural size + + + + + + + diff --git a/tests/wpt/web-platform-tests/content-dpr/image-with-content-dpr-and-explicit-dimensions.html b/tests/wpt/web-platform-tests/content-dpr/image-with-content-dpr-and-explicit-dimensions.html new file mode 100644 index 00000000000..783fb03a3b0 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-dpr/image-with-content-dpr-and-explicit-dimensions.html @@ -0,0 +1,12 @@ + + + Content-DPR: with size attributes + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/client-hints/image-with-dpr-header.html b/tests/wpt/web-platform-tests/content-dpr/image-with-dpr-header.html similarity index 100% rename from tests/wpt/web-platform-tests/client-hints/image-with-dpr-header.html rename to tests/wpt/web-platform-tests/content-dpr/image-with-dpr-header.html diff --git a/tests/wpt/web-platform-tests/content-dpr/resources/background.png b/tests/wpt/web-platform-tests/content-dpr/resources/background.png new file mode 100644 index 00000000000..6db6c6b1b9d Binary files /dev/null and b/tests/wpt/web-platform-tests/content-dpr/resources/background.png differ diff --git a/tests/wpt/web-platform-tests/client-hints/resources/dpr.py b/tests/wpt/web-platform-tests/content-dpr/resources/dpr.py similarity index 100% rename from tests/wpt/web-platform-tests/client-hints/resources/dpr.py rename to tests/wpt/web-platform-tests/content-dpr/resources/dpr.py diff --git a/tests/wpt/web-platform-tests/content-dpr/resources/square.png b/tests/wpt/web-platform-tests/content-dpr/resources/square.png new file mode 100644 index 00000000000..01c9666a8de Binary files /dev/null and b/tests/wpt/web-platform-tests/content-dpr/resources/square.png differ diff --git a/tests/wpt/web-platform-tests/content-dpr/tiled-background-image-with-content-dpr-ref.html b/tests/wpt/web-platform-tests/content-dpr/tiled-background-image-with-content-dpr-ref.html new file mode 100644 index 00000000000..58cbeb436fc --- /dev/null +++ b/tests/wpt/web-platform-tests/content-dpr/tiled-background-image-with-content-dpr-ref.html @@ -0,0 +1,29 @@ + + + Content-DPR: css tiled background + + + + + + The next div should have 16 boxes +
+
+ The next div should have 64 boxes +
+
+ + diff --git a/tests/wpt/web-platform-tests/content-dpr/tiled-background-image-with-content-dpr.html b/tests/wpt/web-platform-tests/content-dpr/tiled-background-image-with-content-dpr.html new file mode 100644 index 00000000000..94f2f72d401 --- /dev/null +++ b/tests/wpt/web-platform-tests/content-dpr/tiled-background-image-with-content-dpr.html @@ -0,0 +1,27 @@ + + + Content-DPR: css tiled background + + + + + + + The next div should have 16 boxes +
+
+ The next div should have 64 boxes +
+
+ + diff --git a/tests/wpt/web-platform-tests/cookie-store/cookieStore_subscriptions_empty.tentative.https.window.js b/tests/wpt/web-platform-tests/cookie-store/cookieStore_subscriptions_empty.tentative.https.window.js new file mode 100644 index 00000000000..907a34b4de6 --- /dev/null +++ b/tests/wpt/web-platform-tests/cookie-store/cookieStore_subscriptions_empty.tentative.https.window.js @@ -0,0 +1,13 @@ +// META: script=/service-workers/service-worker/resources/test-helpers.sub.js + +'use strict'; + +promise_test(async testCase => { + const registration = await service_worker_unregister_and_register( + testCase, 'resources/empty_sw.js', 'resources/does/not/exist'); + testCase.add_cleanup(() => registration.unregister()); + await wait_for_state(testCase, registration.installing, 'activated'); + + const subscriptions = await registration.cookies.getSubscriptions(); + assert_equals(0, subscriptions.length); +}, 'Newly registered and activated service worker has no subscriptions'); diff --git a/tests/wpt/web-platform-tests/cookie-store/resources/always_changing_sw.sub.js b/tests/wpt/web-platform-tests/cookie-store/resources/always_changing_sw.sub.js new file mode 100644 index 00000000000..9fdf99848fa --- /dev/null +++ b/tests/wpt/web-platform-tests/cookie-store/resources/always_changing_sw.sub.js @@ -0,0 +1,6 @@ +// This script changes every time it is fetched. + +// When used as a service worker script, this causes the Service Worker to be +// updated on every ServiceWorkerRegistration.update() call. + +// The following bytes change on every fetch: {{uuid()}} diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.js b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.js index 41cbed01a5b..107bb957612 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.js +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions.js @@ -4,26 +4,6 @@ self.GLOBAL = { }; importScripts("/resources/testharness.js"); -self.addEventListener('install', (event) => { - event.waitUntil((async () => { - // The subscribeToChanges calls are not done in parallel on purpose. Having - // multiple in-flight requests introduces failure modes aside from the - // cookie change logic that this test aims to cover. - try { - await cookieStore.subscribeToChanges([ - { name: 'cookie-name1', matchType: 'equals', url: '/cookie-store/path1' }]); - await cookieStore.subscribeToChanges([ - { }, // Test the default values for subscription properties. - { name: 'cookie-prefix', matchType: 'starts-with' }, - ]); - - // If the worker enters the "redundant" state, the UA may terminate it - // before all tests have been reported to the client. Stifle errors in - // order to avoid this and ensure all tests are consistently reported. - } catch (err) {} - })()); -}); - // Resolves when the service worker receives the 'activate' event. const kServiceWorkerActivatedPromise = new Promise(resolve => { self.addEventListener('activate', event => { resolve(); }); @@ -41,7 +21,23 @@ function CompareStrings(a, b) { promise_test(async testCase => { await kServiceWorkerActivatedPromise; - const subscriptions = await cookieStore.getChangeSubscriptions(); + { + const subscriptions = [ + { name: 'cookie-name1', matchType: 'equals', url: '/cookie-store/path1' }, + ]; + await registration.cookies.subscribe(subscriptions); + testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions)); + } + { + const subscriptions = [ + { }, // Test the default values for subscription properties. + { name: 'cookie-prefix', matchType: 'starts-with' }, + ]; + await registration.cookies.subscribe(subscriptions); + testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions)); + } + + const subscriptions = await registration.cookies.getSubscriptions(); assert_equals(subscriptions.length, 3); subscriptions.sort((a, b) => CompareStrings(`${a.name}`, `${b.name}`)); @@ -54,20 +50,13 @@ promise_test(async testCase => { assert_false('name' in subscriptions[2]); assert_equals('starts-with', subscriptions[2].matchType); -}, 'getChangeSubscriptions returns subscriptions passed to subscribeToChanges'); - -promise_test(async testCase => { - promise_rejects( - testCase, new TypeError(), - cookieStore.subscribeToChanges([{ name: 'cookie-name2' }])); -}, 'subscribeToChanges rejects when called outside the install handler'); - +}, 'getSubscriptions returns subscriptions passed to subscribe'); // Accumulates cookiechange events dispatched to the service worker. let g_cookie_changes = []; // Resolved when a cookiechange event is received. Rearmed by -// ResetCookieChangeReceivedPromise(). +// RearmCookieChangeReceivedPromise(). let g_cookie_change_received_promise = null; let g_cookie_change_received_promise_resolver = null; self.addEventListener('cookiechange', (event) => { @@ -85,6 +74,22 @@ RearmCookieChangeReceivedPromise(); promise_test(async testCase => { await kServiceWorkerActivatedPromise; + { + const subscriptions = [ + { name: 'cookie-name1', matchType: 'equals', url: '/cookie-store/path1' }, + ]; + await registration.cookies.subscribe(subscriptions); + testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions)); + } + { + const subscriptions = [ + { }, // Test the default values for subscription properties. + { name: 'cookie-prefix', matchType: 'starts-with' }, + ]; + await registration.cookies.subscribe(subscriptions); + testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions)); + } + await cookieStore.set('cookie-name', 'cookie-value'); testCase.add_cleanup(async () => { await cookieStore.delete('cookie-name'); diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_basic.js b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_basic.js index 293969e5b8f..a96eeeb116d 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_basic.js +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_basic.js @@ -4,20 +4,6 @@ self.GLOBAL = { }; importScripts("/resources/testharness.js"); -self.addEventListener('install', (event) => { - event.waitUntil((async () => { - try { - await cookieStore.subscribeToChanges([ - { name: 'cookie-name', matchType: 'equals', - url: '/cookie-store/scope/path' }]); - - // If the worker enters the "redundant" state, the UA may terminate it - // before all tests have been reported to the client. Stifle errors in - // order to avoid this and ensure all tests are consistently reported. - } catch (err) {} - })()); -}); - // Resolves when the service worker receives the 'activate' event. const kServiceWorkerActivatedPromise = new Promise(resolve => { self.addEventListener('activate', event => { resolve(); }); @@ -26,29 +12,42 @@ const kServiceWorkerActivatedPromise = new Promise(resolve => { promise_test(async testCase => { await kServiceWorkerActivatedPromise; - const subscriptions = await cookieStore.getChangeSubscriptions(); + { + const subscriptions = [ + { name: 'cookie-name', matchType: 'equals', + url: '/cookie-store/scope/path' }]; + await registration.cookies.subscribe(subscriptions); + testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions)); + } + + const subscriptions = await registration.cookies.getSubscriptions(); assert_equals(subscriptions.length, 1); assert_equals(subscriptions[0].name, 'cookie-name'); - assert_equals('equals', subscriptions[0].matchType); -}, 'getChangeSubscriptions returns a subscription passed to subscribeToChanges'); + assert_equals(subscriptions[0].matchType, 'equals'); + assert_equals(subscriptions[0].url, + (new URL("/cookie-store/scope/path", self.location.href)).href); +}, 'getSubscriptions returns a subscription passed to subscribe'); +const kCookieChangeReceivedPromise = new Promise((resolve) => { + self.addEventListener('cookiechange', event => { resolve(event); }); +}); promise_test(async testCase => { await kServiceWorkerActivatedPromise; - const cookie_change_received_promise = new Promise((resolve) => { - self.addEventListener('cookiechange', (event) => { - resolve(event); - }); - }); + const subscriptions = [ + { name: 'cookie-name', matchType: 'equals', + url: '/cookie-store/scope/path' }]; + await registration.cookies.subscribe(subscriptions); + testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions)); await cookieStore.set('cookie-name', 'cookie-value'); testCase.add_cleanup(async () => { await cookieStore.delete('cookie-name'); }); - const event = await cookie_change_received_promise; + const event = await kCookieChangeReceivedPromise; assert_equals(event.type, 'cookiechange'); assert_equals(event.changed.length, 1); assert_equals(event.changed[0].name, 'cookie-name'); diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_empty.js b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_empty.js index b6231869974..7df77730553 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_empty.js +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_empty.js @@ -4,18 +4,6 @@ self.GLOBAL = { }; importScripts("/resources/testharness.js"); -self.addEventListener('install', (event) => { - event.waitUntil((async () => { - try { - await cookieStore.subscribeToChanges([]); - - // If the worker enters the "redundant" state, the UA may terminate it - // before all tests have been reported to the client. Stifle errors in - // order to avoid this and ensure all tests are consistently reported. - } catch (err) {} - })()); -}); - // Resolves when the service worker receives the 'activate' event. const kServiceWorkerActivatedPromise = new Promise(resolve => { self.addEventListener('activate', event => { resolve(); }); @@ -24,9 +12,9 @@ const kServiceWorkerActivatedPromise = new Promise(resolve => { promise_test(async testCase => { await kServiceWorkerActivatedPromise; - const subscriptions = await cookieStore.getChangeSubscriptions(); + const subscriptions = await registration.cookies.getSubscriptions(); assert_equals(subscriptions.length, 0); -}, 'getChangeSubscriptions returns an empty array when there are no subscriptions'); +}, 'getSubscriptions returns an empty array when there are no subscriptions'); done(); diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js index 258441921bf..ed0cdcfcfca 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js @@ -4,20 +4,6 @@ self.GLOBAL = { }; importScripts("/resources/testharness.js"); -self.addEventListener('install', (event) => { - event.waitUntil((async () => { - try { - await cookieStore.subscribeToChanges([ - { name: 'cookie-name', matchType: 'equals', - url: '/cookie-store/scope/path' }]); - - // If the worker enters the "redundant" state, the UA may terminate it - // before all tests have been reported to the client. Stifle errors in - // order to avoid this and ensure all tests are consistently reported. - } catch (err) {} - })()); -}); - // Resolves when the service worker receives the 'activate' event. const kServiceWorkerActivatedPromise = new Promise((resolve) => { self.addEventListener('activate', event => { resolve(); }); @@ -32,6 +18,12 @@ const kCookieChangeReceivedPromise = new Promise((resolve) => { promise_test(async testCase => { await kServiceWorkerActivatedPromise; + const subscriptions = [ + { name: 'cookie-name', matchType: 'equals', + url: '/cookie-store/scope/path' }]; + await registration.cookies.subscribe(subscriptions); + testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions)); + await cookieStore.set('cookie-name', 'cookie-value'); testCase.add_cleanup(async () => { await cookieStore.delete('cookie-name'); diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js index bd37b9be1ee..5414a664db6 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js @@ -4,20 +4,6 @@ self.GLOBAL = { }; importScripts("/resources/testharness.js"); -self.addEventListener('install', (event) => { - event.waitUntil((async () => { - try { - await cookieStore.subscribeToChanges([ - { name: 'cookie-name', matchType: 'equals', - url: '/cookie-store/scope/path' }]); - - // If the worker enters the "redundant" state, the UA may terminate it - // before all tests have been reported to the client. Stifle errors in - // order to avoid this and ensure all tests are consistently reported. - } catch (err) {} - })()); -}); - // Resolves when the service worker receives the 'activate' event. const kServiceWorkerActivatedPromise = new Promise((resolve) => { self.addEventListener('activate', event => { resolve(); }); @@ -32,6 +18,12 @@ const kCookieChangeReceivedPromise = new Promise((resolve) => { promise_test(async testCase => { await kServiceWorkerActivatedPromise; + const subscriptions = [ + { name: 'cookie-name', matchType: 'equals', + url: '/cookie-store/scope/path' }]; + await registration.cookies.subscribe(subscriptions); + testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions)); + await cookieStore.set('another-cookie-name', 'cookie-value'); testCase.add_cleanup(async () => { await cookieStore.delete('another-cookie-name'); diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_reset.sub.js b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_reset.sub.js deleted file mode 100644 index 7fc8eabc570..00000000000 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_reset.sub.js +++ /dev/null @@ -1,24 +0,0 @@ -self.GLOBAL = { - isWindow: function() { return false; }, - isWorker: function() { return true; }, -}; -importScripts("/resources/testharness.js"); - -self.addEventListener('install', event => { - event.waitUntil((async () => { - try { - await cookieStore.subscribeToChanges([ - { name: 'cookie-name', matchType: 'equals', - url: '/cookie-store/scope/path' }]); - - // If the worker enters the "redundant" state, the UA may terminate it - // before all tests have been reported to the client. Stifle errors in - // order to avoid this and ensure all tests are consistently reported. - } catch (err) {} - })()); -}); - -self.addEventListener('message', async event => { - const subscriptions = await cookieStore.getChangeSubscriptions(); - event.ports[0].postMessage(subscriptions.length); -}); \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_reset.tentative.https.html b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_reset.tentative.https.html index a0923548c78..4e157840e98 100644 --- a/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_reset.tentative.https.html +++ b/tests/wpt/web-platform-tests/cookie-store/serviceworker_cookieStore_subscriptions_reset.tentative.https.html @@ -8,30 +8,48 @@ diff --git a/tests/wpt/web-platform-tests/css/CSS2/linebox/inline-negative-margin-minmax-crash-001.html b/tests/wpt/web-platform-tests/css/CSS2/linebox/inline-negative-margin-minmax-crash-001.html new file mode 100644 index 00000000000..d6480edd621 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/CSS2/linebox/inline-negative-margin-minmax-crash-001.html @@ -0,0 +1,19 @@ + +CSS Test: Check inline negative margin with fit-content should not cause hang + + + + + + + +
| Operation
+ + diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/animations/background-image-interpolation.html b/tests/wpt/web-platform-tests/css/css-backgrounds/animations/background-image-interpolation.html index b442c4e9120..feda6afebed 100644 --- a/tests/wpt/web-platform-tests/css/css-backgrounds/animations/background-image-interpolation.html +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/animations/background-image-interpolation.html @@ -38,19 +38,26 @@ test_interpolation({ }, [ {at: -0.3, expect: from}, {at: 0, expect: from}, - {at: 0.3, expect: 'cross-fade(' + from + ', ' + to + ', 0.3)'}, - {at: 0.6, expect: 'cross-fade(' + from + ', ' + to + ', 0.6)'}, + {at: 0.3, expect: from}, + {at: 0.6, expect: to}, {at: 1, expect: to}, {at: 1.5, expect: to}, ]); // initial to image to = 'url(../resources/green-100.png)'; -test_no_interpolation({ +test_interpolation({ property: 'background-image', from: 'initial', to: to, -}); +}, [ + {at: -0.3, expect: 'none'}, + {at: 0, expect: 'none'}, + {at: 0.3, expect: 'none'}, + {at: 0.6, expect: to}, + {at: 1, expect: to}, + {at: 1.5, expect: to}, +]); // inherit to image from = 'url(../resources/blue-100.png)'; @@ -62,18 +69,25 @@ test_interpolation({ }, [ {at: -0.3, expect: from}, {at: 0, expect: from}, - {at: 0.3, expect: 'cross-fade(' + from + ', ' + to + ', 0.3)'}, - {at: 0.6, expect: 'cross-fade(' + from + ', ' + to + ', 0.6)'}, + {at: 0.3, expect: from}, + {at: 0.6, expect: to}, {at: 1, expect: to}, {at: 1.5, expect: to}, ]); // unset to image -test_no_interpolation({ +test_interpolation({ property: 'background-image', from: 'unset', to: to, -}); +}, [ + {at: -0.3, expect: 'none'}, + {at: 0, expect: 'none'}, + {at: 0.3, expect: 'none'}, + {at: 0.6, expect: to}, + {at: 1, expect: to}, + {at: 1.5, expect: to}, +]); // Image to image from = 'url(../resources/blue-100.png)'; @@ -85,8 +99,8 @@ test_interpolation({ }, [ {at: -0.3, expect: from}, {at: 0, expect: from}, - {at: 0.3, expect: 'cross-fade(' + from + ', ' + to + ', 0.3)'}, - {at: 0.6, expect: 'cross-fade(' + from + ', ' + to + ', 0.6)'}, + {at: 0.3, expect: from}, + {at: 0.6, expect: to}, {at: 1, expect: to}, {at: 1.5, expect: to}, ]); @@ -94,38 +108,66 @@ test_interpolation({ // Image to gradient from = 'url(../resources/blue-100.png)'; to = 'linear-gradient(45deg, blue, orange)'; -test_no_interpolation({ +test_interpolation({ property: 'background-image', from: from, to: to, -}); +}, [ + {at: -0.3, expect: from}, + {at: 0, expect: from}, + {at: 0.3, expect: from}, + {at: 0.6, expect: to}, + {at: 1, expect: to}, + {at: 1.5, expect: to}, +]); // Image to crossfade from = 'url(../resources/blue-100.png)'; to = 'cross-fade(url(../resources/green-100.png), url(../resources/stripes-100.png), 0.5)'; -test_no_interpolation({ +test_interpolation({ property: 'background-image', from: from, to: to, -}); +}, [ + {at: -0.3, expect: from}, + {at: 0, expect: from}, + {at: 0.3, expect: from}, + {at: 0.6, expect: to}, + {at: 1, expect: to}, + {at: 1.5, expect: to}, +]); // Gradient to gradient from = 'linear-gradient(-45deg, red, yellow)'; to = 'linear-gradient(45deg, blue, orange)'; -test_no_interpolation({ +test_interpolation({ property: 'background-image', from: from, to: to, -}); +}, [ + {at: -0.3, expect: from}, + {at: 0, expect: from}, + {at: 0.3, expect: from}, + {at: 0.6, expect: to}, + {at: 1, expect: to}, + {at: 1.5, expect: to}, +]); // Keyword to image from = 'none'; to = 'url(../resources/green-100.png)'; -test_no_interpolation({ +test_interpolation({ property: 'background-image', from: from, to: to, -}); +}, [ + {at: -0.3, expect: from}, + {at: 0, expect: from}, + {at: 0.3, expect: from}, + {at: 0.6, expect: to}, + {at: 1, expect: to}, + {at: 1.5, expect: to}, +]); // Multiple to multiple var fromA = 'url(../resources/stripes-100.png)'; @@ -141,8 +183,8 @@ test_interpolation({ }, [ {at: -0.3, expect: from}, {at: 0, expect: from}, - {at: 0.3, expect: 'cross-fade(' + fromA + ', ' + toA + ', 0.3), cross-fade(' + fromB + ', ' + toB + ', 0.3)'}, - {at: 0.6, expect: 'cross-fade(' + fromA + ', ' + toA + ', 0.6), cross-fade(' + fromB + ', ' + toB + ', 0.6)'}, + {at: 0.3, expect: from}, + {at: 0.6, expect: to}, {at: 1, expect: to}, {at: 1.5, expect: to}, ]); @@ -161,10 +203,10 @@ test_interpolation({ // Animating background-image is not specified to be possible however we do it for backwards compatibility. // With this in mind we kept the implementation simple at the expense of this corner case because there is // no official specification to support. - {at: -0.3, expect: from + ', ' + from}, + {at: -0.3, expect: from}, {at: 0, expect: from}, - {at: 0.3, expect: 'cross-fade(' + from + ', ' + toA + ', 0.3), cross-fade(' + from + ', ' + toB + ', 0.3)'}, - {at: 0.6, expect: 'cross-fade(' + from + ', ' + toA + ', 0.6), cross-fade(' + from + ', ' + toB + ', 0.6)'}, + {at: 0.3, expect: from}, + {at: 0.6, expect: to}, {at: 1, expect: to}, {at: 1.5, expect: to}, ]); @@ -172,10 +214,17 @@ test_interpolation({ // Multiple mismatched types from = 'url(../resources/blue-100.png), none'; to = 'url(../resources/stripes-100.png), url(../resources/green-100.png)'; -test_no_interpolation({ +test_interpolation({ property: 'background-image', from: from, to: to, -}); +}, [ + {at: -0.3, expect: from}, + {at: 0, expect: from}, + {at: 0.3, expect: from}, + {at: 0.6, expect: to}, + {at: 1, expect: to}, + {at: 1.5, expect: to}, +]); diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/animations/border-image-slice-interpolation-stability.html b/tests/wpt/web-platform-tests/css/css-backgrounds/animations/border-image-slice-interpolation-stability.html new file mode 100644 index 00000000000..26431334e4a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-backgrounds/animations/border-image-slice-interpolation-stability.html @@ -0,0 +1,24 @@ + + +border-image-slice interpolation stability + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-break/fieldset-001-ref.html b/tests/wpt/web-platform-tests/css/css-break/fieldset-001-ref.html new file mode 100644 index 00000000000..1422086da71 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fieldset-001-ref.html @@ -0,0 +1,55 @@ + + +Reference: fragmenting a fieldset in multicol layout + + + + +
+

+
+
+

+
+
+

+
+
+

+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-break/fieldset-001.html b/tests/wpt/web-platform-tests/css/css-break/fieldset-001.html new file mode 100644 index 00000000000..d320fe15beb --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/fieldset-001.html @@ -0,0 +1,46 @@ + + +CSS Test: fragmenting a fieldset in multicol layout + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-break/tall-break-inside-avoid-at-start.html b/tests/wpt/web-platform-tests/css/css-break/tall-break-inside-avoid-at-start.html new file mode 100644 index 00000000000..6e9ab8bd9f5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-break/tall-break-inside-avoid-at-start.html @@ -0,0 +1,10 @@ + + + + + +

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

+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-display/animations/display-interpolation.html b/tests/wpt/web-platform-tests/css/css-display/animations/display-interpolation.html new file mode 100644 index 00000000000..d0b1d9573b8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-display/animations/display-interpolation.html @@ -0,0 +1,47 @@ + + +display interpolation + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-17-notref.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-17-notref.html new file mode 100644 index 00000000000..3d01985ed6b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-17-notref.html @@ -0,0 +1,11 @@ + + + + + + +
+
HeJllo
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-17.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-17.html new file mode 100644 index 00000000000..9ce56ed8fa6 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-17.html @@ -0,0 +1,14 @@ + + + + + + + + + +
+
HeJllo
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-18-notref.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-18-notref.html new file mode 100644 index 00000000000..7829a0c5e19 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-18-notref.html @@ -0,0 +1,17 @@ + + + + + + + +
+
HeJllo
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-18.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-18.html new file mode 100644 index 00000000000..69e5cabd6ec --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-18.html @@ -0,0 +1,20 @@ + + + + + + + + + + +
+
HeJllo
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-19-notref.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-19-notref.html new file mode 100644 index 00000000000..7e876ced313 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-19-notref.html @@ -0,0 +1,11 @@ + + + + + + +
+
HeJllo
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-19.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-19.html new file mode 100644 index 00000000000..43dc24b1675 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-19.html @@ -0,0 +1,14 @@ + + + + + + + + + +
+
HeJllo
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-2-ref.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-2-ref.html index e19801ba770..a2fe8646e13 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-2-ref.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-2-ref.html @@ -13,6 +13,7 @@ This test makes sure that the bold versions of the design system UI fonts work.
HeJllo
HeJllo
HeJllo
+
HeJllo
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-2.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-2.html index 4fbca52b659..2827c6c2cb8 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-2.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-2.html @@ -16,6 +16,7 @@ This test makes sure that the bold versions of the design system UI fonts work.
HeJllo
HeJllo
HeJllo
+
HeJllo
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-20-notref.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-20-notref.html new file mode 100644 index 00000000000..7e876ced313 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-20-notref.html @@ -0,0 +1,11 @@ + + + + + + +
+
HeJllo
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-20.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-20.html new file mode 100644 index 00000000000..7d0335e0616 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-20.html @@ -0,0 +1,20 @@ + + + + + + + + + + +
+
HeJllo
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-6-ref.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-6-ref.html index e9e24dfc62c..3c26321fffc 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-6-ref.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-6-ref.html @@ -10,6 +10,7 @@ This test makes sure that the design system UI fonts don't work unless they are
HeJllo
HeJllo
HeJllo
+
HeJllo
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-6.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-6.html index 9a5fd418bda..f6a0f158b94 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-6.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-6.html @@ -22,6 +22,10 @@ font-family: "DotAppleSystemUIFontRounded"; src: local(".AppleSystemUIFontRounded"); } +@font-face { + font-family: "DotAppleSystemUIFont"; + src: local(".AppleSystemUIFont"); +} @@ -31,6 +35,7 @@ This test makes sure that the design system UI fonts don't work unless they are
HeJllo
HeJllo
HeJllo
+
HeJllo
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-7-ref.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-7-ref.html index 4dad37fed3d..0e2df68c1e2 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-7-ref.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-7-ref.html @@ -15,6 +15,10 @@ font-family: "AppleSystemUIRounded"; src: local("ui-rounded"); } +@font-face { + font-family: "AppleSystemUISansSerif"; + src: local("ui-sans-serif"); +} @font-face { font-family: "DotAppleSystemUIFontSerif"; src: local(".AppleSystemUIFontSerif"); @@ -31,6 +35,10 @@ font-family: "DotAppleSystemUIFontRounded"; src: local(".AppleSystemUIFontRounded"); } +@font-face { + font-family: "DotAppleSystemUIFont"; + src: local(".AppleSystemUIFont"); +} @@ -39,10 +47,12 @@ This test makes sure that the bold versions of the design system UI fonts work i
HeJllo
HeJllo
HeJllo
+
HeJllo
HeJllo
HeJllo
HeJllo
HeJllo
+
HeJllo
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-7.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-7.html index 68ebe0e04e6..11af83fc9e6 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-7.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-7.html @@ -18,6 +18,10 @@ font-family: "AppleSystemUIRounded"; src: local("ui-rounded"); } +@font-face { + font-family: "AppleSystemUISansSerif"; + src: local("ui-sans-serif"); +} @font-face { font-family: "DotAppleSystemUIFontSerif"; src: local(".AppleSystemUIFontSerif"); @@ -34,6 +38,10 @@ font-family: "DotAppleSystemUIFontRounded"; src: local(".AppleSystemUIFontRounded"); } +@font-face { + font-family: "DotAppleSystemUIFont"; + src: local(".AppleSystemUIFont"); +} @@ -42,10 +50,12 @@ This test makes sure that the bold versions of the design system UI fonts work i
HeJllo
HeJllo
HeJllo
+
HeJllo
HeJllo
HeJllo
HeJllo
HeJllo
+
HeJllo
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-ref.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-ref.html index e9e24dfc62c..3c26321fffc 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-ref.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family-ref.html @@ -10,6 +10,7 @@ This test makes sure that the design system UI fonts don't work unless they are
HeJllo
HeJllo
HeJllo
+
HeJllo
diff --git a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family.html b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family.html index 907a437207c..b093ad442e1 100644 --- a/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family.html +++ b/tests/wpt/web-platform-tests/css/css-fonts/standard-font-family.html @@ -13,6 +13,7 @@ This test makes sure that the design system UI fonts don't work unless they are
HeJllo
HeJllo
HeJllo
+
HeJllo
diff --git a/tests/wpt/web-platform-tests/css/css-lists/animations/list-style-image-interpolation.html b/tests/wpt/web-platform-tests/css/css-lists/animations/list-style-image-interpolation.html new file mode 100644 index 00000000000..b953d8c2215 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-lists/animations/list-style-image-interpolation.html @@ -0,0 +1,147 @@ + + +list-style-image interpolation + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-lists/resources/blue-20.png b/tests/wpt/web-platform-tests/css/css-lists/resources/blue-20.png new file mode 100644 index 00000000000..c464c75eeca Binary files /dev/null and b/tests/wpt/web-platform-tests/css/css-lists/resources/blue-20.png differ diff --git a/tests/wpt/web-platform-tests/css/css-lists/resources/green-20.png b/tests/wpt/web-platform-tests/css/css-lists/resources/green-20.png new file mode 100644 index 00000000000..738d1db8469 Binary files /dev/null and b/tests/wpt/web-platform-tests/css/css-lists/resources/green-20.png differ diff --git a/tests/wpt/web-platform-tests/css/css-lists/resources/stripes-20.png b/tests/wpt/web-platform-tests/css/css-lists/resources/stripes-20.png new file mode 100644 index 00000000000..de30887ea35 Binary files /dev/null and b/tests/wpt/web-platform-tests/css/css-lists/resources/stripes-20.png differ diff --git a/tests/wpt/web-platform-tests/css/css-masking/animations/mask-image-interpolation.html b/tests/wpt/web-platform-tests/css/css-masking/animations/mask-image-interpolation.html new file mode 100644 index 00000000000..beb9c9eaab0 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-masking/animations/mask-image-interpolation.html @@ -0,0 +1,180 @@ + + +mask-image-interpolation + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/css-masking/resources/blue-20.png b/tests/wpt/web-platform-tests/css/css-masking/resources/blue-20.png new file mode 100644 index 00000000000..c464c75eeca Binary files /dev/null and b/tests/wpt/web-platform-tests/css/css-masking/resources/blue-20.png differ diff --git a/tests/wpt/web-platform-tests/css/css-masking/resources/green-20.png b/tests/wpt/web-platform-tests/css/css-masking/resources/green-20.png new file mode 100644 index 00000000000..738d1db8469 Binary files /dev/null and b/tests/wpt/web-platform-tests/css/css-masking/resources/green-20.png differ diff --git a/tests/wpt/web-platform-tests/css/css-masking/resources/stripes-20.png b/tests/wpt/web-platform-tests/css/css-masking/resources/stripes-20.png new file mode 100644 index 00000000000..de30887ea35 Binary files /dev/null and b/tests/wpt/web-platform-tests/css/css-masking/resources/stripes-20.png differ diff --git a/tests/wpt/web-platform-tests/css/css-multicol/equal-gap-and-rule.html b/tests/wpt/web-platform-tests/css/css-multicol/equal-gap-and-rule.html new file mode 100644 index 00000000000..bf6d6b9cefa --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-multicol/equal-gap-and-rule.html @@ -0,0 +1,8 @@ + + + + +

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

+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-marker-ref.html b/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-marker-ref.html new file mode 100644 index 00000000000..8095d5ca015 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-marker-ref.html @@ -0,0 +1,28 @@ + + +CSS Reftest Reference + + +
    +
  1. 1. inside decimal
  2. +
  3. 2. inside string
  4. +
  5. 3. inside content
  6. +
+
    +
  1. outside decimal
  2. +
  3. outside string
  4. +
  5. outside content
  6. +
diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-marker.html b/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-marker.html new file mode 100644 index 00000000000..f0a994438f1 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-marker.html @@ -0,0 +1,32 @@ + + +Interaction of ::first-line and ::marker + + + + + + +
    +
  1. inside decimal
  2. +
  3. inside string
  4. +
  5. inside content
  6. +
+
    +
  1. outside decimal
  2. +
  3. outside string
  4. +
  5. outside content
  6. +
diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties.html b/tests/wpt/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties.html index 451aac149db..a34fd76fea4 100644 --- a/tests/wpt/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties.html +++ b/tests/wpt/web-platform-tests/css/css-pseudo/parsing/marker-supported-properties.html @@ -35,7 +35,7 @@ test_pseudo_computed_value("::marker", "font-weight", "900"); test_pseudo_computed_value("::marker", "color", "rgb(0, 100, 200)"); // ::marker supports `text-combine-upright`, `unicode-bidi` and `direction` -test_pseudo_computed_value("::marker", "text-combine-upright", "none"); +test_pseudo_computed_value("::marker", "text-combine-upright", "all"); test_pseudo_computed_value("::marker", "unicode-bidi", "plaintext"); test_pseudo_computed_value("::marker", "direction", "rtl"); diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-snap-stop-change.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-snap-stop-change.html index 0a73ff1206d..10e90d3cff4 100644 --- a/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-snap-stop-change.html +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/scroll-snap-stop-change.html @@ -8,20 +8,24 @@ div, html, body { margin: 0; padding: 0; } + html { scroll-snap-type: x mandatory; overflow: scroll; } + #scroller { scroll-snap-type: x mandatory; overflow: scroll; - height: 300px; - width: 300px; + height: 400px; + width: 400px; } + .large_space { width: 2000px; height: 2000px; } + .snap_area { scroll-snap-align: none start; width: 100px; @@ -29,13 +33,20 @@ html { background-color: blue; } + .snap_area:nth-child(1) { + margin-left: 0; +} + +.snap_area:nth-child(2) { margin-left: 100px; } -.snap_area:nth-child(2) { + +.snap_area:nth-child(3) { margin-left: 300px; } -.snap_area:nth-child(3) { + +.snap_area:nth-child(4) { margin-left: 500px; } @@ -44,11 +55,13 @@ html {
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/direction-rtl.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/direction-rtl.html new file mode 100644 index 00000000000..d10c013e1ee --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/direction-rtl.html @@ -0,0 +1,49 @@ + + + Scrollers should snap to the closest snap point on initial layout (using 'direction: rtl') + + + + + +
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/snap-after-initial-layout-ref.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/snap-after-initial-layout-ref.html new file mode 100644 index 00000000000..c8009b626cb --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/snap-after-initial-layout-ref.html @@ -0,0 +1,20 @@ + +Reference + + +
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-horizontal-tb.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-horizontal-tb.html new file mode 100644 index 00000000000..aa65dde1810 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-horizontal-tb.html @@ -0,0 +1,50 @@ + + + Scrollers should snap to the closest snap point on initial layout + (using 'writing-mode: horizontal-tb') + + + + + +
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-lr.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-lr.html new file mode 100644 index 00000000000..898e64be619 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-lr.html @@ -0,0 +1,50 @@ + + + Scrollers should snap to the closest snap point on initial layout + (using 'writing-mode: vertical-lr') + + + + + +
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-rl.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-rl.html new file mode 100644 index 00000000000..b3141f03f3c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-initial-layout/writing-mode-vertical-rl.html @@ -0,0 +1,53 @@ + + + Scrollers should snap to the closest snap point on initial layout + (using 'writing-mode: vertical-rl') + + + + + +
+
+
+
+
diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-only-snap-area.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-only-snap-area.html new file mode 100644 index 00000000000..53141707bb3 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-only-snap-area.html @@ -0,0 +1,55 @@ + + + Adding a new snap area when there are none should make the scroller snap to it. + + + + + + +
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-snap-area-while-snapped.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-snap-area-while-snapped.html new file mode 100644 index 00000000000..d26359658f4 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/adding-snap-area-while-snapped.html @@ -0,0 +1,66 @@ + + + Adding a new snap area while already snapped should not make the scroller snap to it. + + + + + + +
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/move-current-target.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/move-current-target.html new file mode 100644 index 00000000000..83c2c478bf5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/move-current-target.html @@ -0,0 +1,118 @@ + + + Moving the current snap target should make the scroller resnap to it. + + + + + + +
+
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/remove-current-target.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/remove-current-target.html new file mode 100644 index 00000000000..82bddf80748 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/remove-current-target.html @@ -0,0 +1,65 @@ + + + Removing the current snap target should make the scroller snap to a new target. + + + + + + +
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/snap-to-different-targets.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/snap-to-different-targets.html new file mode 100644 index 00000000000..6ceab295e4c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-after-relayout/snap-to-different-targets.html @@ -0,0 +1,92 @@ + + + The scroller should try to resnap to targets for both axes if possible. + + + + + + +
+
+
+
+
+
+
+ + diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-area-caputring-add-scroll-container.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-area-capturing-add-scroll-container.html similarity index 92% rename from tests/wpt/web-platform-tests/css/css-scroll-snap/snap-area-caputring-add-scroll-container.html rename to tests/wpt/web-platform-tests/css/css-scroll-snap/snap-area-capturing-add-scroll-container.html index d0453676392..15f44ed8b7b 100644 --- a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-area-caputring-add-scroll-container.html +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-area-capturing-add-scroll-container.html @@ -89,7 +89,7 @@ const document_scroller = document.scrollingElement; test(() => { // Confirm that the document-level scroller is the snap container for all of // the snap areas. - document_scroller.scrollBy(0, 10); + document_scroller.scrollTo(0, 10); assert_equals(document_scroller.scrollTop, 500); // Snaps to the inner snap area. document_scroller.scrollBy(0, 75); @@ -121,9 +121,13 @@ test(() => { // Test that attaching a new snap container also properly assigns snap areas. test(() => { + // All containers should capture snap areas. + middle_scroller.style.setProperty("overflow", "scroll"); + inner_scroller.style.setProperty("overflow", "scroll"); + // Sanity check that the scrollers still snap to the snap areas. - document_scroller.scrollBy(0, 10); - inner_scroller.scrollBy(0,10); + document_scroller.scrollTo(0, 10); + inner_scroller.scrollTo(0,10); assert_equals(inner_scroller.scrollTop, 300); assert_equals(document_scroller.scrollTop, 500); @@ -142,7 +146,7 @@ test(() => { assert_equals(document_scroller.scrollTop, 400); // Inserted scroller snaps. - inserted_scroller.scrollBy(0, 10); + inserted_scroller.scrollTo(0, 10); assert_equals(inserted_scroller.scrollTop, 500); }, "Attaching a new element that is scrollable should assign the correct snap\ areas to it."); diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-area-capturing-remove-scroll-container.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-area-capturing-remove-scroll-container.html index 9b824071599..d3750abdd7e 100644 --- a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-area-capturing-remove-scroll-container.html +++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-area-capturing-remove-scroll-container.html @@ -80,16 +80,14 @@ test(() => { const middle_scroller = document.getElementById("middle-scroller"); const document_scroller = document.scrollingElement; + // Inner scroller should snap to its captured area. // Middle scroller doesn't snap. // Document scroller should snap to its only captured area. - document_scroller.scrollBy(0, 100); + inner_scroller.scrollBy(0,10); middle_scroller.scrollBy(0, 10); - assert_equals(inner_scroller.scrollTop, 0); - assert_equals(middle_scroller.scrollTop, 10); - assert_equals(document_scroller.scrollTop, 500); - - // Inner scroller snaps. - inner_scroller.scrollBy(0, 10); + // Scroll to (0,600), where we would expect the inner snap area to be relative + // to the document scroller. + document_scroller.scrollTo(0, 600); assert_equals(inner_scroller.scrollTop, 300); assert_equals(middle_scroller.scrollTop, 10); assert_equals(document_scroller.scrollTop, 500); diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-001-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-001-ref.html deleted file mode 100644 index d4f0281ae48..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-001-ref.html +++ /dev/null @@ -1,14 +0,0 @@ - - -CSS intrinsic-size: unsized div - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-001.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-001.html deleted file mode 100644 index 4d17602a95f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-001.html +++ /dev/null @@ -1,16 +0,0 @@ - - -CSS intrinsic-size: unsized div - - - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-002-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-002-ref.html deleted file mode 100644 index ab847fc36e5..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-002-ref.html +++ /dev/null @@ -1,21 +0,0 @@ - - -CSS intrinsic-size: div with max-content parent - - - - - -
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-002.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-002.html deleted file mode 100644 index 55f20949412..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-002.html +++ /dev/null @@ -1,22 +0,0 @@ - - -CSS intrinsic-size: div with max-content parent - - - - - - - -
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-003-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-003-ref.html deleted file mode 100644 index 6a2d0514989..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-003-ref.html +++ /dev/null @@ -1,15 +0,0 @@ - - -CSS intrinsic-size: width specified - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-003.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-003.html deleted file mode 100644 index 3dd41ba1d2c..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-003.html +++ /dev/null @@ -1,17 +0,0 @@ - - -CSS intrinsic-size: width specified - - - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-004-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-004-ref.html deleted file mode 100644 index 6e710943de9..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-004-ref.html +++ /dev/null @@ -1,15 +0,0 @@ - - -CSS intrinsic-size: width is min-content - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-004.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-004.html deleted file mode 100644 index 9cce7ae25fc..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-004.html +++ /dev/null @@ -1,17 +0,0 @@ - - -CSS intrinsic-size: width is min-content - - - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-005-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-005-ref.html deleted file mode 100644 index 950f7190cac..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-005-ref.html +++ /dev/null @@ -1,15 +0,0 @@ - - -CSS intrinsic-size: width is max-content - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-005.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-005.html deleted file mode 100644 index 92b777d22e0..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-005.html +++ /dev/null @@ -1,17 +0,0 @@ - - -CSS intrinsic-size: width is max-content - - - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-006-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-006-ref.html deleted file mode 100644 index d545093e2db..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-006-ref.html +++ /dev/null @@ -1,16 +0,0 @@ - - -CSS intrinsic-size: unsized div, intrinsic-size is small - - - - - -
Lorem ipsum
- diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-006.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-006.html deleted file mode 100644 index 82c6e8eef85..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-006.html +++ /dev/null @@ -1,16 +0,0 @@ - - -CSS intrinsic-size: unsized div, intrinsic-size is small - - - - - - - -
Lorem ipsum
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-007-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-007-ref.html deleted file mode 100644 index 6b3f63685ac..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-007-ref.html +++ /dev/null @@ -1,27 +0,0 @@ - - -CSS intrinsic-size: div with border - - - - - -
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-007.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-007.html deleted file mode 100644 index 85fcae6cd91..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-007.html +++ /dev/null @@ -1,26 +0,0 @@ - - -CSS intrinsic-size: div with border - - - - - - - -
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-008-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-008-ref.html deleted file mode 100644 index 5c6186fd48c..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-008-ref.html +++ /dev/null @@ -1,37 +0,0 @@ - - -CSS intrinsic-size: writing modes - - - - - -
Lorem
-
Ipsum
-
Dolor
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-008.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-008.html deleted file mode 100644 index f3b344f6b0a..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-008.html +++ /dev/null @@ -1,37 +0,0 @@ - - -CSS intrinsic-size: writing modes - - - - - - - -
Lorem
-
Ipsum
-
Dolor
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-009-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-009-ref.html deleted file mode 100644 index 223e0c8a33a..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-009-ref.html +++ /dev/null @@ -1,23 +0,0 @@ - - -CSS intrinsic-size: select multiple - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-009.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-009.html deleted file mode 100644 index 06a02fe78bd..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-009.html +++ /dev/null @@ -1,23 +0,0 @@ - - -CSS intrinsic-size: select multiple - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-010-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-010-ref.html deleted file mode 100644 index eaaa0977f13..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-010-ref.html +++ /dev/null @@ -1,39 +0,0 @@ - - -CSS intrinsic-size: flex row - - - - - -
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-010.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-010.html deleted file mode 100644 index eea76ffb073..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-010.html +++ /dev/null @@ -1,40 +0,0 @@ - - -CSS intrinsic-size: flex row - - - - - - - -
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-011-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-011-ref.html deleted file mode 100644 index 29d1f4e2d1a..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-011-ref.html +++ /dev/null @@ -1,39 +0,0 @@ - - -CSS intrinsic-size: flex column - - - - - -
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-011.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-011.html deleted file mode 100644 index c7888f906f8..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-011.html +++ /dev/null @@ -1,40 +0,0 @@ - - -CSS intrinsic-size: flex column - - - - - - - -
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-012-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-012-ref.html deleted file mode 100644 index ed9857aa256..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-012-ref.html +++ /dev/null @@ -1,14 +0,0 @@ - - -CSS intrinsic-size: replaced content - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-012.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-012.html deleted file mode 100644 index 889b07ace92..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-012.html +++ /dev/null @@ -1,15 +0,0 @@ - - -CSS intrinsic-size: replaced content - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-013-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-013-ref.html deleted file mode 100644 index 9f8334c03d5..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-013-ref.html +++ /dev/null @@ -1,18 +0,0 @@ - - -CSS intrinsic-size: intrinsic-size changes - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-013.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-013.html deleted file mode 100644 index 1082100012f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-013.html +++ /dev/null @@ -1,32 +0,0 @@ - - - -CSS intrinsic-size: intrinsic-size changes. - - - - - - - - -
- - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-014-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-014-ref.html deleted file mode 100644 index 66c10824893..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-014-ref.html +++ /dev/null @@ -1,18 +0,0 @@ - - -CSS intrinsic-size: fieldset - - - - - -
- This is a legend - This is some content. -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-014.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-014.html deleted file mode 100644 index 4dd45a2da40..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-014.html +++ /dev/null @@ -1,19 +0,0 @@ - - -CSS intrinsic-size: fieldset - - - - - - - -
- This is a legend - This is some content. -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-015-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-015-ref.html deleted file mode 100644 index ae65a3b5ca5..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-015-ref.html +++ /dev/null @@ -1,16 +0,0 @@ - - -CSS intrinsic-size: inline flex - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-015.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-015.html deleted file mode 100644 index 5ca5e49992e..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-015.html +++ /dev/null @@ -1,17 +0,0 @@ - - -CSS intrinsic-size: inline flex - - - - - - -
test
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-016-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-016-ref.html deleted file mode 100644 index f80510f6306..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-016-ref.html +++ /dev/null @@ -1,39 +0,0 @@ - - -CSS intrinsic-size: flex row, items with size containment (ref) - - - - - -
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-016.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-016.html deleted file mode 100644 index ce6ac5c56e4..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-016.html +++ /dev/null @@ -1,41 +0,0 @@ - - -CSS intrinsic-size: flex row, items with size containment - - - - - - - -
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-017-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-017-ref.html deleted file mode 100644 index 553451a7075..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-017-ref.html +++ /dev/null @@ -1,17 +0,0 @@ - - -CSS intrinsic-size: replaced content (vertical-lr) - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-017.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-017.html deleted file mode 100644 index 5e2122f34ec..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-017.html +++ /dev/null @@ -1,20 +0,0 @@ - - -CSS intrinsic-size: replaced content (vertical-lr) - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-018-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-018-ref.html deleted file mode 100644 index 17261caa8af..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-018-ref.html +++ /dev/null @@ -1,15 +0,0 @@ - - -CSS intrinsic-size: sized div - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-018.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-018.html deleted file mode 100644 index 68931834d63..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-018.html +++ /dev/null @@ -1,18 +0,0 @@ - - -CSS intrinsic-size: sized div - - - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-019-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-019-ref.html deleted file mode 100644 index 8e55d7b02f9..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-019-ref.html +++ /dev/null @@ -1,15 +0,0 @@ - - -CSS intrinsic-size: div with fit-content width - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-019.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-019.html deleted file mode 100644 index cae8e0739fe..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-019.html +++ /dev/null @@ -1,17 +0,0 @@ - - -CSS intrinsic-size: div with fit-content width - - - - - - - -
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-020-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-020-ref.html deleted file mode 100644 index 1ee5ba8376d..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-020-ref.html +++ /dev/null @@ -1,14 +0,0 @@ - - -CSS intrinsic-size: replaced content (min-content) - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-020.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-020.html deleted file mode 100644 index a7286ce1054..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-020.html +++ /dev/null @@ -1,17 +0,0 @@ - - -CSS intrinsic-size: replaced content (min-content) - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-021-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-021-ref.html deleted file mode 100644 index 35db43fcf44..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-021-ref.html +++ /dev/null @@ -1,41 +0,0 @@ - - -CSS intrinsic-size: flex row, flex height based on children - - - - - -
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-021.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-021.html deleted file mode 100644 index 04591924f65..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-021.html +++ /dev/null @@ -1,39 +0,0 @@ - - -CSS intrinsic-size: flex row, flex height based on children - - - - - - - -
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-022-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-022-ref.html deleted file mode 100644 index b0df1992834..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-022-ref.html +++ /dev/null @@ -1,30 +0,0 @@ - - -CSS intrinsic-size: grid definite size - - - - - -
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-022.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-022.html deleted file mode 100644 index 3593b9cce38..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-022.html +++ /dev/null @@ -1,31 +0,0 @@ - - -CSS intrinsic-size: grid definite size - - - - - - - -
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-023-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-023-ref.html deleted file mode 100644 index 800e4ae7064..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-023-ref.html +++ /dev/null @@ -1,29 +0,0 @@ - - -CSS intrinsic-size: grid indefinite size - - - - - -
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-023.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-023.html deleted file mode 100644 index c64ef66a03f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-023.html +++ /dev/null @@ -1,30 +0,0 @@ - - -CSS intrinsic-size: grid indefinite size - - - - - - - -
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-024-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-024-ref.html deleted file mode 100644 index 02ec85a0084..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-024-ref.html +++ /dev/null @@ -1,30 +0,0 @@ - - -CSS intrinsic-size: grid definite size, large size - - - - - -
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-024.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-024.html deleted file mode 100644 index b11317d96b0..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-024.html +++ /dev/null @@ -1,31 +0,0 @@ - - -CSS intrinsic-size: grid definite size, large size - - - - - - - -
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-025-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-025-ref.html deleted file mode 100644 index 60d5cc9cd9a..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-025-ref.html +++ /dev/null @@ -1,56 +0,0 @@ - - -CSS intrinsic-size: grid indefinite size, auto-fit - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-025.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-025.html deleted file mode 100644 index ab9c56fc528..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-025.html +++ /dev/null @@ -1,57 +0,0 @@ - - -CSS intrinsic-size: grid indefinite size, auto-fit - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-026-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-026-ref.html deleted file mode 100644 index 2e456b43422..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-026-ref.html +++ /dev/null @@ -1,53 +0,0 @@ - - -CSS intrinsic-size: grid auto-fit, min- max- size interactions - - - - - -

min-width larger than intrinsic-width: -

-
one
-
two
-
- -

min-width smaller than intrinsic-width: -

-
one
-
two
-
- -

max-width ignored since min-width is larger: -

-
one
-
two
-
- -

min-width shrinks grid since it overrides intrinsic-width: -

-
one
-
two
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-026.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-026.html deleted file mode 100644 index 100f542b783..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-026.html +++ /dev/null @@ -1,61 +0,0 @@ - - -CSS intrinsic-size: grid auto-fit, min- max- size interactions - - - - - - - -

min-width larger than intrinsic-width: -

-
one
-
two
-
- -

min-width smaller than intrinsic-width: -

-
one
-
two
-
- -

max-width ignored since min-width is larger: -

-
one
-
two
-
- -

min-width shrinks grid since it overrides intrinsic-width: -

-
one
-
two
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-001-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-001-ref.html deleted file mode 100644 index 99e86d0c38f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-001-ref.html +++ /dev/null @@ -1,37 +0,0 @@ - - -CSS intrinsic-size: intrinsic-width auto - - - - - -
-
-
-
-
Lorem ipsum
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-001.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-001.html deleted file mode 100644 index 9c2dac07da2..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-001.html +++ /dev/null @@ -1,34 +0,0 @@ - - -CSS intrinsic-size: intrinsic-width auto - - - - - - - -
Lorem ipsum
-
-
Lorem ipsum
-
-
Lorem ipsum
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-002-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-002-ref.html deleted file mode 100644 index 70a245469b7..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-002-ref.html +++ /dev/null @@ -1,30 +0,0 @@ - - -CSS intrinsic-size: intrinsic-width auto - - - - - -
-
-
-
-
Lorem ipsum
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-002.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-002.html deleted file mode 100644 index 5b3902455bd..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-002.html +++ /dev/null @@ -1,34 +0,0 @@ - - -CSS intrinsic-size: intrinsic-width auto - - - - - - - -
Lorem ipsum
-
-
Lorem ipsum
-
-
Lorem ipsum
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-003-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-003-ref.html deleted file mode 100644 index 246a5bad51e..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-003-ref.html +++ /dev/null @@ -1,37 +0,0 @@ - - -CSS intrinsic-size: replaced content with auto - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-003.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-003.html deleted file mode 100644 index 07ec0326787..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-auto-003.html +++ /dev/null @@ -1,32 +0,0 @@ - - -CSS intrinsic-size: replaced content with auto - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-001-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-001-ref.html deleted file mode 100644 index 39c6abdcf8e..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-001-ref.html +++ /dev/null @@ -1,15 +0,0 @@ - - -CSS intrinsic-size: intrinsic-width legacy - - - - - -
Lorem ipsum
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-001.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-001.html deleted file mode 100644 index df662e5c7f1..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-001.html +++ /dev/null @@ -1,17 +0,0 @@ - - -CSS intrinsic-size: intrinsic-width legacy - - - - - - - -
Lorem ipsum
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-002-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-002-ref.html deleted file mode 100644 index 535915a7a7b..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-002-ref.html +++ /dev/null @@ -1,41 +0,0 @@ - - -CSS intrinsic-size: flex with legacy intrinsic dimensions - - - - - -
-
Lorem ipsum
-
dolor sit amet
-
consectetur adipiscing elit
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-002.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-002.html deleted file mode 100644 index 66d008ce6ce..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-002.html +++ /dev/null @@ -1,39 +0,0 @@ - - -CSS intrinsic-size: flex with legacy intrinsic dimensions - - - - - - - -
-
Lorem ipsum
-
dolor sit amet
-
consectetur adipiscing elit
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-003-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-003-ref.html deleted file mode 100644 index eb6394fe284..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-003-ref.html +++ /dev/null @@ -1,20 +0,0 @@ - - -CSS intrinsic-size: select multiple with legacy sizing - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-003.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-003.html deleted file mode 100644 index 90e4f53bf64..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-003.html +++ /dev/null @@ -1,20 +0,0 @@ - - -CSS intrinsic-size: select multiple with legacy sizing - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-004-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-004-ref.html deleted file mode 100644 index d5e7c9ff9bb..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-004-ref.html +++ /dev/null @@ -1,25 +0,0 @@ - - -CSS intrinsic-size: replaced content with legacy - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-004.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-004.html deleted file mode 100644 index dfeed45d73b..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-004.html +++ /dev/null @@ -1,22 +0,0 @@ - - -CSS intrinsic-size: replaced content with legacy - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-005-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-005-ref.html deleted file mode 100644 index c23984f5f1a..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-005-ref.html +++ /dev/null @@ -1,36 +0,0 @@ - - -CSS intrinsic-size: grid definite size with legacy - - - - - -
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-005.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-005.html deleted file mode 100644 index baf9bef3aca..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-005.html +++ /dev/null @@ -1,44 +0,0 @@ - - -CSS intrinsic-size: grid definite size with legacy - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-006-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-006-ref.html deleted file mode 100644 index 9b9e25d3c8d..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-006-ref.html +++ /dev/null @@ -1,35 +0,0 @@ - - -CSS intrinsic-size: grid indefinite size with legacy - - - - - -
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-006.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-006.html deleted file mode 100644 index 41ef1fddc19..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-006.html +++ /dev/null @@ -1,43 +0,0 @@ - - -CSS intrinsic-size: grid indefinite size with legacy - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-007-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-007-ref.html deleted file mode 100644 index 6894b4643ad..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-007-ref.html +++ /dev/null @@ -1,35 +0,0 @@ - - -CSS intrinsic-size: grid definite size, large size with legacy - - - - - -
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-007.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-007.html deleted file mode 100644 index df2c57b5d8a..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-007.html +++ /dev/null @@ -1,43 +0,0 @@ - - -CSS intrinsic-size: grid definite size, large size with legacy - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-008-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-008-ref.html deleted file mode 100644 index 5cce1902759..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-008-ref.html +++ /dev/null @@ -1,80 +0,0 @@ - - -CSS intrinsic-size: grid indefinite size, auto-fit with legacy - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-008.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-008.html deleted file mode 100644 index 45b8fbdd244..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/intrinsic-size-with-legacy-008.html +++ /dev/null @@ -1,87 +0,0 @@ - - -CSS intrinsic-size: grid indefinite size, auto-fit with legacy - - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-block-size-computed.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-block-size-computed.html deleted file mode 100644 index e9a073ca2aa..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-block-size-computed.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-block-size with computed values - - - - - - - - -
-
- - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-block-size-invalid.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-block-size-invalid.html deleted file mode 100644 index 1b6cba20f88..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-block-size-invalid.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-block-size with invalid values - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-block-size-valid.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-block-size-valid.html deleted file mode 100644 index b34c73b230f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-block-size-valid.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-block-size with valid values - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-height-computed.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-height-computed.html deleted file mode 100644 index 6f95274c637..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-height-computed.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-height with computed values - - - - - - - - -
-
- - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-height-invalid.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-height-invalid.html deleted file mode 100644 index 1f801124a2b..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-height-invalid.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-height with invalid values - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-height-valid.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-height-valid.html deleted file mode 100644 index e4614762118..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-height-valid.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-height with valid values - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-inline-size-computed.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-inline-size-computed.html deleted file mode 100644 index c53a77e5631..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-inline-size-computed.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-inline-size with computed values - - - - - - - - -
-
- - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-inline-size-invalid.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-inline-size-invalid.html deleted file mode 100644 index 6ad224d11d3..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-inline-size-invalid.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-inline-size with invalid values - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-inline-size-valid.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-inline-size-valid.html deleted file mode 100644 index ad5aef95dca..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-inline-size-valid.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-inline-size with valid values - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-computed.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-computed.html deleted file mode 100644 index 29be33d4a3d..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-computed.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-size with computed values - - - - - - - - -
-
- - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-invalid.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-invalid.html deleted file mode 100644 index b4cb2dbffd2..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-invalid.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-size with invalid values - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-sets-computed-dimensions.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-sets-computed-dimensions.html deleted file mode 100644 index e70c3179223..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-sets-computed-dimensions.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-size sets component dimensions. - - - - - - - - - -
-
- - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-valid.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-valid.html deleted file mode 100644 index 7ab13c7d798..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-size-valid.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-size with valid values - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-width-computed.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-width-computed.html deleted file mode 100644 index 08602e5347f..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-width-computed.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-width with computed values - - - - - - - - -
-
- - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-width-invalid.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-width-invalid.html deleted file mode 100644 index b89f6567ae2..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-width-invalid.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-width with invalid values - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-width-valid.html b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-width-valid.html deleted file mode 100644 index e2d23eabe5d..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/parsing/intrinsic-width-valid.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - -CSS Intrinsic Size Test: intrinsic-width with valid values - - - - - - - - - - - - diff --git a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/resources/dice.png b/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/resources/dice.png deleted file mode 100644 index c82d01517cd..00000000000 Binary files a/tests/wpt/web-platform-tests/css/css-sizing/intrinsic-size/resources/dice.png and /dev/null differ diff --git a/tests/wpt/web-platform-tests/css/css-sizing/percentage-resolution-001-ref.html b/tests/wpt/web-platform-tests/css/css-sizing/percentage-resolution-001-ref.html deleted file mode 100644 index a4e7f1ece46..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/percentage-resolution-001-ref.html +++ /dev/null @@ -1,16 +0,0 @@ - - -CSS Sizing: Test that percentages don't resolve against min-content - - - - - -
-
This should be a single-line green background with no red visible.
-
- diff --git a/tests/wpt/web-platform-tests/css/css-sizing/percentage-resolution-001.html b/tests/wpt/web-platform-tests/css/css-sizing/percentage-resolution-001.html deleted file mode 100644 index b2cc727ca7a..00000000000 --- a/tests/wpt/web-platform-tests/css/css-sizing/percentage-resolution-001.html +++ /dev/null @@ -1,26 +0,0 @@ - - -CSS Sizing: Test that percentages don't resolve against min-content - - - - - - - -
-
This should be a single-line green background with no red visible.
-
- diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-overflow-001.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-overflow-001.html index 4154e5e1181..948b728254a 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-overflow-001.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/hyphens-overflow-001.html @@ -9,7 +9,6 @@ div { font-size: 10px; font-family: Ahem; width: 5.1ch; - border: 1px solid blue; } @@ -19,7 +18,4 @@ div {
1234­xx
12345­xx
123456­xx
- -
ren­for­cer99999
-
00­1222
diff --git a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-overflow-001-ref.html b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-overflow-001-ref.html index db002ce45d8..08d521d3396 100644 --- a/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-overflow-001-ref.html +++ b/tests/wpt/web-platform-tests/css/css-text/hyphens/reference/hyphens-overflow-001-ref.html @@ -4,8 +4,6 @@ div { font-size: 10px; font-family: Ahem; - width: 5.1ch; - border: 1px solid blue; } @@ -15,7 +13,4 @@ div {
1234-
xx
12345-
xx
123456-
xx
- -
renfor-
cer99999
-
00-
1222
diff --git a/tests/wpt/web-platform-tests/css/css-values/animations/calc-interpolation.html b/tests/wpt/web-platform-tests/css/css-values/animations/calc-interpolation.html new file mode 100644 index 00000000000..de76386e0da --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-values/animations/calc-interpolation.html @@ -0,0 +1,97 @@ + + +calc interpolation + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js b/tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js index 3c9754c6941..d1cb7cfbeb0 100644 --- a/tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js +++ b/tests/wpt/web-platform-tests/css/support/interpolation-testcommon.js @@ -18,6 +18,7 @@ var cssAnimationsInterpolation = { name: 'CSS Animations', + isSupported: function() {return true;}, supportsProperty: function() {return true;}, supportsValue: function() {return true;}, setup: function() {}, @@ -43,6 +44,7 @@ var cssTransitionsInterpolation = { name: 'CSS Transitions', + isSupported: function() {return true;}, supportsProperty: function() {return true;}, supportsValue: function() {return true;}, setup: function(property, from, target) { @@ -64,6 +66,7 @@ var cssTransitionAllInterpolation = { name: 'CSS Transitions with transition: all', + isSupported: function() {return true;}, // The 'all' value doesn't cover custom properties. supportsProperty: function(property) {return property.indexOf('--') !== 0;}, supportsValue: function() {return true;}, @@ -86,6 +89,7 @@ var webAnimationsInterpolation = { name: 'Web Animations', + isSupported: function() {return 'animate' in Element.prototype;}, supportsProperty: function(property) {return true;}, supportsValue: function(value) {return value !== '';}, setup: function() {}, @@ -96,6 +100,10 @@ this.interpolateComposite(property, from, 'replace', to, 'replace', at, target); }, interpolateComposite: function(property, from, fromComposite, to, toComposite, at, target) { + // This case turns into a test error later on. + if (!this.isSupported()) + return; + // Convert standard properties to camelCase. if (!property.startsWith('--')) { for (var i = property.length - 2; i > 0; --i) { @@ -272,6 +280,8 @@ target.measure = function() { var expectedValue = getComputedStyle(expectedTargetContainer.target).getPropertyValue(property); test(function() { + assert_true(interpolationMethod.isSupported(), `${interpolationMethod.name} should be supported`); + if (from && from !== neutralKeyframe) { assert_true(CSS.supports(property, from), '\'from\' value should be supported'); } diff --git a/tests/wpt/web-platform-tests/docs/writing-tests/reftests.md b/tests/wpt/web-platform-tests/docs/writing-tests/reftests.md index 845d6f8dc4f..6dbe3a1aa9d 100644 --- a/tests/wpt/web-platform-tests/docs/writing-tests/reftests.md +++ b/tests/wpt/web-platform-tests/docs/writing-tests/reftests.md @@ -96,16 +96,31 @@ leaf nodes.) ## Controlling When Comparison Occurs -By default reftest screenshots are taken after the `load` event has -fired, and web fonts (if any) are loaded. In some cases it is -necessary to delay the screenshot later than this, for example because -some DOM manipulation is required to set up the desired test -conditions. To enable this, the test may have a `class="reftest-wait"` -attribute specified on the root element. This will cause the -screenshot to be delayed until the `load` event has fired and the -`reftest-wait` class has been removed from the root element. Note that -in neither case is exact timing of the screenshot guaranteed: it is -only guaranteed to be after those events. +By default, reftest screenshots are taken after the following +conditions are met: + +* The `load` event has fired +* Web fonts (if any) are loaded +* Pending paints have completed + +In some cases it is necessary to delay the screenshot later than this, +for example because some DOM manipulation is required to set up the +desired test conditions. To enable this, the test may have a +`class="reftest-wait"` attribute specified on the root element. In +this case the harness will run the following sequence of steps: + +* Wait for the `load` event to fire and fonts to load. +* Wait for pending paints to complete. +* Fire an event named `TestRendered` at the root element, with the + `bubbles` attribute set to true. +* Wait for the `reftest-wait` class to be removed from the root + element. +* Wait for pending paints to complete. +* Screenshot the viewport. + +The `TestRendered` event provides a hook for tests to make +modifications to the test document that are not batched into the +initial layout/paint. ## Fuzzy Matching diff --git a/tests/wpt/web-platform-tests/document-policy/echo-policy-nested.html b/tests/wpt/web-platform-tests/document-policy/echo-policy-nested.html new file mode 100644 index 00000000000..d572dcb0465 --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/echo-policy-nested.html @@ -0,0 +1,32 @@ + + + diff --git a/tests/wpt/web-platform-tests/document-policy/echo-policy-nested.html.headers b/tests/wpt/web-platform-tests/document-policy/echo-policy-nested.html.headers new file mode 100644 index 00000000000..fe839ef5bb6 --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/echo-policy-nested.html.headers @@ -0,0 +1 @@ +Document-Policy: unoptimized-lossless-images;bpp=0.0 diff --git a/tests/wpt/web-platform-tests/document-policy/echo-policy.py b/tests/wpt/web-platform-tests/document-policy/echo-policy.py new file mode 100644 index 00000000000..52a2bf97124 --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/echo-policy.py @@ -0,0 +1,28 @@ +# This will echo the 'Sec-Required-Document-Policy' request header in the body +# of the response, as well as in the 'Document-Policy' response header (to +# ensure the response is loaded by a user agent which is implementing document +# policy.) +import json + +def main(request, response): + msg = {} + headers = [('Content-Type', 'text/html')] + + srdp = request.headers.get('Sec-Required-Document-Policy') + if srdp: + msg['requiredPolicy'] = srdp + headers.append(('Document-Policy', srdp)) + + frameId = request.GET.first('id',None) + if frameId: + msg['id'] = frameId + + content = """ + +%s +""" % (json.dumps(msg), srdp) + + return (200, 'OK'), headers, content + diff --git a/tests/wpt/web-platform-tests/document-policy/required-policy/document-policy.html b/tests/wpt/web-platform-tests/document-policy/required-policy/document-policy.html new file mode 100644 index 00000000000..d6bf3e9a6d4 --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/required-policy/document-policy.html @@ -0,0 +1,54 @@ + + + + Test advertised required document policy + + + +

Test advertised required document policy

+ + + diff --git a/tests/wpt/web-platform-tests/document-policy/required-policy/document-policy.html.headers b/tests/wpt/web-platform-tests/document-policy/required-policy/document-policy.html.headers new file mode 100644 index 00000000000..d321c265d15 --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/required-policy/document-policy.html.headers @@ -0,0 +1 @@ +Document-Policy: unoptimized-lossless-images;bpp=1.1 diff --git a/tests/wpt/web-platform-tests/document-policy/required-policy/no-document-policy.html b/tests/wpt/web-platform-tests/document-policy/required-policy/no-document-policy.html new file mode 100644 index 00000000000..9af2e51c2ac --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/required-policy/no-document-policy.html @@ -0,0 +1,44 @@ + + + + Test advertised required document policy + + + +

Test advertised required document policy

+ + + diff --git a/tests/wpt/web-platform-tests/document-policy/required-policy/required-document-policy-nested.html b/tests/wpt/web-platform-tests/document-policy/required-policy/required-document-policy-nested.html new file mode 100644 index 00000000000..39e2a92f773 --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/required-policy/required-document-policy-nested.html @@ -0,0 +1,65 @@ + + + + Test advertised required document policy + + + +

Test advertised required document policy

+ + + diff --git a/tests/wpt/web-platform-tests/document-policy/required-policy/required-document-policy.html b/tests/wpt/web-platform-tests/document-policy/required-policy/required-document-policy.html new file mode 100644 index 00000000000..12cebdd292a --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/required-policy/required-document-policy.html @@ -0,0 +1,65 @@ + + + + Test advertised required document policy + + + +

Test advertised required document policy

+ + + diff --git a/tests/wpt/web-platform-tests/document-policy/required-policy/required-document-policy.html.headers b/tests/wpt/web-platform-tests/document-policy/required-policy/required-document-policy.html.headers new file mode 100644 index 00000000000..066c0f8339e --- /dev/null +++ b/tests/wpt/web-platform-tests/document-policy/required-policy/required-document-policy.html.headers @@ -0,0 +1 @@ +Required-Document-Policy: unoptimized-lossless-images;bpp=1.1 diff --git a/tests/wpt/web-platform-tests/dom/events/Event-dispatch-redispatch.html b/tests/wpt/web-platform-tests/dom/events/Event-dispatch-redispatch.html index 4027587bff4..dc180c61567 100644 --- a/tests/wpt/web-platform-tests/dom/events/Event-dispatch-redispatch.html +++ b/tests/wpt/web-platform-tests/dom/events/Event-dispatch-redispatch.html @@ -3,26 +3,128 @@ EventTarget#dispatchEvent(): redispatching a native event + + + +
diff --git a/tests/wpt/web-platform-tests/fetch/api/cors/cors-preflight-redirect.any.js b/tests/wpt/web-platform-tests/fetch/api/cors/cors-preflight-redirect.any.js index 5d4de7ebaad..ade38e9ac7b 100644 --- a/tests/wpt/web-platform-tests/fetch/api/cors/cors-preflight-redirect.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/cors/cors-preflight-redirect.any.js @@ -18,7 +18,7 @@ function corsPreflightRedirect(desc, redirectUrl, redirectLocation, redirectStat urlParameters += "&allow_headers=x-force-preflight"; promise_test(function(test) { - fetch(RESOURCES_DIR + "clean-stash.py?token=" + uuid_token).then(function(resp) { + return fetch(RESOURCES_DIR + "clean-stash.py?token=" + uuid_token).then(function(resp) { assert_equals(resp.status, 200, "Clean stash response's status is 200"); return promise_rejects(test, new TypeError(), fetch(url + urlParameters, requestInit)); }); diff --git a/tests/wpt/web-platform-tests/fetch/api/idlharness.any.js b/tests/wpt/web-platform-tests/fetch/api/idlharness.any.js index ccd4d2c0b46..7b3c694e16a 100644 --- a/tests/wpt/web-platform-tests/fetch/api/idlharness.any.js +++ b/tests/wpt/web-platform-tests/fetch/api/idlharness.any.js @@ -1,6 +1,7 @@ // META: global=window,worker // META: script=/resources/WebIDLParser.js // META: script=/resources/idlharness.js +// META: timeout=long idl_test( ['fetch'], diff --git a/tests/wpt/web-platform-tests/fetch/metadata/appcache.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/metadata/appcache.tentative.https.sub.html index 8912548ab1c..5e35472fcfd 100644 --- a/tests/wpt/web-platform-tests/fetch/metadata/appcache.tentative.https.sub.html +++ b/tests/wpt/web-platform-tests/fetch/metadata/appcache.tentative.https.sub.html @@ -8,16 +8,27 @@ diff --git a/tests/wpt/web-platform-tests/fetch/metadata/navigation.https.sub.html b/tests/wpt/web-platform-tests/fetch/metadata/navigation.tentative.https.sub.html similarity index 100% rename from tests/wpt/web-platform-tests/fetch/metadata/navigation.https.sub.html rename to tests/wpt/web-platform-tests/fetch/metadata/navigation.tentative.https.sub.html diff --git a/tests/wpt/web-platform-tests/fetch/metadata/redirect/multiple-redirect-https-downgrade-upgrade-prefetch.optional.tentative.sub.html b/tests/wpt/web-platform-tests/fetch/metadata/redirect/multiple-redirect-https-downgrade-upgrade-prefetch.optional.tentative.sub.html new file mode 100644 index 00000000000..e2715a65854 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/metadata/redirect/multiple-redirect-https-downgrade-upgrade-prefetch.optional.tentative.sub.html @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/fetch/metadata/redirect/redirect-http-upgrade-prefetch.optional.tentative.sub.html b/tests/wpt/web-platform-tests/fetch/metadata/redirect/redirect-http-upgrade-prefetch.optional.tentative.sub.html new file mode 100644 index 00000000000..45fd4efaace --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/metadata/redirect/redirect-http-upgrade-prefetch.optional.tentative.sub.html @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/fetch/metadata/redirect/redirect-https-downgrade-prefetch.optional.tentative.sub.html b/tests/wpt/web-platform-tests/fetch/metadata/redirect/redirect-https-downgrade-prefetch.optional.tentative.sub.html new file mode 100644 index 00000000000..a446cbad840 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/metadata/redirect/redirect-https-downgrade-prefetch.optional.tentative.sub.html @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/fetch/metadata/resources/helper.js b/tests/wpt/web-platform-tests/fetch/metadata/resources/helper.js index a344c94106a..608a5297881 100644 --- a/tests/wpt/web-platform-tests/fetch/metadata/resources/helper.js +++ b/tests/wpt/web-platform-tests/fetch/metadata/resources/helper.js @@ -1,7 +1,3 @@ -function wrap_by_tag(tag, text) { - return tag ? `${tag}: ${text}`: text; -} - function validate_expectations(key, expected, tag) { return fetch("/fetch/metadata/resources/record-header.py?retrieve=true&file=" + key) .then(response => response.text()) diff --git a/tests/wpt/web-platform-tests/fetch/metadata/resources/record-header.py b/tests/wpt/web-platform-tests/fetch/metadata/resources/record-header.py index 99115475683..3bfb1fcdfaa 100644 --- a/tests/wpt/web-platform-tests/fetch/metadata/resources/record-header.py +++ b/tests/wpt/web-platform-tests/fetch/metadata/resources/record-header.py @@ -117,6 +117,20 @@ def main(request, response): response.headers.set("Content-Type", "application/javascript") return "self.postMessage('loaded');" + ## Return an appcache manifest + if key.startswith("appcache-manifest"): + response.headers.set("Content-Type", "text/cache-manifest") + return """CACHE MANIFEST +/fetch/metadata/resources/record-header.py?file=appcache-resource%s + +NETWORK: +*""" % key[17:] + + ## Return an appcache resource + if key.startswith("appcache-resource"): + response.headers.set("Content-Type", "text/html") + return "Appcache!" + ## Return a valid XSLT if key.startswith("xslt"): response.headers.set("Content-Type", "text/xsl") @@ -128,4 +142,3 @@ def main(request, response): """ - diff --git a/tests/wpt/web-platform-tests/fetch/metadata/resources/redirectTestHelper.sub.js b/tests/wpt/web-platform-tests/fetch/metadata/resources/redirectTestHelper.sub.js index c40b5a5e17e..e5547e7ac79 100644 --- a/tests/wpt/web-platform-tests/fetch/metadata/resources/redirectTestHelper.sub.js +++ b/tests/wpt/web-platform-tests/fetch/metadata/resources/redirectTestHelper.sub.js @@ -38,6 +38,34 @@ function downgradeRedirectTo(partialPath) { return secureRedirectURL + encodeURIComponent(insecureTestURL + partialPath); } +// Helper to test the behavior of the `prefetch` Link type [1]. Because the the +// behavior under test is optional [2], this function should only be used in +// tests which have been denoted as "optional" [3]. +// +// [1] https://html.spec.whatwg.org/#link-type-prefetch +// [2] https://w3c.github.io/resource-hints/#load-and-error-events +// [3] https://web-platform-tests.org/writing-tests/file-names.html +function testPrefetch(nonce, testNamePrefix, urlHelperMethod, expectedResults) { + async_test(t => { + let key = 'prefetch' + nonce; + let e = document.createElement('link'); + e.rel = 'prefetch'; + e.crossOrigin = 'anonymous'; + e.href = urlHelperMethod('resources/record-header.py?file=' + key) + '&simple=true'; + e.onload = t.step_func(e => { + let expectation = { ...expectedResults }; + if (expectation['mode'] != '') + expectation['mode'] = 'cors'; + fetch('/fetch/metadata/resources/record-header.py?retrieve=true&file=' + key) + .then(t.step_func(response => response.text())) + .then(t.step_func_done(text => assert_header_equals(text, expectation, testNamePrefix + ' prefetch => No headers'))) + .catch(t.unreached_func('Fetching and verifying the results should succeed.')); + }); + e.onerror = t.unreached_func(); + document.head.appendChild(e); + }, testNamePrefix + ' prefetch => No headers'); +} + // Helper to run common redirect test cases that don't require special setup on // the test page itself. function RunCommonRedirectTests(testNamePrefix, urlHelperMethod, expectedResults) { @@ -124,27 +152,6 @@ function RunCommonRedirectTests(testNamePrefix, urlHelperMethod, expectedResults }); }, testNamePrefix + ' object'); - if (document.createElement('link').relList.supports('prefetch')) { - async_test(t => { - let key = 'prefetch' + nonce; - let e = document.createElement('link'); - e.rel = 'prefetch'; - e.crossOrigin = 'anonymous'; - e.href = urlHelperMethod('resources/record-header.py?file=' + key) + '&simple=true'; - e.onload = t.step_func(e => { - let expectation = { ...expectedResults }; - if (expectation['mode'] != '') - expectation['mode'] = 'cors'; - fetch('/fetch/metadata/resources/record-header.py?retrieve=true&file=' + key) - .then(t.step_func(response => response.text())) - .then(t.step_func_done(text => assert_header_equals(text, expectation, testNamePrefix + ' prefetch => No headers'))) - .catch(t.unreached_func('Fetching and verifying the results should succeed.')); - }); - e.onerror = t.unreached_func(); - document.head.appendChild(e); - }, testNamePrefix + ' prefetch => No headers'); - } - if (document.createElement('link').relList.supports('preload')) { async_test(t => { let key = 'preload' + nonce; diff --git a/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/fetch.html b/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/fetch.html index 73390c7ad59..41ece6826ed 100644 --- a/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/fetch.html +++ b/tests/wpt/web-platform-tests/fetch/stale-while-revalidate/fetch.html @@ -1,6 +1,6 @@ -Tests Stale While Revalidate is not executed for fetch API +Tests Stale While Revalidate is executed for fetch API diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-closed.html b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-closed.html index 7c939bc7746..106c3f97cb2 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-closed.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-closed.html @@ -2,7 +2,7 @@ - Auxiliary Browing Contexts: window.opener when Opener Removed/Closed + Auxiliary Browsing Contexts: window.opener when Opener Removed/Closed diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-multiple.html b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-multiple.html index eb356c55972..e71d4dc8687 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-multiple.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-multiple.html @@ -1,7 +1,7 @@ - Auxiliary Browing Contexts: window.opener, multiple + Auxiliary Browsing Contexts: window.opener, multiple diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html index fff10248fed..086a96442dd 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noopener.html @@ -1,7 +1,7 @@ - Auxiliary Browing Contexts: window.opener noopener + Auxiliary Browsing Contexts: window.opener noopener diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noreferrer.html b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noreferrer.html index f82aa6f0abe..b8226bd2b93 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noreferrer.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-noreferrer.html @@ -1,7 +1,7 @@ - Auxiliary Browing Contexts: window.opener noreferrer + Auxiliary Browsing Contexts: window.opener noreferrer diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html index e6ff4a19d0d..ac6e47b846b 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener-setter.html @@ -1,7 +1,7 @@ - Auxiliary Browing Contexts: window.opener setter + Auxiliary Browsing Contexts: window.opener setter diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener.html b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener.html index 5bbaee6a378..c43d3bd3bfb 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/auxiliary-browsing-contexts/opener.html @@ -1,7 +1,7 @@ - Auxiliary Browing Contexts: window.opener + Auxiliary Browsing Contexts: window.opener diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-video-element/resize-during-playback.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-video-element/resize-during-playback.html new file mode 100644 index 00000000000..3ade1effc4b --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-video-element/resize-during-playback.html @@ -0,0 +1,39 @@ + + + +video element resizing during playback + + + + + +
+ + + diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/constraints/infinite_backtracking.html b/tests/wpt/web-platform-tests/html/semantics/forms/constraints/infinite_backtracking.html new file mode 100644 index 00000000000..52f6e316b1f --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/forms/constraints/infinite_backtracking.html @@ -0,0 +1,12 @@ + + +The infinite pattern validation test + + + + diff --git a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPoints.html.ini b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPoints.html.ini index 4a4f5946fad..1d63261c554 100644 --- a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPoints.html.ini +++ b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPoints.html.ini @@ -3,4 +3,4 @@ if product == "firefox" or product == "safari" or product == "epiphany" or product == "webkit": ERROR [TestDriver actions: two touch points with one moving one pause] expected: - if product == "chrome": FAIL + if product == "chrome" and os != "mac": FAIL diff --git a/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_wait_TestRendered.html b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_wait_TestRendered.html new file mode 100644 index 00000000000..4316d338b5c --- /dev/null +++ b/tests/wpt/web-platform-tests/infrastructure/reftest/reftest_wait_TestRendered.html @@ -0,0 +1,14 @@ + +Test with reftest-wait + + + + diff --git a/tests/wpt/web-platform-tests/interfaces/cookie-store.idl b/tests/wpt/web-platform-tests/interfaces/cookie-store.idl index 3e1a90ab63f..f6a413e54a2 100644 --- a/tests/wpt/web-platform-tests/interfaces/cookie-store.idl +++ b/tests/wpt/web-platform-tests/interfaces/cookie-store.idl @@ -19,12 +19,6 @@ interface CookieStore : EventTarget { Promise delete(USVString name); Promise delete(CookieStoreDeleteOptions options); - [Exposed=ServiceWorker] - Promise subscribeToChanges(sequence subscriptions); - - [Exposed=ServiceWorker] - Promise> getChangeSubscriptions(); - [Exposed=Window] attribute EventHandler onchange; }; @@ -77,8 +71,7 @@ dictionary CookieListItem { typedef sequence CookieList; -[Exposed=Window, - SecureContext] +[Exposed=Window, SecureContext] interface CookieChangeEvent : Event { constructor(DOMString type, optional CookieChangeEventInit eventInitDict = {}); readonly attribute CookieList changed; @@ -90,8 +83,8 @@ dictionary CookieChangeEventInit : EventInit { CookieList deleted; }; -[Exposed=ServiceWorker -] interface ExtendableCookieChangeEvent : ExtendableEvent { +[Exposed=ServiceWorker] +interface ExtendableCookieChangeEvent : ExtendableEvent { constructor(DOMString type, optional ExtendableCookieChangeEventInit eventInitDict = {}); readonly attribute CookieList changed; readonly attribute CookieList deleted; @@ -102,6 +95,13 @@ dictionary ExtendableCookieChangeEventInit : ExtendableEventInit { CookieList deleted; }; +[Exposed=(ServiceWorker,Window), SecureContext] +interface CookieStoreManager { + Promise subscribe(sequence subscriptions); + Promise> getSubscriptions(); + Promise unsubscribe(sequence subscriptions); +}; + [SecureContext] partial interface Window { [Replaceable, SameObject] readonly attribute CookieStore cookieStore; @@ -109,6 +109,10 @@ partial interface Window { partial interface ServiceWorkerGlobalScope { [Replaceable, SameObject] readonly attribute CookieStore cookieStore; - attribute EventHandler oncookiechange; }; + +[Exposed=(ServiceWorker,Window), SecureContext] +partial interface ServiceWorkerRegistration { + readonly attribute CookieStoreManager cookies; +}; diff --git a/tests/wpt/web-platform-tests/interfaces/resize-observer.idl b/tests/wpt/web-platform-tests/interfaces/resize-observer.idl index 9ac157a6328..d53e9da55ee 100644 --- a/tests/wpt/web-platform-tests/interfaces/resize-observer.idl +++ b/tests/wpt/web-platform-tests/interfaces/resize-observer.idl @@ -21,7 +21,7 @@ interface ResizeObserver { callback ResizeObserverCallback = void (sequence entries, ResizeObserver observer); -[Exposed=Window, Constructor(Element target)] +[Exposed=Window] interface ResizeObserverEntry { readonly attribute Element target; readonly attribute DOMRectReadOnly contentRect; diff --git a/tests/wpt/web-platform-tests/interfaces/wasm-js-api.idl b/tests/wpt/web-platform-tests/interfaces/wasm-js-api.idl index 828729071e4..cc943610145 100644 --- a/tests/wpt/web-platform-tests/interfaces/wasm-js-api.idl +++ b/tests/wpt/web-platform-tests/interfaces/wasm-js-api.idl @@ -39,15 +39,17 @@ dictionary ModuleImportDescriptor { required ImportExportKind kind; }; -[LegacyNamespace=WebAssembly, Constructor(BufferSource bytes), Exposed=(Window,Worker,Worklet)] +[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)] interface Module { + constructor(BufferSource bytes); static sequence exports(Module moduleObject); static sequence imports(Module moduleObject); static sequence customSections(Module moduleObject, DOMString sectionName); }; -[LegacyNamespace=WebAssembly, Constructor(Module module, optional object importObject), Exposed=(Window,Worker,Worklet)] +[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)] interface Instance { + constructor(Module module, optional object importObject); readonly attribute object exports; }; @@ -56,8 +58,9 @@ dictionary MemoryDescriptor { [EnforceRange] unsigned long maximum; }; -[LegacyNamespace=WebAssembly, Constructor(MemoryDescriptor descriptor), Exposed=(Window,Worker,Worklet)] +[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)] interface Memory { + constructor(MemoryDescriptor descriptor); unsigned long grow([EnforceRange] unsigned long delta); readonly attribute ArrayBuffer buffer; }; @@ -74,8 +77,9 @@ dictionary TableDescriptor { [EnforceRange] unsigned long maximum; }; -[LegacyNamespace=WebAssembly, Constructor(TableDescriptor descriptor), Exposed=(Window,Worker,Worklet)] +[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)] interface Table { + constructor(TableDescriptor descriptor); unsigned long grow([EnforceRange] unsigned long delta); Function? get([EnforceRange] unsigned long index); void set([EnforceRange] unsigned long index, Function? value); @@ -94,8 +98,9 @@ dictionary GlobalDescriptor { boolean mutable = false; }; -[LegacyNamespace=WebAssembly, Constructor(GlobalDescriptor descriptor, optional any v), Exposed=(Window,Worker,Worklet)] +[LegacyNamespace=WebAssembly, Exposed=(Window,Worker,Worklet)] interface Global { + constructor(GlobalDescriptor descriptor, optional any v); any valueOf(); attribute any value; }; diff --git a/tests/wpt/web-platform-tests/interfaces/web-nfc.idl b/tests/wpt/web-platform-tests/interfaces/web-nfc.idl index 455720c641e..de23fac0c11 100644 --- a/tests/wpt/web-platform-tests/interfaces/web-nfc.idl +++ b/tests/wpt/web-platform-tests/interfaces/web-nfc.idl @@ -13,6 +13,8 @@ dictionary NDEFMessageInit { required sequence records; }; +typedef (DOMString or BufferSource or NDEFMessageInit) NDEFRecordDataSource; + [Exposed=Window] interface NDEFRecord { constructor(NDEFRecordInit recordInit); @@ -36,7 +38,7 @@ dictionary NDEFRecordInit { USVString encoding; USVString lang; - any data; + NDEFRecordDataSource data; }; typedef (DOMString or BufferSource or NDEFMessageInit) NDEFMessageSource; diff --git a/tests/wpt/web-platform-tests/layout-instability/pointerdown-becomes-scroll.html b/tests/wpt/web-platform-tests/layout-instability/pointerdown-becomes-scroll.html new file mode 100644 index 00000000000..4fe5c6b7e7c --- /dev/null +++ b/tests/wpt/web-platform-tests/layout-instability/pointerdown-becomes-scroll.html @@ -0,0 +1,62 @@ + +Layout Instability: shift in pointerdown becoming scroll + + +
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/layout-instability/pointerdown-becomes-tap.html b/tests/wpt/web-platform-tests/layout-instability/pointerdown-becomes-tap.html new file mode 100644 index 00000000000..e2e7a911dc0 --- /dev/null +++ b/tests/wpt/web-platform-tests/layout-instability/pointerdown-becomes-tap.html @@ -0,0 +1,60 @@ + +Layout Instability: shift in pointerdown becoming tap + + +
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/layout-instability/resources/util.js b/tests/wpt/web-platform-tests/layout-instability/resources/util.js index ca430d0a9e2..515914e11fa 100644 --- a/tests/wpt/web-platform-tests/layout-instability/resources/util.js +++ b/tests/wpt/web-platform-tests/layout-instability/resources/util.js @@ -47,6 +47,7 @@ ScoreWatcher = function() { if (PerformanceObserver.supportedEntryTypes.indexOf("layout-shift") == -1) throw new Error("Layout Instability API not supported"); this.score = 0; + this.scoreWithInputExclusion = 0; const resetPromise = () => { this.promise = new Promise(resolve => { this.resolve = () => { @@ -59,6 +60,8 @@ ScoreWatcher = function() { const observer = new PerformanceObserver(list => { list.getEntries().forEach(entry => { this.score += entry.value; + if (!entry.hadRecentInput) + this.scoreWithInputExclusion += entry.value; this.resolve(); }); }); diff --git a/tests/wpt/web-platform-tests/lint.whitelist b/tests/wpt/web-platform-tests/lint.whitelist index 48d7e9d6a74..4f2ef9c005b 100644 --- a/tests/wpt/web-platform-tests/lint.whitelist +++ b/tests/wpt/web-platform-tests/lint.whitelist @@ -201,6 +201,7 @@ SET TIMEOUT: shadow-dom/slotchange-event.html SET TIMEOUT: trusted-types/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.tentative.html SET TIMEOUT: trusted-types/DOMWindowTimers-setTimeout-setInterval.tentative.html SET TIMEOUT: user-timing/* +SET TIMEOUT: web-animations/timing-model/animations/* SET TIMEOUT: webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html SET TIMEOUT: webauthn/*timeout.https.html SET TIMEOUT: webdriver/* diff --git a/tests/wpt/web-platform-tests/media/400x300-red-resize-200x150-green.mp4 b/tests/wpt/web-platform-tests/media/400x300-red-resize-200x150-green.mp4 new file mode 100644 index 00000000000..1058c1bf26a Binary files /dev/null and b/tests/wpt/web-platform-tests/media/400x300-red-resize-200x150-green.mp4 differ diff --git a/tests/wpt/web-platform-tests/media/400x300-red-resize-200x150-green.webm b/tests/wpt/web-platform-tests/media/400x300-red-resize-200x150-green.webm new file mode 100644 index 00000000000..53b6517849f Binary files /dev/null and b/tests/wpt/web-platform-tests/media/400x300-red-resize-200x150-green.webm differ diff --git a/tests/wpt/web-platform-tests/portals/portals-adopt-predecessor.html b/tests/wpt/web-platform-tests/portals/portals-adopt-predecessor.html index 70545458b46..96d0be9a401 100644 --- a/tests/wpt/web-platform-tests/portals/portals-adopt-predecessor.html +++ b/tests/wpt/web-platform-tests/portals/portals-adopt-predecessor.html @@ -62,4 +62,14 @@ }); window.open(`resources/portals-adopt-predecessor.html?test=${test}`); }, "Tests that the adopted predecessor is destroyed if it isn't inserted"); + + async_test(t => { + var test = "adopt-to-disconnected-node"; + var bc = new BroadcastChannel(`test-${test}`); + bc.onmessage = t.step_func_done(function(e) { + assert_equals(e.data, "passed"); + bc.close(); + }); + window.open(`resources/portals-adopt-predecessor.html?test=${test}`); + }, "Tests that an adopted portal can be inserted into a disconnected node."); diff --git a/tests/wpt/web-platform-tests/portals/resources/portals-adopt-predecessor-portal.html b/tests/wpt/web-platform-tests/portals/resources/portals-adopt-predecessor-portal.html index b7eb3b96779..48e162b9714 100644 --- a/tests/wpt/web-platform-tests/portals/resources/portals-adopt-predecessor-portal.html +++ b/tests/wpt/web-platform-tests/portals/resources/portals-adopt-predecessor-portal.html @@ -64,5 +64,14 @@ }); }); } + if (test == "adopt-to-disconnected-node") { + var portal = e.adoptPredecessor(); + document.body.appendChild(portal); + var node = document.createElement("div"); + node.appendChild(portal); + var bc_test = new BroadcastChannel(`test-${test}`); + bc_test.postMessage("passed"); + bc_test.close(); + } } diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-worker-timing-frame.tentative.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-worker-timing-frame.tentative.https.html new file mode 100644 index 00000000000..6ca92476195 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/fetch-event-worker-timing-frame.tentative.https.html @@ -0,0 +1,225 @@ + + + + + + diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-worker-timing.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-worker-timing.js new file mode 100644 index 00000000000..7f3b201ef76 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/fetch-event-worker-timing.js @@ -0,0 +1,39 @@ +importScripts("/resources/testharness.js"); + +self.addEventListener('fetch', event => { + if (event.request.url.indexOf('fallback') >= 0) { + event.addPerformanceEntry( + performance.mark("network-fallback mark 1", + { detail: { foo: 'foo' } })); + event.addPerformanceEntry( + performance.mark("network-fallback mark 2", + { detail: { bar: 'bar' } })); + event.addPerformanceEntry(performance.measure("network-fallback measure", + { + start: "network-fallback mark 1", end: "network-fallback mark 2", + detail: { baz: 'baz' } + })); + return; + } else if (event.request.url.indexOf('fetch-event') >= 0) { + event.respondWith((async () => { + event.addPerformanceEntry(performance.mark("fetch-event mark 1", + { detail: { foo: 'foo' } })); + const response = await fetch(event.request); + + event.waitUntil(new Promise((resolve) => { + // Add performance entries after settling a promise for respondWith(). + step_timeout(() => { + event.addPerformanceEntry(performance.mark("fetch-event mark 2", + { detail: { bar: 'bar' } })); + event.addPerformanceEntry(performance.measure("fetch-event measure", + { + start: "fetch-event mark 1", end: "fetch-event mark 2", + detail: { baz: 'baz' } + })); + resolve(); + }, 100); + })); + return response; + })()); + } +}); diff --git a/tests/wpt/web-platform-tests/storage-access-api/META.yml b/tests/wpt/web-platform-tests/storage-access-api/META.yml index cb059fe6bb1..83f07857538 100644 --- a/tests/wpt/web-platform-tests/storage-access-api/META.yml +++ b/tests/wpt/web-platform-tests/storage-access-api/META.yml @@ -1,2 +1,5 @@ +spec: https://github.com/whatwg/html/issues/3338 suggested_reviewers: - Brandr0id + - ehsan + - johnwilander diff --git a/tests/wpt/web-platform-tests/svg/META.yml b/tests/wpt/web-platform-tests/svg/META.yml index 0836892864f..ee0fff087c4 100644 --- a/tests/wpt/web-platform-tests/svg/META.yml +++ b/tests/wpt/web-platform-tests/svg/META.yml @@ -6,3 +6,4 @@ suggested_reviewers: - AmeliaBR - svgeesus - dirkschulze + - fsoder diff --git a/tests/wpt/web-platform-tests/svg/painting/marker-009-ref.svg b/tests/wpt/web-platform-tests/svg/painting/marker-009-ref.svg new file mode 100644 index 00000000000..968eba091c5 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/painting/marker-009-ref.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/svg/painting/marker-009.svg b/tests/wpt/web-platform-tests/svg/painting/marker-009.svg new file mode 100644 index 00000000000..9e6fe21d917 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/painting/marker-009.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/svg/painting/marker-orient-001-ref.svg b/tests/wpt/web-platform-tests/svg/painting/marker-orient-001-ref.svg new file mode 100644 index 00000000000..e328aa05462 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/painting/marker-orient-001-ref.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/svg/painting/marker-orient-001.svg b/tests/wpt/web-platform-tests/svg/painting/marker-orient-001.svg new file mode 100644 index 00000000000..eefb1068391 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/painting/marker-orient-001.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/svg/render/foreignObject-in-non-rendered-getComputedStyle.html b/tests/wpt/web-platform-tests/svg/render/foreignObject-in-non-rendered-getComputedStyle.html new file mode 100644 index 00000000000..409f1044a33 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/render/foreignObject-in-non-rendered-getComputedStyle.html @@ -0,0 +1,20 @@ + +SVG Test: Resolved width inside non-rendered foreignObject + + + + + + + +
+
+
+
+
+ diff --git a/tests/wpt/web-platform-tests/tools/ci/azure/install_safari.yml b/tests/wpt/web-platform-tests/tools/ci/azure/install_safari.yml index 10466e3278f..a8641465ac8 100644 --- a/tests/wpt/web-platform-tests/tools/ci/azure/install_safari.yml +++ b/tests/wpt/web-platform-tests/tools/ci/azure/install_safari.yml @@ -5,7 +5,7 @@ parameters: steps: - ${{ if eq(parameters.channel, 'preview') }}: - script: | - HOMEBREW_NO_AUTO_UPDATE=1 brew cask install https://raw.githubusercontent.com/Homebrew/homebrew-cask-versions/master/Casks/safari-technology-preview.rb + HOMEBREW_NO_AUTO_UPDATE=1 brew cask install tools/ci/azure/safari-technology-preview.rb sudo "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --enable defaults write com.apple.SafariTechnologyPreview WebKitJavaScriptCanOpenWindowsAutomatically 1 defaults write com.apple.SafariTechnologyPreview ExperimentalServerTimingEnabled 1 diff --git a/tests/wpt/web-platform-tests/tools/ci/azure/safari-technology-preview.rb b/tests/wpt/web-platform-tests/tools/ci/azure/safari-technology-preview.rb new file mode 100644 index 00000000000..b32739be58a --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/ci/azure/safari-technology-preview.rb @@ -0,0 +1,33 @@ +cask 'safari-technology-preview' do + if MacOS.version <= :mojave + version '96,061-44056-20191120-ac7bb196-2724-4840-bce9-6c83ecdbfb2c' + sha256 'e80ceacdff7e75218365993e5af1c81c9bcc4785291ae00abba3d14ac5614317' + else + version '96,061-47718-20191120-02bc7569-ee6b-4c28-9ec4-0ceeda3c3c3a' + sha256 'bbfcdc36bf9b55aec5838d66e34c41dd3f6a64091406bc38f45c888360f191fe' + end + + url "https://secure-appldnld.apple.com/STP/#{version.after_comma}/SafariTechnologyPreview.dmg" + appcast 'https://developer.apple.com/safari/download/' + name 'Safari Technology Preview' + homepage 'https://developer.apple.com/safari/download/' + + auto_updates true + depends_on macos: '>= :mojave' + + pkg 'Safari Technology Preview.pkg' + + uninstall delete: '/Applications/Safari Technology Preview.app' + + zap trash: [ + '~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.apple.safaritechnologypreview.sfl*', + '~/Library/Caches/com.apple.SafariTechnologyPreview', + '~/Library/Preferences/com.apple.SafariTechnologyPreview.plist', + '~/Library/SafariTechnologyPreview', + '~/Library/Saved Application State/com.apple.SafariTechnologyPreview.savedState', + '~/Library/SyncedPreferences/com.apple.SafariTechnologyPreview-com.apple.Safari.UserRequests.plist', + '~/Library/SyncedPreferences/com.apple.SafariTechnologyPreview-com.apple.Safari.WebFeedSubscriptions.plist', + '~/Library/SyncedPreferences/com.apple.SafariTechnologyPreview.plist', + '~/Library/WebKit/com.apple.SafariTechnologyPreview', + ] +end diff --git a/tests/wpt/web-platform-tests/tools/ci/commands.json b/tests/wpt/web-platform-tests/tools/ci/commands.json index 841fd855c80..c9cd7c45898 100644 --- a/tests/wpt/web-platform-tests/tools/ci/commands.json +++ b/tests/wpt/web-platform-tests/tools/ci/commands.json @@ -14,7 +14,7 @@ "virtualenv": false }, "tc-download": { - "path": "tcdownload.py", + "path": "tc/download.py", "script": "run", "parser": "get_parser", "parse_known": true, @@ -24,5 +24,27 @@ "requests", "pygithub" ] + }, + "tc-taskgraph": { + "path": "tc/taskgraph.py", + "script": "run", + "help": "Build the taskgraph", + "virtualenv": true, + "install": [ + "requests", + "pyyaml" + ] + }, + "tc-decision": { + "path": "tc/decision.py", + "parser": "get_parser", + "script": "run", + "help": "Run the decision task", + "virtualenv": true, + "install": [ + "requests", + "pyyaml", + "taskcluster" + ] } } diff --git a/tests/wpt/web-platform-tests/tools/ci/run_tc.py b/tests/wpt/web-platform-tests/tools/ci/run_tc.py index be7dbe082a1..b4cb2b01b97 100755 --- a/tests/wpt/web-platform-tests/tools/ci/run_tc.py +++ b/tests/wpt/web-platform-tests/tools/ci/run_tc.py @@ -38,7 +38,6 @@ the serialization of a GitHub event payload. import argparse import json import os -import re import subprocess import sys import tempfile @@ -99,8 +98,12 @@ def get_parser(): help="Start xvfb") p.add_argument("--checkout", help="Revision to checkout before starting job") - p.add_argument("job", - help="Name of the job associated with the current event") + p.add_argument("--install-certificates", action="store_true", default=None, + help="Install web-platform.test certificates to UA store") + p.add_argument("--no-install-certificates", action="store_false", default=None, + help="Don't install web-platform.test certificates to UA store") + p.add_argument("--rev", + help="Revision that the task_head ref is expected to point to") p.add_argument("script", help="Script to run for the job") p.add_argument("script_args", @@ -116,11 +119,17 @@ def start_userspace_oom_killer(): def make_hosts_file(): - subprocess.check_call(["sudo", "sh", "-c", "./wpt make-hosts-file >> /etc/hosts"]) + run(["sudo", "sh", "-c", "./wpt make-hosts-file >> /etc/hosts"]) def checkout_revision(rev): - subprocess.check_call(["git", "checkout", "--quiet", rev]) + run(["git", "checkout", "--quiet", rev]) + + +def install_certificates(): + run(["sudo", "cp", "tools/certs/cacert.pem", + "/usr/local/share/ca-certificates/cacert.crt"]) + run(["sudo", "update-ca-certificates"]) def install_chrome(channel): @@ -213,29 +222,6 @@ def start_xvfb(): start(["sudo", "fluxbox", "-display", os.environ["DISPLAY"]]) -def get_extra_jobs(event): - body = None - jobs = set() - if "commits" in event and event["commits"]: - body = event["commits"][0]["message"] - elif "pull_request" in event: - body = event["pull_request"]["body"] - - if not body: - return jobs - - regexp = re.compile(r"\s*tc-jobs:(.*)$") - - for line in body.splitlines(): - m = regexp.match(line) - if m: - items = m.group(1) - for item in items.split(","): - jobs.add(item.strip()) - break - return jobs - - def set_variables(event): # Set some variables that we use to get the commits on the current branch ref_prefix = "refs/heads/" @@ -256,23 +242,13 @@ def set_variables(event): os.environ["GITHUB_BRANCH"] = branch -def include_job(job): - # Special case things that unconditionally run on pushes, - # assuming a higher layer is filtering the required list of branches - if (os.environ["GITHUB_PULL_REQUEST"] == "false" and - job == "run-all"): - return True - - jobs_str = run([os.path.join(root, "wpt"), - "test-jobs"], return_stdout=True) - print(jobs_str) - return job in set(jobs_str.splitlines()) - - def setup_environment(args): if args.hosts_file: make_hosts_file() + if args.install_certificates: + install_certificates() + if "chrome" in args.browser: assert args.channel is not None install_chrome(args.channel) @@ -337,9 +313,33 @@ def fetch_event_data(): return json.loads(event_data) +def include_job(job): + # Only for supporting pre decision-task PRs + # Special case things that unconditionally run on pushes, + # assuming a higher layer is filtering the required list of branches + if "GITHUB_PULL_REQUEST" not in os.environ: + return True + + if (os.environ["GITHUB_PULL_REQUEST"] == "false" and + job == "run-all"): + return True + + jobs_str = run([os.path.join(root, "wpt"), + "test-jobs"], return_stdout=True) + print(jobs_str) + return job in set(jobs_str.splitlines()) + + def main(): args = get_parser().parse_args() + if args.rev is not None: + task_head = run(["git", "rev-parse", "task_head"], return_stdout=True).strip() + if task_head != args.rev: + print("CRITICAL: task_head points at %s, expected %s. " + "This may be because the branch was updated" % (task_head, args.rev)) + sys.exit(1) + if "TASK_EVENT" in os.environ: event = json.loads(os.environ["TASK_EVENT"]) else: @@ -350,24 +350,15 @@ def main(): setup_repository() - extra_jobs = get_extra_jobs(event) - - job = args.job - - print("Job %s" % job) - - run_if = [(lambda: job == "all", "job set to 'all'"), - (lambda:"all" in extra_jobs, "Manually specified jobs includes 'all'"), - (lambda:job in extra_jobs, "Manually specified jobs includes '%s'" % job), - (lambda:include_job(job), "CI required jobs includes '%s'" % job)] - - for fn, msg in run_if: - if fn(): - print(msg) - break - else: - print("Job not scheduled for this push") - return + # Hack for backwards compatibility + if args.script in ["run-all", "lint", "update_built", "tools_unittest", + "wpt_integration", "resources_unittest", + "wptrunner_infrastructure", "stability", "affected_tests"]: + job = args.script + if not include_job(job): + return + args.script = args.script_args[0] + args.script_args = args.script_args[1:] # Run the job setup_environment(args) diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/README.md b/tests/wpt/web-platform-tests/tools/ci/tc/README.md new file mode 100644 index 00000000000..11f367f986f --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/ci/tc/README.md @@ -0,0 +1,235 @@ +# Taskgraph Setup + +The taskgraph is built from a YAML file. This file has two top-level +properties: `components` and `tasks`. The full list of tasks is +defined by the `tasks` object; each task is an object with a single +property representing the task with the corresponding value an object +representing the task properties. Each task requires the following +top-level properties: + +* `provisionerId`: String. Name of Taskcluster provisioner +* `schedulerId`: String. Name of Taskcluster scheduler +* `deadline`: String. Time until the task expires +* `image`: String. Name of docker image to use for task +* `maxRunTime`: Number. Maximum time in seconds for which the task can + run. +* `artifacts`: Object. List of artifacts and directories to upload; see + Taskcluster documentation. +* `command`: String. Command to run. This is automatically wrapped in a + run_tc command +* `options`: Optional Object. Options to pass into run_tc + - xvfb: Boolean. Enable Xvfb for run + - oom-killer: Boolean. Enable xvfb for run + - hosts: Boolean. Update hosts file with wpt hosts before run + - install-certificates: Boolean. Install wpt certs into OS + certificate store for run + - browser: List. List of browser names for run + - channel: String. Browser channel for run +* `trigger`: Object. Conditions on which to consider task. One or more + of following properties: + - branch: List. List of branch names on which to trigger. + - pull-request: No value. Trigger for pull request actions +* `schedule-if`: Optional Object. Conditions on which task should be + scheduled given it meets the trigger conditions. + - `run-job`: List. Job names for which this task should be considered, + matching the output from `./wpt test-jobs` +* `env`: Optional Object. Environment variables to set when running task. +* `depends-on`: Optional list. List of task names that must be complete + before the current task is scheduled. +* `description`: String. Task description. +* `name`: Optional String. Name to use for the task overriding the + property name. This is useful in combination with substitutions + described below. + +## Task Expansions + +Using the above syntax it's possble to describe each task +directly. But typically in a taskgraph there are many common +properties between tasks so it's tedious and error prone to repeat +information that's common to multiple tasks. Therefore the taskgraph +format provides several mechanisms to reuse partial task definitions +across multiple tasks. + +### Components + +The other top-level property in the taskgraph format is +`components`. The value of this property is an object containing named +partial task definitions. Each task definition may contain a property called +`use` which is a list of components to use as the basis for the task +definition. The components list is evaluated in order. If a property +is not previously defined in the output it is added to the output. If +it was previously defined, the value is updated according to the type: + * Strings and numbers are replaced with a new value + * Lists are extended with the additional values + * Objects are updated recursively following the above rules +This means that types must always match between components and the +final value. + +For example +``` +components: + example-1: + list_prop: + - first + - second + object_prop: + key1: value1 + key2: base_value + example-2: + list_prop: + - third + - fourth + object_prop: + key3: + - value3-1 + +tasks: + - example-task: + use: + - example-1 + - example-2 + object_prop: + key2: value2 + key3: + - value3-2 +``` + +will evaluate to the following task: + +``` +example-task: + list_prop: + - first + - second + - third + - fourth + object_prop: + key1: value1 + key2: value2 + key3: + - value3-1 + - value3-2 +``` + +Note that components cannot currently define `use` properties of their own. + +## Substitutions + +Components and tasks can define a property `vars` that holds variables +which are later substituted into the task definition using the syntax +`${vars.property-name}`. For example: + +``` +components: + generic-component: + prop: ${vars.value} + +tasks: + - first: + use: + - generic-component + vars: + value: value1 + - second: + use: + - generic-component + vars: + value: value2 +``` + +Results in the following tasks: + +``` +first: + prop: value1 +second: + prop: value2 +``` + +## Maps + +Instead of defining a task directly, an item in the tasks property may +be an object with a single property `$map`. This object itself has two +child properties; `for` and `do`. The value of `for` is a list of +objects, and the value of `do` is either an object or a list of +objects. For each object in the `for` property, a set of tasks is +created by taking a copy of that object for each task in the `do` +property, updating the object with the properties from the +corresponding `do` object, using the same rules as for components +above, and then processing as for a normal task. `$map` rules can also +be nested. + +Note: Although `$map` shares a name with the `$map` used in json-e +(used. in `.taskcluster.yml`), the semantics are different. + +For example + +``` +components: {} +tasks: + $map: + for: + - vars: + example: value1 + - vars: + example: value2 + do: + example-${vars.example} + prop: ${vars.example} +``` + +Results in the tasks + +``` +example-value1: + prop: value1 +example-value2: + prop: value2 +``` + +Note that in combination with `$map`, variable substitutions are +applied *twice*; once after the `$map` is evaluated and once after the +`use` statements are evaluated. + +## Chunks + +A common requirements for tasks is that they are "chunked" into N +partial tasks. This is handled specially in the syntax. A top level +property `chunks` can be used to define the number of individual +chunks to create for a specific task. Each chunked task is created +with a `chunks` property set to an object containing an `id` property +containing the one-based index of the chunk an a `total` property +containing the total number of chunks. These can be substituted into +the task definition using the same syntax as for `vars` above +e.g. `${chunks.id}`. Note that because task names must be unique, it's +common to specify a `name` property on the task that will override the +property name e.g. + +``` +components: {} +tasks: + - chunked-task: + chunks:2 + command: "task-run --chunk=${chunks.id} --totalChunks=${chunks.total}" + name: task-chunk-${chunks.id} +``` + +creates tasks: + +``` +task-chunk-1: + command: "task-run --chunk=1 --totalChunks=2" +task-chunk-2: + command: "task-run --chunk=2 --totalChunks=2" +``` + +# Overall processing model + +The overall processing model for tasks is as follows: + * Evaluate maps + * Perform subsitutions + * Evaluate use statements + * Expand chunks + * Perform subsitutions + +At each point after maps are evaluated tasks must have a unique name. diff --git a/tests/wpt/web-platform-tests/tools/taskcluster/__init__.py b/tests/wpt/web-platform-tests/tools/ci/tc/__init__.py similarity index 100% rename from tests/wpt/web-platform-tests/tools/taskcluster/__init__.py rename to tests/wpt/web-platform-tests/tools/ci/tc/__init__.py diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/decision.py b/tests/wpt/web-platform-tests/tools/ci/tc/decision.py new file mode 100644 index 00000000000..a3c47aa4049 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/ci/tc/decision.py @@ -0,0 +1,323 @@ +import argparse +import json +import logging +import os +import re +import subprocess +from collections import OrderedDict + +import taskcluster +from six import iteritems, itervalues + +from . import taskgraph + + +here = os.path.abspath(os.path.dirname(__file__)) + + +logging.basicConfig() +logger = logging.getLogger() + + +def get_triggers(event): + # Set some variables that we use to get the commits on the current branch + ref_prefix = "refs/heads/" + is_pr = "pull_request" in event + branch = None + if not is_pr and "ref" in event: + branch = event["ref"] + if branch.startswith(ref_prefix): + branch = branch[len(ref_prefix):] + + return is_pr, branch + + +def fetch_event_data(queue): + try: + task_id = os.environ["TASK_ID"] + except KeyError: + logger.warning("Missing TASK_ID environment variable") + # For example under local testing + return None + + task_data = queue.task(task_id) + + return task_data.get("extra", {}).get("github_event") + + +def filter_triggers(event, all_tasks): + is_pr, branch = get_triggers(event) + triggered = {} + for name, task in iteritems(all_tasks): + if "trigger" in task: + if is_pr and "pull-request" in task["trigger"]: + triggered[name] = task + elif branch is not None and "branch" in task["trigger"]: + for trigger_branch in task["trigger"]["branch"]: + if (trigger_branch == branch or + trigger_branch.endswith("*") and branch.startswith(trigger_branch[:-1])): + triggered[name] = task + logger.info("Triggers match tasks:\n * %s" % "\n * ".join(triggered.keys())) + return triggered + + +def get_run_jobs(event): + from tools.ci import jobs + revish = "%s..%s" % (event["pull_request"]["base"]["sha"] + if "pull_request" in event + else event["before"], + event["pull_request"]["head"]["sha"] + if "pull_request" in event + else event["after"]) + logger.info("Looking for changes in range %s" % revish) + paths = jobs.get_paths(revish=revish) + logger.info("Found changes in paths:%s" % "\n".join(paths)) + path_jobs = jobs.get_jobs(paths) + all_jobs = path_jobs | get_extra_jobs(event) + logger.info("Including jobs:\n * %s" % "\n * ".join(all_jobs)) + return all_jobs + + +def get_extra_jobs(event): + body = None + jobs = set() + if "commits" in event and event["commits"]: + body = event["commits"][0]["message"] + elif "pull_request" in event: + body = event["pull_request"]["body"] + + if not body: + return jobs + + regexp = re.compile(r"\s*tc-jobs:(.*)$") + + for line in body.splitlines(): + m = regexp.match(line) + if m: + items = m.group(1) + for item in items.split(","): + jobs.add(item.strip()) + break + return jobs + + +def filter_schedule_if(event, tasks): + scheduled = {} + run_jobs = None + for name, task in iteritems(tasks): + if "schedule-if" in task: + if "run-job" in task["schedule-if"]: + if run_jobs is None: + run_jobs = get_run_jobs(event) + if "all" in run_jobs or any(item in run_jobs for item in task["schedule-if"]["run-job"]): + scheduled[name] = task + else: + scheduled[name] = task + logger.info("Scheduling rules match tasks:\n * %s" % "\n * ".join(scheduled.keys())) + return scheduled + + +def get_fetch_rev(event): + is_pr, _ = get_triggers(event) + if is_pr: + # Try to get the actual rev so that all non-decision tasks are pinned to that + ref = "refs/pull/%s/merge" % event["pull_request"]["number"] + try: + output = subprocess.check_output(["git", "ls-remote", "origin", ref]) + except subprocess.CalledProcessError: + import traceback + logger.error(traceback.format_exc()) + logger.error("Failed to get merge commit sha1") + return ref, None + if not output: + logger.error("Failed to get merge commit") + return ref, None + return ref, output.split()[0] + else: + return event["ref"], event["after"] + + +def build_full_command(event, task): + fetch_ref, fetch_sha = get_fetch_rev(event) + cmd_args = { + "task_name": task["name"], + "repo_url": event["repository"]["clone_url"], + "fetch_ref": fetch_ref, + "task_cmd": task["command"], + "install_str": "", + } + + options = task.get("options", {}) + options_args = [] + if fetch_sha is not None: + options_args.append("--rev=%s" % fetch_sha) + if options.get("oom-killer"): + options_args.append("--oom-killer") + if options.get("xvfb"): + options_args.append("--xvfb") + if not options.get("hosts"): + options_args.append("--no-hosts") + else: + options_args.append("--hosts") + # Check out the expected SHA unless it is overridden (e.g. to base_head). + if options.get("checkout"): + options_args.append("--checkout=%s" % options["checkout"]) + else: + options_args.append("--checkout=%s" % fetch_sha) + for browser in options.get("browser", []): + options_args.append("--browser=%s" % browser) + if options.get("channel"): + options_args.append("--channel=%s" % options["channel"]) + if options.get("install-certificates"): + options_args.append("--install-certificates") + + cmd_args["options_str"] = " ".join(str(item) for item in options_args) + + install_packages = task.get("install") + if install_packages: + install_items = ["apt update -qqy"] + install_items.extend("apt install -qqy %s" % item + for item in install_packages) + cmd_args["install_str"] = "\n".join("sudo %s;" % item for item in install_items) + + return ["/bin/bash", + "--login", + "-c", + """ +~/start.sh \ + %(repo_url)s \ + %(fetch_ref)s; +%(install_str)s +cd web-platform-tests; +./tools/ci/run_tc.py %(options_str)s -- %(task_cmd)s; +""" % cmd_args] + + +def get_owner(event): + pusher = event.get("pusher", {}).get("email", "") + if "@" in pusher: + return pusher + return "web-platform-tests@users.noreply.github.com" + + +def create_tc_task(event, task, taskgroup_id, depends_on_ids): + command = build_full_command(event, task) + task_id = taskcluster.slugId() + task_data = { + "taskGroupId": taskgroup_id, + "created": taskcluster.fromNowJSON(""), + "deadline": taskcluster.fromNowJSON(task["deadline"]), + "provisionerId": task["provisionerId"], + "schedulerId": task["schedulerId"], + "workerType": task["workerType"], + "metadata": { + "name": task["name"], + "description": task.get("description", ""), + "owner": get_owner(event), + "source": event["repository"]["clone_url"] + }, + "payload": { + "artifacts": task.get("artifacts"), + "command": command, + "image": task.get("image"), + "maxRunTime": task.get("maxRunTime"), + "env": task.get("env", {}), + }, + "extra": { + "github_event": json.dumps(event) + } + } + if depends_on_ids: + task_data["dependencies"] = depends_on_ids + task_data["requires"] = "all-completed" + return task_id, task_data + + +def build_task_graph(event, all_tasks, tasks): + task_id_map = OrderedDict() + taskgroup_id = os.environ.get("TASK_ID", taskcluster.slugId()) + + def add_task(task_name, task): + depends_on_ids = [] + if "depends-on" in task: + for depends_name in task["depends-on"]: + if depends_name not in task_id_map: + add_task(depends_name, + all_tasks[depends_name]) + depends_on_ids.append(task_id_map[depends_name][0]) + task_id, task_data = create_tc_task(event, task, taskgroup_id, depends_on_ids) + task_id_map[task_name] = (task_id, task_data) + + for task_name, task in iteritems(tasks): + add_task(task_name, task) + + return task_id_map + + +def create_tasks(queue, task_id_map): + for (task_id, task_data) in itervalues(task_id_map): + queue.createTask(task_id, task_data) + + +def get_event(queue, event_path): + if event_path is not None: + try: + with open(event_path) as f: + event_str = f.read() + except IOError: + logger.error("Missing event file at path %s" % event_path) + raise + elif "TASK_EVENT" in os.environ: + event_str = os.environ["TASK_EVENT"] + else: + event_str = fetch_event_data(queue) + if not event_str: + raise ValueError("Can't find GitHub event definition; for local testing pass --event-path") + try: + return json.loads(event_str) + except ValueError: + logger.error("Event was not valid JSON") + raise + + +def decide(event): + all_tasks = taskgraph.load_tasks_from_path(os.path.join(here, "tasks", "test.yml")) + + triggered_tasks = filter_triggers(event, all_tasks) + scheduled_tasks = filter_schedule_if(event, triggered_tasks) + + logger.info("UNSCHEDULED TASKS:\n %s" % "\n ".join(sorted(set(all_tasks.keys()) - + set(scheduled_tasks.keys())))) + logger.info("SCHEDULED TASKS:\n %s" % "\n ".join(sorted(scheduled_tasks.keys()))) + + task_id_map = build_task_graph(event, all_tasks, scheduled_tasks) + return task_id_map + + +def get_parser(): + parser = argparse.ArgumentParser() + parser.add_argument("--event-path", + help="Path to file containing serialized GitHub event") + parser.add_argument("--dry-run", action="store_true", + help="Don't actually create the tasks, just output the tasks that " + "would be created") + parser.add_argument("--tasks-path", + help="Path to file in which to write payload for all scheduled tasks") + return parser + + +def run(venv, **kwargs): + queue = taskcluster.Queue({'rootUrl': os.environ['TASKCLUSTER_PROXY_URL']}) + event = get_event(queue, event_path=kwargs["event_path"]) + + task_id_map = decide(event) + + try: + if not kwargs["dry_run"]: + create_tasks(queue, task_id_map) + else: + print(json.dumps(task_id_map, indent=2)) + finally: + if kwargs["tasks_path"]: + with open(kwargs["tasks_path"], "w") as f: + json.dump(task_id_map, f, indent=2) diff --git a/tests/wpt/web-platform-tests/tools/ci/tcdownload.py b/tests/wpt/web-platform-tests/tools/ci/tc/download.py similarity index 99% rename from tests/wpt/web-platform-tests/tools/ci/tcdownload.py rename to tests/wpt/web-platform-tests/tools/ci/tc/download.py index 256726da7b5..359ec334050 100644 --- a/tests/wpt/web-platform-tests/tools/ci/tcdownload.py +++ b/tests/wpt/web-platform-tests/tools/ci/tc/download.py @@ -15,6 +15,7 @@ logger = logging.getLogger("tc-download") # be https://community-tc.services.mozilla.com) TASKCLUSTER_ROOT_URL = 'https://taskcluster.net' + def get_parser(): parser = argparse.ArgumentParser() parser.add_argument("--ref", action="store", default="master", diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/taskgraph.py b/tests/wpt/web-platform-tests/tools/ci/tc/taskgraph.py new file mode 100644 index 00000000000..6a6cb497f2d --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/ci/tc/taskgraph.py @@ -0,0 +1,170 @@ +import json +import os +import re +from copy import deepcopy + +import six +import yaml +from six import iteritems + +here = os.path.dirname(__file__) + + +def first(iterable): + # First item from a list or iterator + if not hasattr(iterable, "next"): + if hasattr(iterable, "__iter__"): + iterable = iter(iterable) + else: + raise ValueError("Object isn't iterable") + return next(iterable) + + +def load_task_file(path): + with open(path) as f: + return yaml.safe_load(f) + + +def update_recursive(data, update_data): + for key, value in iteritems(update_data): + if key not in data: + data[key] = value + else: + initial_value = data[key] + if isinstance(value, dict): + if not isinstance(initial_value, dict): + raise ValueError("Variable %s has inconsistent types " + "(expected object)" % key) + update_recursive(initial_value, value) + elif isinstance(value, list): + if not isinstance(initial_value, list): + raise ValueError("Variable %s has inconsistent types " + "(expected list)" % key) + initial_value.extend(value) + else: + data[key] = value + + +def resolve_use(task_data, templates): + rv = {} + if "use" in task_data: + for template_name in task_data["use"]: + update_recursive(rv, deepcopy(templates[template_name])) + update_recursive(rv, task_data) + rv.pop("use", None) + return rv + + +def resolve_name(task_data, default_name): + if "name" not in task_data: + task_data["name"] = default_name + return task_data + + +def resolve_chunks(task_data): + if "chunks" not in task_data: + return [task_data] + rv = [] + total_chunks = task_data["chunks"] + for i in range(1, total_chunks + 1): + chunk_data = deepcopy(task_data) + chunk_data["chunks"] = {"id": i, + "total": total_chunks} + rv.append(chunk_data) + return rv + + +def replace_vars(input_string, variables): + # TODO: support replacing as a non-string type? + variable_re = re.compile(r"(?- + ./tools/ci/taskcluster-run.py + ${vars.browser} + -- + --channel=${vars.channel} + --log-wptreport=../artifacts/wpt_report.json + --log-wptscreenshot=../artifacts/wpt_screenshot.txt + --no-fail-on-unexpected + --this-chunk=${chunks.id} + --total-chunks=${chunks.total} + --test-type=${vars.suite} + trigger-master: + trigger: + branch: + - master + + trigger-push: + trigger: + branch: + - triggers/${vars.browser}_${vars.channel} + + trigger-daily: + trigger: + branch: + - epochs/daily + + trigger-weekly: + trigger: + branch: + - epochs/weekly + + trigger-pr: + trigger: + pull-request: + + browser-firefox: + depends-on: + - download-firefox-${vars.channel} + + browser-webkitgtk_minibrowser: {} + + browser-chrome: {} + + tox-python2: + env: + TOXENV: py27 + PY_COLORS: 0 + + tox-python3: + env: + TOXENV: py36 + PY_COLORS: 0 + install: + - python3-pip + + tests-affected: + options: + browser: + - ${vars.browser} + channel: ${vars.channel} + schedule-if: + run-job: + - affected_tests + +tasks: + # Run full suites on push + - $map: + for: + - vars: + suite: testharness + - vars: + suite: reftest + - vars: + suite: wdspec + do: + $map: + for: + - vars: + browser: firefox + channel: nightly + use: + - trigger-master + - trigger-push + - vars: + browser: firefox + channel: beta + use: + - trigger-weekly + - trigger-push + - vars: + browser: firefox + channel: stable + use: + - trigger-daily + - trigger-push + - vars: + browser: chrome + channel: dev + use: + - trigger-master + - trigger-push + - vars: + browser: chrome + channel: beta + use: + - trigger-weekly + - trigger-push + - vars: + browser: chrome + channel: stable + use: + - trigger-daily + - trigger-push + - vars: + browser: webkitgtk_minibrowser + channel: nightly + use: + - trigger-daily + - trigger-push + - vars: + browser: webkitgtk_minibrowser + channel: stable + use: + - trigger-weekly + - trigger-push + + do: + - ${vars.browser}-${vars.channel}-${vars.suite}: + use: + - wpt-base + - run-options + - wpt-run + - browser-${vars.browser} + - wpt-${vars.suite} + description: >- + A subset of WPT's "${vars.suite}" tests (chunk number ${chunks.id} + of ${chunks.total}), run in the ${vars.channel} release of + ${vars.browser}. + + - $map: + for: + - vars: + browser: firefox + channel: nightly + - vars: + browser: chrome + channel: dev + do: + - wpt-${vars.browser}-${vars.channel}-stability: + use: + - wpt-base + - run-options + - browser-${vars.browser} + - trigger-pr + - tests-affected + description: >- + Verify that all tests affected by a pull request are stable + when executed in ${vars.browser}. + command: >- + ./tools/ci/taskcluster-run.py + --commit-range base_head + ${vars.browser} + -- + --channel=${vars.channel} + --verify + + - wpt-${vars.browser}-${vars.channel}-results: + use: + - wpt-base + - run-options + - browser-${vars.browser} + - trigger-pr + - tests-affected + description: >- + Collect results for all tests affected by a pull request in + ${vars.browser}. + command: >- + ./tools/ci/taskcluster-run.py + --commit-range base_head + ${vars.browser} + -- + --channel=${vars.channel} + --no-fail-on-unexpected + --log-wptreport=../artifacts/wpt_report.json + --log-wptscreenshot=../artifacts/wpt_screenshot.txt + + - wpt-${vars.browser}-${vars.channel}-results-without-changes: + use: + - wpt-base + - run-options + - browser-${vars.browser} + - trigger-pr + - tests-affected + options: + checkout: base_head + description: >- + Collect results for all tests affected by a pull request in + ${vars.browser} but without the changes in the PR. + command: >- + ./tools/ci/taskcluster-run.py + --commit-range task_head + ${vars.browser} + -- + --channel=${vars.channel} + --no-fail-on-unexpected + --log-wptreport=../artifacts/wpt_report.json + --log-wptscreenshot=../artifacts/wpt_screenshot.txt + - $map: + for: + - vars: + channel: nightly + - vars: + channel: beta + - vars: + channel: stable + do: + download-firefox-${vars.channel}: + use: + - wpt-base + command: "./wpt install --download-only --destination /home/test/artifacts/ --channel=${vars.channel} firefox browser" + + - lint: + use: + - wpt-base + - trigger-master + - trigger-pr + description: >- + Lint for wpt-specific requirements + command: "./wpt lint --all" + + - update-built: + use: + - wpt-base + - trigger-pr + schedule-if: + run-job: + - update_built + command: "./tools/ci/ci_built_diff.sh" + + - tools/ unittests (Python 2): + use: + - wpt-base + - trigger-pr + - tox-python2 + description: >- + Unit tests for tools running under Python 2.7, excluding wptrunner + command: ./tools/ci/ci_tools_unittest.sh + env: + HYPOTHESIS_PROFILE: ci + schedule-if: + run-job: + - tools_unittest + + - tools/ unittests (Python 3): + description: >- + Unit tests for tools running under Python 3, excluding wptrunner + use: + - wpt-base + - trigger-pr + - tox-python3 + command: ./tools/ci/ci_tools_unittest.sh + env: + HYPOTHESIS_PROFILE: ci + schedule-if: + run-job: + - tools_unittest + + - tools/wpt/ tests: + description: >- + Integration tests for wpt commands + use: + - wpt-base + - trigger-pr + - tox-python2 + command: ./tools/ci/ci_wpt.sh + install: + - libnss3-tools + options: + oom-killer: true + browser: + - firefox + - chrome + channel: experimental + xvfb: true + hosts: true + schedule-if: + run-job: + - wpt_integration + + - resources/ tests: + description: >- + Tests for testharness.js and other files in resources/ + use: + - wpt-base + - trigger-pr + - tox-python2 + command: ./tools/ci/ci_resources_unittest.sh + options: + browser: + - firefox + xvfb: true + hosts: true + schedule-if: + run-job: + - resources_unittest + + - infrastructure/ tests: + description: >- + Smoketests for wptrunner + use: + - wpt-base + - trigger-pr + - tox-python2 + command: ./tools/ci/ci_wptrunner_infrastructure.sh + install: + - libnss3-tools + - libappindicator1 + - fonts-liberation + options: + oom-killer: true + browser: + - firefox + - chrome + channel: experimental + xvfb: true + hosts: false + schedule-if: + run-job: + - wptrunner_infrastructure diff --git a/tests/wpt/web-platform-tests/tools/taskcluster/testdata/master_push_event.json b/tests/wpt/web-platform-tests/tools/ci/tc/testdata/master_push_event.json similarity index 100% rename from tests/wpt/web-platform-tests/tools/taskcluster/testdata/master_push_event.json rename to tests/wpt/web-platform-tests/tools/ci/tc/testdata/master_push_event.json diff --git a/tests/wpt/web-platform-tests/tools/taskcluster/testdata/pr_event.json b/tests/wpt/web-platform-tests/tools/ci/tc/testdata/pr_event.json similarity index 100% rename from tests/wpt/web-platform-tests/tools/taskcluster/testdata/pr_event.json rename to tests/wpt/web-platform-tests/tools/ci/tc/testdata/pr_event.json diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/testdata/pr_event_tests_affected.json b/tests/wpt/web-platform-tests/tools/ci/tc/testdata/pr_event_tests_affected.json new file mode 100644 index 00000000000..792ea1bccce --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/ci/tc/testdata/pr_event_tests_affected.json @@ -0,0 +1,505 @@ +{ + "action": "synchronize", + "number": 20378, + "pull_request": { + "url": "https://api.github.com/repos/web-platform-tests/wpt/pulls/20378", + "id": 344287920, + "node_id": "MDExOlB1bGxSZXF1ZXN0MzQ0Mjg3OTIw", + "html_url": "https://github.com/web-platform-tests/wpt/pull/20378", + "diff_url": "https://github.com/web-platform-tests/wpt/pull/20378.diff", + "patch_url": "https://github.com/web-platform-tests/wpt/pull/20378.patch", + "issue_url": "https://api.github.com/repos/web-platform-tests/wpt/issues/20378", + "number": 20378, + "state": "open", + "locked": false, + "title": "Migrate more layout instability tests to WPT.", + "user": { + "login": "chromium-wpt-export-bot", + "id": 25752892, + "node_id": "MDQ6VXNlcjI1NzUyODky", + "avatar_url": "https://avatars1.githubusercontent.com/u/25752892?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/chromium-wpt-export-bot", + "html_url": "https://github.com/chromium-wpt-export-bot", + "followers_url": "https://api.github.com/users/chromium-wpt-export-bot/followers", + "following_url": "https://api.github.com/users/chromium-wpt-export-bot/following{/other_user}", + "gists_url": "https://api.github.com/users/chromium-wpt-export-bot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chromium-wpt-export-bot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chromium-wpt-export-bot/subscriptions", + "organizations_url": "https://api.github.com/users/chromium-wpt-export-bot/orgs", + "repos_url": "https://api.github.com/users/chromium-wpt-export-bot/repos", + "events_url": "https://api.github.com/users/chromium-wpt-export-bot/events{/privacy}", + "received_events_url": "https://api.github.com/users/chromium-wpt-export-bot/received_events", + "type": "User", + "site_admin": false + }, + "body": "Bug: 984109\nChange-Id: Ie31c63995f63f8acbfa26d97966ffe30016edd3c\nReviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1925447\nCommit-Queue: Steve Kobes \\\nReviewed-by: Nicolás Peña Moreno \\\nCr-Commit-Position: refs/heads/master@{#718648}\n\n", + "created_at": "2019-11-21T23:53:58Z", + "updated_at": "2019-11-25T15:54:19Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": "36726e3e992a83e80608acf47c886fc440390691", + "assignee": null, + "assignees": [ + + ], + "requested_reviewers": [ + + ], + "requested_teams": [ + + ], + "labels": [ + { + "id": 490891502, + "node_id": "MDU6TGFiZWw0OTA4OTE1MDI=", + "url": "https://api.github.com/repos/web-platform-tests/wpt/labels/chromium-export", + "name": "chromium-export", + "color": "4788f4", + "default": false, + "description": null + }, + { + "id": 1363199651, + "node_id": "MDU6TGFiZWwxMzYzMTk5NjUx", + "url": "https://api.github.com/repos/web-platform-tests/wpt/labels/layout-instability", + "name": "layout-instability", + "color": "ededed", + "default": false, + "description": null + } + ], + "milestone": null, + "commits_url": "https://api.github.com/repos/web-platform-tests/wpt/pulls/20378/commits", + "review_comments_url": "https://api.github.com/repos/web-platform-tests/wpt/pulls/20378/comments", + "review_comment_url": "https://api.github.com/repos/web-platform-tests/wpt/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/web-platform-tests/wpt/issues/20378/comments", + "statuses_url": "https://api.github.com/repos/web-platform-tests/wpt/statuses/7df84e3f87f05860a2b86d0b80dc3eb06d8e7103", + "head": { + "label": "web-platform-tests:chromium-export-cl-1925447", + "ref": "chromium-export-cl-1925447", + "sha": "7df84e3f87f05860a2b86d0b80dc3eb06d8e7103", + "user": { + "login": "web-platform-tests", + "id": 37226233, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM3MjI2MjMz", + "avatar_url": "https://avatars0.githubusercontent.com/u/37226233?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/web-platform-tests", + "html_url": "https://github.com/web-platform-tests", + "followers_url": "https://api.github.com/users/web-platform-tests/followers", + "following_url": "https://api.github.com/users/web-platform-tests/following{/other_user}", + "gists_url": "https://api.github.com/users/web-platform-tests/gists{/gist_id}", + "starred_url": "https://api.github.com/users/web-platform-tests/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/web-platform-tests/subscriptions", + "organizations_url": "https://api.github.com/users/web-platform-tests/orgs", + "repos_url": "https://api.github.com/users/web-platform-tests/repos", + "events_url": "https://api.github.com/users/web-platform-tests/events{/privacy}", + "received_events_url": "https://api.github.com/users/web-platform-tests/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 3618133, + "node_id": "MDEwOlJlcG9zaXRvcnkzNjE4MTMz", + "name": "wpt", + "full_name": "web-platform-tests/wpt", + "private": false, + "owner": { + "login": "web-platform-tests", + "id": 37226233, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM3MjI2MjMz", + "avatar_url": "https://avatars0.githubusercontent.com/u/37226233?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/web-platform-tests", + "html_url": "https://github.com/web-platform-tests", + "followers_url": "https://api.github.com/users/web-platform-tests/followers", + "following_url": "https://api.github.com/users/web-platform-tests/following{/other_user}", + "gists_url": "https://api.github.com/users/web-platform-tests/gists{/gist_id}", + "starred_url": "https://api.github.com/users/web-platform-tests/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/web-platform-tests/subscriptions", + "organizations_url": "https://api.github.com/users/web-platform-tests/orgs", + "repos_url": "https://api.github.com/users/web-platform-tests/repos", + "events_url": "https://api.github.com/users/web-platform-tests/events{/privacy}", + "received_events_url": "https://api.github.com/users/web-platform-tests/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/web-platform-tests/wpt", + "description": "Test suites for Web platform specs — including WHATWG, W3C, and others", + "fork": false, + "url": "https://api.github.com/repos/web-platform-tests/wpt", + "forks_url": "https://api.github.com/repos/web-platform-tests/wpt/forks", + "keys_url": "https://api.github.com/repos/web-platform-tests/wpt/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/web-platform-tests/wpt/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/web-platform-tests/wpt/teams", + "hooks_url": "https://api.github.com/repos/web-platform-tests/wpt/hooks", + "issue_events_url": "https://api.github.com/repos/web-platform-tests/wpt/issues/events{/number}", + "events_url": "https://api.github.com/repos/web-platform-tests/wpt/events", + "assignees_url": "https://api.github.com/repos/web-platform-tests/wpt/assignees{/user}", + "branches_url": "https://api.github.com/repos/web-platform-tests/wpt/branches{/branch}", + "tags_url": "https://api.github.com/repos/web-platform-tests/wpt/tags", + "blobs_url": "https://api.github.com/repos/web-platform-tests/wpt/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/web-platform-tests/wpt/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/web-platform-tests/wpt/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/web-platform-tests/wpt/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/web-platform-tests/wpt/statuses/{sha}", + "languages_url": "https://api.github.com/repos/web-platform-tests/wpt/languages", + "stargazers_url": "https://api.github.com/repos/web-platform-tests/wpt/stargazers", + "contributors_url": "https://api.github.com/repos/web-platform-tests/wpt/contributors", + "subscribers_url": "https://api.github.com/repos/web-platform-tests/wpt/subscribers", + "subscription_url": "https://api.github.com/repos/web-platform-tests/wpt/subscription", + "commits_url": "https://api.github.com/repos/web-platform-tests/wpt/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/web-platform-tests/wpt/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/web-platform-tests/wpt/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/web-platform-tests/wpt/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/web-platform-tests/wpt/contents/{+path}", + "compare_url": "https://api.github.com/repos/web-platform-tests/wpt/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/web-platform-tests/wpt/merges", + "archive_url": "https://api.github.com/repos/web-platform-tests/wpt/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/web-platform-tests/wpt/downloads", + "issues_url": "https://api.github.com/repos/web-platform-tests/wpt/issues{/number}", + "pulls_url": "https://api.github.com/repos/web-platform-tests/wpt/pulls{/number}", + "milestones_url": "https://api.github.com/repos/web-platform-tests/wpt/milestones{/number}", + "notifications_url": "https://api.github.com/repos/web-platform-tests/wpt/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/web-platform-tests/wpt/labels{/name}", + "releases_url": "https://api.github.com/repos/web-platform-tests/wpt/releases{/id}", + "deployments_url": "https://api.github.com/repos/web-platform-tests/wpt/deployments", + "created_at": "2012-03-04T12:58:11Z", + "updated_at": "2019-11-25T15:40:59Z", + "pushed_at": "2019-11-25T15:54:18Z", + "git_url": "git://github.com/web-platform-tests/wpt.git", + "ssh_url": "git@github.com:web-platform-tests/wpt.git", + "clone_url": "https://github.com/web-platform-tests/wpt.git", + "svn_url": "https://github.com/web-platform-tests/wpt", + "homepage": "https://web-platform-tests.org/", + "size": 329278, + "stargazers_count": 2536, + "watchers_count": 2536, + "language": "HTML", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 1837, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1576, + "license": { + "key": "other", + "name": "Other", + "spdx_id": "NOASSERTION", + "url": null, + "node_id": "MDc6TGljZW5zZTA=" + }, + "forks": 1837, + "open_issues": 1576, + "watchers": 2536, + "default_branch": "master" + } + }, + "base": { + "label": "web-platform-tests:master", + "ref": "master", + "sha": "90ebe5c33c44090271759f8e9dc43d0b5bd0f8f7", + "user": { + "login": "web-platform-tests", + "id": 37226233, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM3MjI2MjMz", + "avatar_url": "https://avatars0.githubusercontent.com/u/37226233?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/web-platform-tests", + "html_url": "https://github.com/web-platform-tests", + "followers_url": "https://api.github.com/users/web-platform-tests/followers", + "following_url": "https://api.github.com/users/web-platform-tests/following{/other_user}", + "gists_url": "https://api.github.com/users/web-platform-tests/gists{/gist_id}", + "starred_url": "https://api.github.com/users/web-platform-tests/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/web-platform-tests/subscriptions", + "organizations_url": "https://api.github.com/users/web-platform-tests/orgs", + "repos_url": "https://api.github.com/users/web-platform-tests/repos", + "events_url": "https://api.github.com/users/web-platform-tests/events{/privacy}", + "received_events_url": "https://api.github.com/users/web-platform-tests/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 3618133, + "node_id": "MDEwOlJlcG9zaXRvcnkzNjE4MTMz", + "name": "wpt", + "full_name": "web-platform-tests/wpt", + "private": false, + "owner": { + "login": "web-platform-tests", + "id": 37226233, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM3MjI2MjMz", + "avatar_url": "https://avatars0.githubusercontent.com/u/37226233?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/web-platform-tests", + "html_url": "https://github.com/web-platform-tests", + "followers_url": "https://api.github.com/users/web-platform-tests/followers", + "following_url": "https://api.github.com/users/web-platform-tests/following{/other_user}", + "gists_url": "https://api.github.com/users/web-platform-tests/gists{/gist_id}", + "starred_url": "https://api.github.com/users/web-platform-tests/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/web-platform-tests/subscriptions", + "organizations_url": "https://api.github.com/users/web-platform-tests/orgs", + "repos_url": "https://api.github.com/users/web-platform-tests/repos", + "events_url": "https://api.github.com/users/web-platform-tests/events{/privacy}", + "received_events_url": "https://api.github.com/users/web-platform-tests/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/web-platform-tests/wpt", + "description": "Test suites for Web platform specs — including WHATWG, W3C, and others", + "fork": false, + "url": "https://api.github.com/repos/web-platform-tests/wpt", + "forks_url": "https://api.github.com/repos/web-platform-tests/wpt/forks", + "keys_url": "https://api.github.com/repos/web-platform-tests/wpt/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/web-platform-tests/wpt/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/web-platform-tests/wpt/teams", + "hooks_url": "https://api.github.com/repos/web-platform-tests/wpt/hooks", + "issue_events_url": "https://api.github.com/repos/web-platform-tests/wpt/issues/events{/number}", + "events_url": "https://api.github.com/repos/web-platform-tests/wpt/events", + "assignees_url": "https://api.github.com/repos/web-platform-tests/wpt/assignees{/user}", + "branches_url": "https://api.github.com/repos/web-platform-tests/wpt/branches{/branch}", + "tags_url": "https://api.github.com/repos/web-platform-tests/wpt/tags", + "blobs_url": "https://api.github.com/repos/web-platform-tests/wpt/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/web-platform-tests/wpt/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/web-platform-tests/wpt/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/web-platform-tests/wpt/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/web-platform-tests/wpt/statuses/{sha}", + "languages_url": "https://api.github.com/repos/web-platform-tests/wpt/languages", + "stargazers_url": "https://api.github.com/repos/web-platform-tests/wpt/stargazers", + "contributors_url": "https://api.github.com/repos/web-platform-tests/wpt/contributors", + "subscribers_url": "https://api.github.com/repos/web-platform-tests/wpt/subscribers", + "subscription_url": "https://api.github.com/repos/web-platform-tests/wpt/subscription", + "commits_url": "https://api.github.com/repos/web-platform-tests/wpt/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/web-platform-tests/wpt/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/web-platform-tests/wpt/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/web-platform-tests/wpt/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/web-platform-tests/wpt/contents/{+path}", + "compare_url": "https://api.github.com/repos/web-platform-tests/wpt/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/web-platform-tests/wpt/merges", + "archive_url": "https://api.github.com/repos/web-platform-tests/wpt/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/web-platform-tests/wpt/downloads", + "issues_url": "https://api.github.com/repos/web-platform-tests/wpt/issues{/number}", + "pulls_url": "https://api.github.com/repos/web-platform-tests/wpt/pulls{/number}", + "milestones_url": "https://api.github.com/repos/web-platform-tests/wpt/milestones{/number}", + "notifications_url": "https://api.github.com/repos/web-platform-tests/wpt/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/web-platform-tests/wpt/labels{/name}", + "releases_url": "https://api.github.com/repos/web-platform-tests/wpt/releases{/id}", + "deployments_url": "https://api.github.com/repos/web-platform-tests/wpt/deployments", + "created_at": "2012-03-04T12:58:11Z", + "updated_at": "2019-11-25T15:40:59Z", + "pushed_at": "2019-11-25T15:54:18Z", + "git_url": "git://github.com/web-platform-tests/wpt.git", + "ssh_url": "git@github.com:web-platform-tests/wpt.git", + "clone_url": "https://github.com/web-platform-tests/wpt.git", + "svn_url": "https://github.com/web-platform-tests/wpt", + "homepage": "https://web-platform-tests.org/", + "size": 329278, + "stargazers_count": 2536, + "watchers_count": 2536, + "language": "HTML", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 1837, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1576, + "license": { + "key": "other", + "name": "Other", + "spdx_id": "NOASSERTION", + "url": null, + "node_id": "MDc6TGljZW5zZTA=" + }, + "forks": 1837, + "open_issues": 1576, + "watchers": 2536, + "default_branch": "master" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/web-platform-tests/wpt/pulls/20378" + }, + "html": { + "href": "https://github.com/web-platform-tests/wpt/pull/20378" + }, + "issue": { + "href": "https://api.github.com/repos/web-platform-tests/wpt/issues/20378" + }, + "comments": { + "href": "https://api.github.com/repos/web-platform-tests/wpt/issues/20378/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/web-platform-tests/wpt/pulls/20378/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/web-platform-tests/wpt/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/web-platform-tests/wpt/pulls/20378/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/web-platform-tests/wpt/statuses/7df84e3f87f05860a2b86d0b80dc3eb06d8e7103" + } + }, + "author_association": "COLLABORATOR", + "draft": false, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 431, + "deletions": 0, + "changed_files": 11 + }, + "before": "86742511fa37e1e2c1635b77431bd46958ecfb92", + "after": "7df84e3f87f05860a2b86d0b80dc3eb06d8e7103", + "repository": { + "id": 3618133, + "node_id": "MDEwOlJlcG9zaXRvcnkzNjE4MTMz", + "name": "wpt", + "full_name": "web-platform-tests/wpt", + "private": false, + "owner": { + "login": "web-platform-tests", + "id": 37226233, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM3MjI2MjMz", + "avatar_url": "https://avatars0.githubusercontent.com/u/37226233?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/web-platform-tests", + "html_url": "https://github.com/web-platform-tests", + "followers_url": "https://api.github.com/users/web-platform-tests/followers", + "following_url": "https://api.github.com/users/web-platform-tests/following{/other_user}", + "gists_url": "https://api.github.com/users/web-platform-tests/gists{/gist_id}", + "starred_url": "https://api.github.com/users/web-platform-tests/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/web-platform-tests/subscriptions", + "organizations_url": "https://api.github.com/users/web-platform-tests/orgs", + "repos_url": "https://api.github.com/users/web-platform-tests/repos", + "events_url": "https://api.github.com/users/web-platform-tests/events{/privacy}", + "received_events_url": "https://api.github.com/users/web-platform-tests/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/web-platform-tests/wpt", + "description": "Test suites for Web platform specs — including WHATWG, W3C, and others", + "fork": false, + "url": "https://api.github.com/repos/web-platform-tests/wpt", + "forks_url": "https://api.github.com/repos/web-platform-tests/wpt/forks", + "keys_url": "https://api.github.com/repos/web-platform-tests/wpt/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/web-platform-tests/wpt/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/web-platform-tests/wpt/teams", + "hooks_url": "https://api.github.com/repos/web-platform-tests/wpt/hooks", + "issue_events_url": "https://api.github.com/repos/web-platform-tests/wpt/issues/events{/number}", + "events_url": "https://api.github.com/repos/web-platform-tests/wpt/events", + "assignees_url": "https://api.github.com/repos/web-platform-tests/wpt/assignees{/user}", + "branches_url": "https://api.github.com/repos/web-platform-tests/wpt/branches{/branch}", + "tags_url": "https://api.github.com/repos/web-platform-tests/wpt/tags", + "blobs_url": "https://api.github.com/repos/web-platform-tests/wpt/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/web-platform-tests/wpt/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/web-platform-tests/wpt/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/web-platform-tests/wpt/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/web-platform-tests/wpt/statuses/{sha}", + "languages_url": "https://api.github.com/repos/web-platform-tests/wpt/languages", + "stargazers_url": "https://api.github.com/repos/web-platform-tests/wpt/stargazers", + "contributors_url": "https://api.github.com/repos/web-platform-tests/wpt/contributors", + "subscribers_url": "https://api.github.com/repos/web-platform-tests/wpt/subscribers", + "subscription_url": "https://api.github.com/repos/web-platform-tests/wpt/subscription", + "commits_url": "https://api.github.com/repos/web-platform-tests/wpt/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/web-platform-tests/wpt/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/web-platform-tests/wpt/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/web-platform-tests/wpt/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/web-platform-tests/wpt/contents/{+path}", + "compare_url": "https://api.github.com/repos/web-platform-tests/wpt/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/web-platform-tests/wpt/merges", + "archive_url": "https://api.github.com/repos/web-platform-tests/wpt/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/web-platform-tests/wpt/downloads", + "issues_url": "https://api.github.com/repos/web-platform-tests/wpt/issues{/number}", + "pulls_url": "https://api.github.com/repos/web-platform-tests/wpt/pulls{/number}", + "milestones_url": "https://api.github.com/repos/web-platform-tests/wpt/milestones{/number}", + "notifications_url": "https://api.github.com/repos/web-platform-tests/wpt/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/web-platform-tests/wpt/labels{/name}", + "releases_url": "https://api.github.com/repos/web-platform-tests/wpt/releases{/id}", + "deployments_url": "https://api.github.com/repos/web-platform-tests/wpt/deployments", + "created_at": "2012-03-04T12:58:11Z", + "updated_at": "2019-11-25T15:40:59Z", + "pushed_at": "2019-11-25T15:54:18Z", + "git_url": "git://github.com/web-platform-tests/wpt.git", + "ssh_url": "git@github.com:web-platform-tests/wpt.git", + "clone_url": "https://github.com/web-platform-tests/wpt.git", + "svn_url": "https://github.com/web-platform-tests/wpt", + "homepage": "https://web-platform-tests.org/", + "size": 329278, + "stargazers_count": 2536, + "watchers_count": 2536, + "language": "HTML", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": true, + "forks_count": 1837, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 1576, + "license": { + "key": "other", + "name": "Other", + "spdx_id": "NOASSERTION", + "url": null, + "node_id": "MDc6TGljZW5zZTA=" + }, + "forks": 1837, + "open_issues": 1576, + "watchers": 2536, + "default_branch": "master" + }, + "organization": { + "login": "web-platform-tests", + "id": 37226233, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM3MjI2MjMz", + "url": "https://api.github.com/orgs/web-platform-tests", + "repos_url": "https://api.github.com/orgs/web-platform-tests/repos", + "events_url": "https://api.github.com/orgs/web-platform-tests/events", + "hooks_url": "https://api.github.com/orgs/web-platform-tests/hooks", + "issues_url": "https://api.github.com/orgs/web-platform-tests/issues", + "members_url": "https://api.github.com/orgs/web-platform-tests/members{/member}", + "public_members_url": "https://api.github.com/orgs/web-platform-tests/public_members{/member}", + "avatar_url": "https://avatars0.githubusercontent.com/u/37226233?v=4", + "description": "" + }, + "sender": { + "login": "chromium-wpt-export-bot", + "id": 25752892, + "node_id": "MDQ6VXNlcjI1NzUyODky", + "avatar_url": "https://avatars1.githubusercontent.com/u/25752892?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/chromium-wpt-export-bot", + "html_url": "https://github.com/chromium-wpt-export-bot", + "followers_url": "https://api.github.com/users/chromium-wpt-export-bot/followers", + "following_url": "https://api.github.com/users/chromium-wpt-export-bot/following{/other_user}", + "gists_url": "https://api.github.com/users/chromium-wpt-export-bot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/chromium-wpt-export-bot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/chromium-wpt-export-bot/subscriptions", + "organizations_url": "https://api.github.com/users/chromium-wpt-export-bot/orgs", + "repos_url": "https://api.github.com/users/chromium-wpt-export-bot/repos", + "events_url": "https://api.github.com/users/chromium-wpt-export-bot/events{/privacy}", + "received_events_url": "https://api.github.com/users/chromium-wpt-export-bot/received_events", + "type": "User", + "site_admin": false + } +} diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_decision.py b/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_decision.py new file mode 100644 index 00000000000..425b5829edd --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_decision.py @@ -0,0 +1,54 @@ +import mock +import pytest + +from tools.ci.tc import decision +from six import iteritems + + +@pytest.mark.parametrize("run_jobs,tasks,expected", [ + ([], {"task-no-schedule-if": {}}, ["task-no-schedule-if"]), + ([], {"task-schedule-if-no-run-job": {"schedule-if": {}}}, []), + (["job"], + {"job-present": {"schedule-if": {"run-job": ["other-job", "job"]}}}, + ["job-present"]), + (["job"], {"job-missing": {"schedule-if": {"run-job": ["other-job"]}}}, []), + (["all"], {"job-all": {"schedule-if": {"run-job": ["other-job"]}}}, ["job-all"]), + (["job"], + {"job-1": {"schedule-if": {"run-job": ["job"]}}, + "job-2": {"schedule-if": {"run-job": ["other-job"]}}}, + ["job-1"]), +]) +def test_filter_schedule_if(run_jobs, tasks, expected): + with mock.patch("tools.ci.tc.decision.get_run_jobs", + return_value=run_jobs) as get_run_jobs: + assert (decision.filter_schedule_if({}, tasks) == + {name: tasks[name] for name in expected}) + get_run_jobs.call_count in (0, 1) + + +@pytest.mark.parametrize("msg,expected", [ + ("Some initial line\n\ntc-jobs:foo,bar", {"foo", "bar"}), + ("Some initial line\n\ntc-jobs:foo, bar", {"foo", "bar"}), + ("tc-jobs:foo, bar \nbaz", {"foo", "bar"}), + ("tc-jobs:all", {"all"}), + ("", set()), + ("tc-jobs:foo\ntc-jobs:bar", {"foo"})]) +@pytest.mark.parametrize("event", [ + {"commits": [{"message": ""}]}, + {"pull_request": {"body": ""}} +]) +def test_extra_jobs_pr(msg, expected, event): + def sub(obj): + """Copy obj, except if it's a string with the value + replace it with the value of the msg argument""" + if isinstance(obj, dict): + return {key: sub(value) for (key, value) in iteritems(obj)} + elif isinstance(obj, list): + return [sub(value) for value in obj] + elif obj == "": + return msg + return obj + + event = sub(event) + + assert decision.get_extra_jobs(event) == expected diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_taskgraph.py b/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_taskgraph.py new file mode 100644 index 00000000000..dd8535bb647 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_taskgraph.py @@ -0,0 +1,146 @@ +import pytest +import yaml + +from tools.ci.tc import taskgraph + +@pytest.mark.parametrize("data, update_data, expected", [ + ({"a": 1}, {"b": 2}, {"a": 1, "b": 2}), + ({"a": 1}, {"a": 2}, {"a": 2}), + ({"a": [1]}, {"a": [2]}, {"a": [1, 2]}), + ({"a": {"b": 1, "c": 2}}, {"a": {"b": 2, "d": 3}}, {"a": {"b": 2, "c": 2, "d": 3}}), + ({"a": {"b": [1]}}, {"a": {"b": [2]}}, {"a": {"b": [1, 2]}}), +] +) +def test_update_recursive(data, update_data, expected): + taskgraph.update_recursive(data, update_data) + assert data == expected + + +def test_use(): + data = """ +components: + component1: + a: 1 + b: [1] + c: "c" + component2: + a: 2 + b: [2] + d: "d" +tasks: + - task1: + use: + - component1 + - component2 + b: [3] + c: "e" +""" + tasks_data = yaml.safe_load(data) + assert taskgraph.load_tasks(tasks_data) == { + "task1": { + "a": 2, + "b": [1,2,3], + "c": "e", + "d": "d", + "name": "task1" + } + } + + +def test_var(): + data = """ +components: + component1: + a: ${vars.value} +tasks: + - task1: + use: + - component1 + vars: + value: 1 +""" + tasks_data = yaml.safe_load(data) + assert taskgraph.load_tasks(tasks_data) == { + "task1": { + "a": "1", + "vars": {"value": 1}, + "name": "task1" + } + } + + +def test_map(): + data = """ +components: {} +tasks: + - $map: + for: + - vars: + a: 1 + b: [1] + - vars: + a: 2 + b: [2] + do: + - task1-${vars.a}: + a: ${vars.a} + b: [3] + - task2-${vars.a}: + a: ${vars.a} + b: [4] +""" + tasks_data = yaml.safe_load(data) + assert taskgraph.load_tasks(tasks_data) == { + "task1-1": { + "a": "1", + "b": [1, 3], + "vars": {"a": 1}, + "name": "task1-1" + }, + "task1-2": { + "a": "2", + "b": [2, 3], + "vars": {"a": 2}, + "name": "task1-2" + }, + "task2-1": { + "a": "1", + "b": [1, 4], + "vars": {"a": 1}, + "name": "task2-1" + }, + "task2-2": { + "a": "2", + "b": [2, 4], + "vars": {"a": 2}, + "name": "task2-2" + }, + + } + + +def test_chunks(): + data = """ +components: {} +tasks: + - task1: + name: task1-${chunks.id} + chunks: 2 +""" + tasks_data = yaml.safe_load(data) + assert taskgraph.load_tasks(tasks_data) == { + "task1-1": { + "name": "task1-1", + "chunks": { + "id": 1, + "total": 2 + } + }, + "task1-2": { + "name": "task1-2", + "chunks": { + "id": 2, + "total": 2 + } + } + } diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_valid.py b/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_valid.py new file mode 100644 index 00000000000..9480178206d --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/ci/tc/tests/test_valid.py @@ -0,0 +1,152 @@ +import json +import os + +import jsone +import mock +import pytest +import requests +import sys +import yaml +from jsonschema import validate + +from tools.ci.tc import decision + +here = os.path.dirname(__file__) +root = os.path.abspath(os.path.join(here, "..", "..", "..", "..")) + + +def data_path(filename): + return os.path.join(here, "..", "testdata", filename) + + +@pytest.mark.xfail(sys.version_info.major == 2, + reason="taskcluster library has an encoding bug " + "https://github.com/taskcluster/json-e/issues/338") +def test_verify_taskcluster_yml(): + """Verify that the json-e in the .taskcluster.yml is valid""" + with open(os.path.join(root, ".taskcluster.yml")) as f: + template = yaml.safe_load(f) + + events = [("pr_event.json", "github-pull-request", "Pull Request"), + ("master_push_event.json", "github-push", "Push to master")] + + for filename, tasks_for, title in events: + with open(data_path(filename)) as f: + event = json.load(f) + + context = {"tasks_for": tasks_for, + "event": event, + "as_slugid": lambda x: x} + + jsone.render(template, context) + + +def test_verify_payload(): + """Verify that the decision task produces tasks with a valid payload""" + from tools.ci.tc.decision import decide + + create_task_schema = requests.get( + "https://raw.githubusercontent.com/taskcluster/taskcluster/blob/master/services/queue/schemas/v1/create-task-request.yml") + create_task_schema = yaml.safe_load(create_task_schema.content) + + payload_schema = requests.get("https://raw.githubusercontent.com/taskcluster/docker-worker/master/schemas/v1/payload.json").json() + + jobs = ["lint", + "manifest_upload", + "resources_unittest", + "tools_unittest", + "wpt_integration", + "wptrunner_infrastructure", + "wptrunner_unittest"] + + for filename in ["pr_event.json", "master_push_event.json"]: + with open(data_path(filename)) as f: + event = json.load(f) + + with mock.patch("tools.ci.tc.decision.get_fetch_rev", return_value=(event["after"], None)): + with mock.patch("tools.ci.tc.decision.get_run_jobs", return_value=set(jobs)): + task_id_map = decide(event) + for name, (task_id, task_data) in task_id_map.items(): + try: + validate(instance=task_data, schema=create_task_schema) + validate(instance=task_data["payload"], schema=payload_schema) + except Exception as e: + print("Validation failed for task '%s':\n%s" % (name, json.dumps(task_data, indent=2))) + raise e + + +@pytest.mark.parametrize("event_path,is_pr,files_changed,expected", [ + ("master_push_event.json", False, None, + {'download-firefox-nightly', + 'wpt-firefox-nightly-testharness-1', + 'wpt-firefox-nightly-testharness-2', + 'wpt-firefox-nightly-testharness-3', + 'wpt-firefox-nightly-testharness-4', + 'wpt-firefox-nightly-testharness-5', + 'wpt-firefox-nightly-testharness-6', + 'wpt-firefox-nightly-testharness-7', + 'wpt-firefox-nightly-testharness-8', + 'wpt-firefox-nightly-testharness-9', + 'wpt-firefox-nightly-testharness-10', + 'wpt-firefox-nightly-testharness-11', + 'wpt-firefox-nightly-testharness-12', + 'wpt-firefox-nightly-testharness-13', + 'wpt-firefox-nightly-testharness-14', + 'wpt-firefox-nightly-testharness-15', + 'wpt-firefox-nightly-testharness-16', + 'wpt-chrome-dev-testharness-1', + 'wpt-chrome-dev-testharness-2', + 'wpt-chrome-dev-testharness-3', + 'wpt-chrome-dev-testharness-4', + 'wpt-chrome-dev-testharness-5', + 'wpt-chrome-dev-testharness-6', + 'wpt-chrome-dev-testharness-7', + 'wpt-chrome-dev-testharness-8', + 'wpt-chrome-dev-testharness-9', + 'wpt-chrome-dev-testharness-10', + 'wpt-chrome-dev-testharness-11', + 'wpt-chrome-dev-testharness-12', + 'wpt-chrome-dev-testharness-13', + 'wpt-chrome-dev-testharness-14', + 'wpt-chrome-dev-testharness-15', + 'wpt-chrome-dev-testharness-16', + 'wpt-firefox-nightly-reftest-1', + 'wpt-firefox-nightly-reftest-2', + 'wpt-firefox-nightly-reftest-3', + 'wpt-firefox-nightly-reftest-4', + 'wpt-firefox-nightly-reftest-5', + 'wpt-chrome-dev-reftest-1', + 'wpt-chrome-dev-reftest-2', + 'wpt-chrome-dev-reftest-3', + 'wpt-chrome-dev-reftest-4', + 'wpt-chrome-dev-reftest-5', + 'wpt-firefox-nightly-wdspec-1', + 'wpt-chrome-dev-wdspec-1', + 'lint'}), + ("pr_event.json", True, {".taskcluster.yml",".travis.yml","tools/ci/start.sh"}, + {'lint', + 'tools/ unittests (Python 2)', + 'tools/ unittests (Python 3)', + 'tools/wpt/ tests', + 'resources/ tests', + 'infrastructure/ tests'}), + # More tests are affected in the actual PR but it shouldn't affect the scheduled tasks + ("pr_event_tests_affected.json", True, {"layout-instability/clip-negative-bottom-margin.html", + "layout-instability/composited-element-movement.html"}, + {'download-firefox-nightly', + 'wpt-firefox-nightly-stability', + 'wpt-firefox-nightly-results', + 'wpt-firefox-nightly-results-without-changes', + 'wpt-chrome-dev-stability', + 'wpt-chrome-dev-results', + 'wpt-chrome-dev-results-without-changes', + 'lint'}), +]) +def test_schedule_tasks(event_path, is_pr, files_changed, expected): + with mock.patch("tools.ci.tc.decision.get_fetch_rev", return_value=(is_pr, None)): + with mock.patch("tools.wpt.testfiles.repo_files_changed", + return_value=files_changed): + with open(data_path(event_path)) as event_file: + event = json.load(event_file) + scheduled = decision.decide(event) + assert set(scheduled.keys()) == expected diff --git a/tests/wpt/web-platform-tests/tools/ci/tests/test_run_tc.py b/tests/wpt/web-platform-tests/tools/ci/tests/test_run_tc.py deleted file mode 100644 index a72dcfe5cfd..00000000000 --- a/tests/wpt/web-platform-tests/tools/ci/tests/test_run_tc.py +++ /dev/null @@ -1,33 +0,0 @@ -import pytest - -from six import iteritems - -from tools.ci import run_tc - - -@pytest.mark.parametrize("msg,expected", [ - ("Some initial line\n\ntc-jobs:foo,bar", {"foo", "bar"}), - ("Some initial line\n\ntc-jobs:foo, bar", {"foo", "bar"}), - ("tc-jobs:foo, bar \nbaz", {"foo", "bar"}), - ("tc-jobs:all", {"all"}), - ("", set()), - ("tc-jobs:foo\ntc-jobs:bar", {"foo"})]) -@pytest.mark.parametrize("event", [ - {"commits": [{"message": ""}]}, - {"pull_request": {"body": ""}} -]) -def test_extra_jobs_pr(msg, expected, event): - def sub(obj): - """Copy obj, except if it's a string with the value - replace it with the value of the msg argument""" - if isinstance(obj, dict): - return {key: sub(value) for (key, value) in iteritems(obj)} - elif isinstance(obj, list): - return [sub(value) for value in obj] - elif obj == "": - return msg - return obj - - event = sub(event) - - assert run_tc.get_extra_jobs(event) == expected diff --git a/tests/wpt/web-platform-tests/tools/docker/frontend.py b/tests/wpt/web-platform-tests/tools/docker/frontend.py index c4a20734582..976156cf65a 100644 --- a/tests/wpt/web-platform-tests/tools/docker/frontend.py +++ b/tests/wpt/web-platform-tests/tools/docker/frontend.py @@ -29,6 +29,8 @@ def run(*args, **kwargs): build() args = ["docker", "run"] + args.extend(["--security-opt", "seccomp:%s" % + os.path.join(wpt_root, "tools", "docker", "seccomp.json")]) if kwargs["privileged"]: args.append("--privileged") if kwargs["checkout"]: diff --git a/tests/wpt/web-platform-tests/tools/docker/seccomp.json b/tests/wpt/web-platform-tests/tools/docker/seccomp.json new file mode 100644 index 00000000000..8e8274ce328 --- /dev/null +++ b/tests/wpt/web-platform-tests/tools/docker/seccomp.json @@ -0,0 +1,798 @@ +{ + "defaultAction": "SCMP_ACT_ERRNO", + "archMap": [ + { + "architecture": "SCMP_ARCH_X86_64", + "subArchitectures": [ + "SCMP_ARCH_X86", + "SCMP_ARCH_X32" + ] + }, + { + "architecture": "SCMP_ARCH_AARCH64", + "subArchitectures": [ + "SCMP_ARCH_ARM" + ] + }, + { + "architecture": "SCMP_ARCH_MIPS64", + "subArchitectures": [ + "SCMP_ARCH_MIPS", + "SCMP_ARCH_MIPS64N32" + ] + }, + { + "architecture": "SCMP_ARCH_MIPS64N32", + "subArchitectures": [ + "SCMP_ARCH_MIPS", + "SCMP_ARCH_MIPS64" + ] + }, + { + "architecture": "SCMP_ARCH_MIPSEL64", + "subArchitectures": [ + "SCMP_ARCH_MIPSEL", + "SCMP_ARCH_MIPSEL64N32" + ] + }, + { + "architecture": "SCMP_ARCH_MIPSEL64N32", + "subArchitectures": [ + "SCMP_ARCH_MIPSEL", + "SCMP_ARCH_MIPSEL64" + ] + }, + { + "architecture": "SCMP_ARCH_S390X", + "subArchitectures": [ + "SCMP_ARCH_S390" + ] + } + ], + "syscalls": [ + { + "names": [ + "accept", + "accept4", + "access", + "adjtimex", + "alarm", + "bind", + "brk", + "capget", + "capset", + "chdir", + "chmod", + "chown", + "chown32", + "clock_getres", + "clock_gettime", + "clock_nanosleep", + "clone", + "close", + "connect", + "copy_file_range", + "creat", + "dup", + "dup2", + "dup3", + "epoll_create", + "epoll_create1", + "epoll_ctl", + "epoll_ctl_old", + "epoll_pwait", + "epoll_wait", + "epoll_wait_old", + "eventfd", + "eventfd2", + "execve", + "execveat", + "exit", + "exit_group", + "faccessat", + "fadvise64", + "fadvise64_64", + "fallocate", + "fanotify_mark", + "fchdir", + "fchmod", + "fchmodat", + "fchown", + "fchown32", + "fchownat", + "fcntl", + "fcntl64", + "fdatasync", + "fgetxattr", + "flistxattr", + "flock", + "fork", + "fremovexattr", + "fsetxattr", + "fstat", + "fstat64", + "fstatat64", + "fstatfs", + "fstatfs64", + "fsync", + "ftruncate", + "ftruncate64", + "futex", + "futimesat", + "getcpu", + "getcwd", + "getdents", + "getdents64", + "getegid", + "getegid32", + "geteuid", + "geteuid32", + "getgid", + "getgid32", + "getgroups", + "getgroups32", + "getitimer", + "getpeername", + "getpgid", + "getpgrp", + "getpid", + "getppid", + "getpriority", + "getrandom", + "getresgid", + "getresgid32", + "getresuid", + "getresuid32", + "getrlimit", + "get_robust_list", + "getrusage", + "getsid", + "getsockname", + "getsockopt", + "get_thread_area", + "gettid", + "gettimeofday", + "getuid", + "getuid32", + "getxattr", + "inotify_add_watch", + "inotify_init", + "inotify_init1", + "inotify_rm_watch", + "io_cancel", + "ioctl", + "io_destroy", + "io_getevents", + "io_pgetevents", + "ioprio_get", + "ioprio_set", + "io_setup", + "io_submit", + "io_uring_enter", + "io_uring_register", + "io_uring_setup", + "ipc", + "kill", + "lchown", + "lchown32", + "lgetxattr", + "link", + "linkat", + "listen", + "listxattr", + "llistxattr", + "_llseek", + "lremovexattr", + "lseek", + "lsetxattr", + "lstat", + "lstat64", + "madvise", + "memfd_create", + "mincore", + "mkdir", + "mkdirat", + "mknod", + "mknodat", + "mlock", + "mlock2", + "mlockall", + "mmap", + "mmap2", + "mprotect", + "mq_getsetattr", + "mq_notify", + "mq_open", + "mq_timedreceive", + "mq_timedsend", + "mq_unlink", + "mremap", + "msgctl", + "msgget", + "msgrcv", + "msgsnd", + "msync", + "munlock", + "munlockall", + "munmap", + "nanosleep", + "newfstatat", + "_newselect", + "open", + "openat", + "pause", + "pipe", + "pipe2", + "poll", + "ppoll", + "prctl", + "pread64", + "preadv", + "preadv2", + "prlimit64", + "pselect6", + "pwrite64", + "pwritev", + "pwritev2", + "read", + "readahead", + "readlink", + "readlinkat", + "readv", + "recv", + "recvfrom", + "recvmmsg", + "recvmsg", + "remap_file_pages", + "removexattr", + "rename", + "renameat", + "renameat2", + "restart_syscall", + "rmdir", + "rt_sigaction", + "rt_sigpending", + "rt_sigprocmask", + "rt_sigqueueinfo", + "rt_sigreturn", + "rt_sigsuspend", + "rt_sigtimedwait", + "rt_tgsigqueueinfo", + "sched_getaffinity", + "sched_getattr", + "sched_getparam", + "sched_get_priority_max", + "sched_get_priority_min", + "sched_getscheduler", + "sched_rr_get_interval", + "sched_setaffinity", + "sched_setattr", + "sched_setparam", + "sched_setscheduler", + "sched_yield", + "seccomp", + "select", + "semctl", + "semget", + "semop", + "semtimedop", + "send", + "sendfile", + "sendfile64", + "sendmmsg", + "sendmsg", + "sendto", + "setfsgid", + "setfsgid32", + "setfsuid", + "setfsuid32", + "setgid", + "setgid32", + "setgroups", + "setgroups32", + "setitimer", + "setpgid", + "setpriority", + "setregid", + "setregid32", + "setresgid", + "setresgid32", + "setresuid", + "setresuid32", + "setreuid", + "setreuid32", + "setrlimit", + "set_robust_list", + "setsid", + "setsockopt", + "set_thread_area", + "set_tid_address", + "setuid", + "setuid32", + "setxattr", + "shmat", + "shmctl", + "shmdt", + "shmget", + "shutdown", + "sigaltstack", + "signalfd", + "signalfd4", + "sigprocmask", + "sigreturn", + "socket", + "socketcall", + "socketpair", + "splice", + "stat", + "stat64", + "statfs", + "statfs64", + "statx", + "symlink", + "symlinkat", + "sync", + "sync_file_range", + "syncfs", + "sysinfo", + "tee", + "tgkill", + "time", + "timer_create", + "timer_delete", + "timerfd_create", + "timerfd_gettime", + "timerfd_settime", + "timer_getoverrun", + "timer_gettime", + "timer_settime", + "times", + "tkill", + "truncate", + "truncate64", + "ugetrlimit", + "umask", + "uname", + "unlink", + "unlinkat", + "unshare", + "utime", + "utimensat", + "utimes", + "vfork", + "vmsplice", + "wait4", + "waitid", + "waitpid", + "write", + "writev" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": null, + "excludes": null + }, + { + "names": [ + "ptrace" + ], + "action": "SCMP_ACT_ALLOW", + "args": null, + "comment": "", + "includes": { + "minKernel": "4.8" + }, + "excludes": null + }, + { + "names": [ + "personality" + ], + "action": "SCMP_ACT_ALLOW", + "args": [ + { + "index": 0, + "value": 0, + "valueTwo": 0, + "op": "SCMP_CMP_EQ" + } + ], + "comment": "", + "includes": null, + "excludes": null + }, + { + "names": [ + "personality" + ], + "action": "SCMP_ACT_ALLOW", + "args": [ + { + "index": 0, + "value": 8, + "valueTwo": 0, + "op": "SCMP_CMP_EQ" + } + ], + "comment": "", + "includes": null, + "excludes": null + }, + { + "names": [ + "personality" + ], + "action": "SCMP_ACT_ALLOW", + "args": [ + { + "index": 0, + "value": 131072, + "valueTwo": 0, + "op": "SCMP_CMP_EQ" + } + ], + "comment": "", + "includes": null, + "excludes": null + }, + { + "names": [ + "personality" + ], + "action": "SCMP_ACT_ALLOW", + "args": [ + { + "index": 0, + "value": 131080, + "valueTwo": 0, + "op": "SCMP_CMP_EQ" + } + ], + "comment": "", + "includes": null, + "excludes": null + }, + { + "names": [ + "personality" + ], + "action": "SCMP_ACT_ALLOW", + "args": [ + { + "index": 0, + "value": 4294967295, + "valueTwo": 0, + "op": "SCMP_CMP_EQ" + } + ], + "comment": "", + "includes": null, + "excludes": null + }, + { + "names": [ + "sync_file_range2" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "arches": [ + "ppc64le" + ] + }, + "excludes": null + }, + { + "names": [ + "arm_fadvise64_64", + "arm_sync_file_range", + "sync_file_range2", + "breakpoint", + "cacheflush", + "set_tls" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "arches": [ + "arm", + "arm64" + ] + }, + "excludes": null + }, + { + "names": [ + "arch_prctl" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "arches": [ + "amd64", + "x32" + ] + }, + "excludes": null + }, + { + "names": [ + "modify_ldt" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "arches": [ + "amd64", + "x32", + "x86" + ] + }, + "excludes": null + }, + { + "names": [ + "s390_pci_mmio_read", + "s390_pci_mmio_write", + "s390_runtime_instr" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "arches": [ + "s390", + "s390x" + ] + }, + "excludes": null + }, + { + "names": [ + "open_by_handle_at" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_DAC_READ_SEARCH" + ] + }, + "excludes": null + }, + { + "names": [ + "bpf", + "fanotify_init", + "lookup_dcookie", + "mount", + "name_to_handle_at", + "perf_event_open", + "quotactl", + "setdomainname", + "sethostname", + "setns", + "syslog", + "umount", + "umount2" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYS_ADMIN" + ] + }, + "excludes": null + }, + { + "names": [ + "clone" + ], + "action": "SCMP_ACT_ALLOW", + "args": [ + { + "index": 0, + "value": 2114060288, + "valueTwo": 0, + "op": "SCMP_CMP_MASKED_EQ" + } + ], + "comment": "", + "includes": null, + "excludes": { + "caps": [ + "CAP_SYS_ADMIN" + ], + "arches": [ + "s390", + "s390x" + ] + } + }, + { + "names": [ + "clone" + ], + "action": "SCMP_ACT_ALLOW", + "args": [ + { + "index": 1, + "value": 2114060288, + "valueTwo": 0, + "op": "SCMP_CMP_MASKED_EQ" + } + ], + "comment": "s390 parameter ordering for clone is different", + "includes": { + "arches": [ + "s390", + "s390x" + ] + }, + "excludes": { + "caps": [ + "CAP_SYS_ADMIN" + ] + } + }, + { + "names": [ + "reboot" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYS_BOOT" + ] + }, + "excludes": null + }, + { + "names": [ + "chroot" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYS_CHROOT" + ] + }, + "excludes": null + }, + { + "names": [ + "delete_module", + "init_module", + "finit_module", + "query_module" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYS_MODULE" + ] + }, + "excludes": null + }, + { + "names": [ + "acct" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYS_PACCT" + ] + }, + "excludes": null + }, + { + "names": [ + "kcmp", + "process_vm_readv", + "process_vm_writev", + "ptrace" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYS_PTRACE" + ] + }, + "excludes": null + }, + { + "names": [ + "iopl", + "ioperm" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYS_RAWIO" + ] + }, + "excludes": null + }, + { + "names": [ + "settimeofday", + "stime", + "clock_settime" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYS_TIME" + ] + }, + "excludes": null + }, + { + "names": [ + "vhangup" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYS_TTY_CONFIG" + ] + }, + "excludes": null + }, + { + "names": [ + "get_mempolicy", + "mbind", + "set_mempolicy" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYS_NICE" + ] + }, + "excludes": null + }, + { + "names": [ + "syslog" + ], + "action": "SCMP_ACT_ALLOW", + "args": [], + "comment": "", + "includes": { + "caps": [ + "CAP_SYSLOG" + ] + }, + "excludes": null + } + ] +} diff --git a/tests/wpt/web-platform-tests/tools/lint/lint.py b/tests/wpt/web-platform-tests/tools/lint/lint.py index 7689c359928..c7c0197213c 100644 --- a/tests/wpt/web-platform-tests/tools/lint/lint.py +++ b/tests/wpt/web-platform-tests/tools/lint/lint.py @@ -844,6 +844,7 @@ def create_parser(): help="Output markdown") parser.add_argument("--repo-root", help="The WPT directory. Use this" "option if the lint script exists outside the repository") + parser.add_argument("--ignore-glob", help="Additional file glob to ignore.") parser.add_argument("--all", action="store_true", help="If no paths are passed, try to lint the whole " "working directory, not just files that changed") return parser @@ -867,17 +868,22 @@ def main(**kwargs): paths = lint_paths(kwargs, repo_root) - return lint(repo_root, paths, output_format) + ignore_glob = kwargs.get(str("ignore_glob")) or str() + + return lint(repo_root, paths, output_format, str(ignore_glob)) -def lint(repo_root, paths, output_format): - # type: (str, List[str], str) -> int +def lint(repo_root, paths, output_format, ignore_glob=str()): + # type: (str, List[str], str, str) -> int error_count = defaultdict(int) # type: Dict[Text, int] last = None with open(os.path.join(repo_root, "lint.whitelist")) as f: whitelist, ignored_files = parse_whitelist(f) + if ignore_glob: + ignored_files.add(ignore_glob) + output_errors = {"json": output_errors_json, "markdown": output_errors_markdown, "normal": output_errors_text}[output_format] diff --git a/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py b/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py index dbd4708cdc9..af2b7d3d4aa 100644 --- a/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py +++ b/tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py @@ -398,6 +398,29 @@ def test_check_css_globally_unique_ignored_dir(caplog): assert caplog.text == "" +def test_ignore_glob(caplog): + # Lint two files in the ref/ directory, and pass in ignore_glob to omit one + # of them. + # When we omit absolute.html, no lint errors appear since the other file is + # clean. + with _mock_lint("check_path") as mocked_check_path: + with _mock_lint("check_file_contents") as mocked_check_file_contents: + rv = lint(_dummy_repo, ["ref/absolute.html", "ref/existent_relative.html"], "normal", "*solu*") + assert rv == 0 + # Also confirm that only one file is checked + assert mocked_check_path.call_count == 1 + assert mocked_check_file_contents.call_count == 1 + assert caplog.text == "" + # However, linting the same two files without ignore_glob yields lint errors. + with _mock_lint("check_path") as mocked_check_path: + with _mock_lint("check_file_contents") as mocked_check_file_contents: + rv = lint(_dummy_repo, ["ref/absolute.html", "ref/existent_relative.html"], "normal") + assert rv == 1 + assert mocked_check_path.call_count == 2 + assert mocked_check_file_contents.call_count == 2 + assert "ABSOLUTE-URL-REF" in caplog.text + + def test_all_filesystem_paths(): with mock.patch( 'tools.lint.lint.walk', @@ -443,7 +466,8 @@ def test_main_with_args(): m.assert_called_once_with(repo_root, [os.path.relpath(os.path.join(os.getcwd(), x), repo_root) for x in ['a', 'b', 'c']], - "normal") + "normal", + str()) finally: sys.argv = orig_argv @@ -455,7 +479,7 @@ def test_main_no_args(): with _mock_lint('lint', return_value=True) as m: with _mock_lint('changed_files', return_value=['foo', 'bar']): lint_mod.main(**vars(create_parser().parse_args())) - m.assert_called_once_with(repo_root, ['foo', 'bar'], "normal") + m.assert_called_once_with(repo_root, ['foo', 'bar'], "normal", str()) finally: sys.argv = orig_argv @@ -467,6 +491,6 @@ def test_main_all(): with _mock_lint('lint', return_value=True) as m: with _mock_lint('all_filesystem_paths', return_value=['foo', 'bar']): lint_mod.main(**vars(create_parser().parse_args())) - m.assert_called_once_with(repo_root, ['foo', 'bar'], "normal") + m.assert_called_once_with(repo_root, ['foo', 'bar'], "normal", str()) finally: sys.argv = orig_argv diff --git a/tests/wpt/web-platform-tests/tools/taskcluster/commands.json b/tests/wpt/web-platform-tests/tools/taskcluster/commands.json deleted file mode 100644 index dcbd8961fc2..00000000000 --- a/tests/wpt/web-platform-tests/tools/taskcluster/commands.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "tc-verify": {"path": "verify.py", "script": "run", "parser": "create_parser", "help": "Verify .taskcluster.yml file is parsable", - "virtualenv": true, "install": ["json-e", "pyyaml"]} -} diff --git a/tests/wpt/web-platform-tests/tools/taskcluster/verify.py b/tests/wpt/web-platform-tests/tools/taskcluster/verify.py deleted file mode 100644 index b37e45ec74c..00000000000 --- a/tests/wpt/web-platform-tests/tools/taskcluster/verify.py +++ /dev/null @@ -1,37 +0,0 @@ -import argparse -import json -import os - -import jsone -import yaml - -here = os.path.dirname(__file__) -root = os.path.abspath(os.path.join(here, "..", "..")) - - -def create_parser(): - return argparse.ArgumentParser() - - -def run(venv, **kwargs): - with open(os.path.join(root, ".taskcluster.yml")) as f: - template = yaml.safe_load(f) - - events = [("pr_event.json", "github-pull-request", "Pull Request"), - ("master_push_event.json", "github-push", "Push to master")] - - for filename, tasks_for, title in events: - with open(os.path.join(here, "testdata", filename)) as f: - event = json.load(f) - - context = {"tasks_for": tasks_for, - "event": event, - "as_slugid": lambda x: x} - - data = jsone.render(template, context) - heading = "Got %s tasks for %s" % (len(data["tasks"]), title) - print(heading) - print("=" * len(heading)) - for item in data["tasks"]: - print(json.dumps(item, indent=2)) - print("") diff --git a/tests/wpt/web-platform-tests/tools/tox.ini b/tests/wpt/web-platform-tests/tools/tox.ini index 7a5c1eb648a..e8673db0a69 100644 --- a/tests/wpt/web-platform-tests/tools/tox.ini +++ b/tests/wpt/web-platform-tests/tools/tox.ini @@ -8,8 +8,11 @@ deps = pytest-cov mock hypothesis - # `requests` is required by `pr_preview.py` requests + taskcluster + pyyaml + json-e + jsonschema commands = pytest {posargs} diff --git a/tests/wpt/web-platform-tests/tools/wpt/browser.py b/tests/wpt/web-platform-tests/tools/wpt/browser.py index e7d57d8638c..a94d5509cc8 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/browser.py +++ b/tests/wpt/web-platform-tests/tools/wpt/browser.py @@ -47,6 +47,11 @@ class Browser(object): def __init__(self, logger): self.logger = logger + @abstractmethod + def download(self, dest=None, channel=None): + """Download a package or installer for the browser""" + return NotImplemented + @abstractmethod def install(self, dest=None): """Install the browser.""" @@ -116,11 +121,19 @@ class Firefox(Browser): return "%s%s" % (self.platform, bits) - def install(self, dest=None, channel="nightly"): - """Install Firefox.""" + def _get_dest(self, dest, channel): + if dest is None: + # os.getcwd() doesn't include the venv path + dest = os.path.join(os.getcwd(), "_venv") - import mozinstall + dest = os.path.join(dest, "browsers", channel) + if not os.path.exists(dest): + os.makedirs(dest) + + return dest + + def download(self, dest=None, channel="nightly"): product = { "nightly": "firefox-nightly-latest-ssl", "beta": "firefox-beta-latest-ssl", @@ -136,21 +149,15 @@ class Firefox(Browser): } os_key = (self.platform, uname[4]) + if dest is None: + dest = self._get_dest(None, channel) + if channel not in product: raise ValueError("Unrecognised release channel: %s" % channel) if os_key not in os_builds: raise ValueError("Unsupported platform: %s %s" % os_key) - if dest is None: - # os.getcwd() doesn't include the venv path - dest = os.path.join(os.getcwd(), "_venv") - - dest = os.path.join(dest, "browsers", channel) - - if not os.path.exists(dest): - os.makedirs(dest) - url = "https://download.mozilla.org/?product=%s&os=%s&lang=en-US" % (product[channel], os_builds[os_key]) self.logger.info("Downloading Firefox from %s" % url) @@ -175,6 +182,18 @@ class Firefox(Browser): with open(installer_path, "wb") as f: f.write(resp.content) + return installer_path + + def install(self, dest=None, channel="nightly"): + """Install Firefox.""" + import mozinstall + + dest = self._get_dest(dest, channel) + + filename = os.path.basename(dest) + + installer_path = self.download(dest, channel) + try: mozinstall.install(installer_path, dest) except mozinstall.mozinstall.InstallError: @@ -422,7 +441,7 @@ class FirefoxAndroid(Browser): product = "firefox_android" requirements = "requirements_firefox.txt" - def install(self, dest=None, channel=None): + def download(self, dest=None, channel=None): if dest is None: dest = os.pwd @@ -452,6 +471,9 @@ class FirefoxAndroid(Browser): return apk_path + def install(self, dest=None, channel=None): + return self.download(dest, channel) + def install_prefs(self, binary, dest=None, channel=None): fx_browser = Firefox(self.logger) return fx_browser.install_prefs(binary, dest, channel) @@ -478,6 +500,9 @@ class Chrome(Browser): product = "chrome" requirements = "requirements_chrome.txt" + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError @@ -633,6 +658,9 @@ class ChromeAndroidBase(Browser): super(ChromeAndroidBase, self).__init__(logger) self.device_serial = None + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError @@ -724,6 +752,9 @@ class ChromeiOS(Browser): product = "chrome_ios" requirements = "requirements_chrome_ios.txt" + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError @@ -757,6 +788,9 @@ class Opera(Browser): self.logger.warning("Unable to find the browser binary.") return None + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError @@ -826,6 +860,9 @@ class EdgeChromium(Browser): edgedriver_name = "msedgedriver" requirements = "requirements_edge_chromium.txt" + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError @@ -922,6 +959,9 @@ class Edge(Browser): product = "edge" requirements = "requirements_edge.txt" + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError @@ -953,6 +993,9 @@ class InternetExplorer(Browser): product = "ie" requirements = "requirements_ie.txt" + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError @@ -978,6 +1021,9 @@ class Safari(Browser): product = "safari" requirements = "requirements_safari.txt" + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError @@ -1037,17 +1083,33 @@ class Servo(Browser): return (platform, extension, decompress) - def install(self, dest=None, channel="nightly"): - """Install latest Browser Engine.""" + def _get(self, channel="nightly"): if channel != "nightly": raise ValueError("Only nightly versions of Servo are available") + + platform, extension, _ = self.platform_components() + url = "https://download.servo.org/nightly/%s/servo-latest%s" % (platform, extension) + return get(url) + + def download(self, dest=None, channel="nightly"): if dest is None: dest = os.pwd - platform, extension, decompress = self.platform_components() - url = "https://download.servo.org/nightly/%s/servo-latest%s" % (platform, extension) + resp = self._get(dest, channel) + _, extension, _ = self.platform_components() - decompress(get(url).raw, dest=dest) + with open(os.path.join(dest, "servo-latest%s" % (extension,)), "w") as f: + f.write(resp.content) + + def install(self, dest=None, channel="nightly"): + """Install latest Browser Engine.""" + if dest is None: + dest = os.pwd + + _, _, decompress = self.platform_components() + + resp = self._get(dest, channel) + decompress(resp.raw, dest=dest) path = find_executable("servo", os.path.join(dest, "servo")) st = os.stat(path) os.chmod(path, st.st_mode | stat.S_IEXEC) @@ -1083,6 +1145,9 @@ class Sauce(Browser): product = "sauce" requirements = "requirements_sauce.txt" + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError @@ -1105,6 +1170,9 @@ class WebKit(Browser): product = "webkit" requirements = "requirements_webkit.txt" + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError @@ -1168,6 +1236,9 @@ class Epiphany(Browser): product = "epiphany" requirements = "requirements_epiphany.txt" + def download(self, dest=None, channel=None): + raise NotImplementedError + def install(self, dest=None, channel=None): raise NotImplementedError diff --git a/tests/wpt/web-platform-tests/tools/wpt/install.py b/tests/wpt/web-platform-tests/tools/wpt/install.py index 8215dfe0916..24915f0c98d 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/install.py +++ b/tests/wpt/web-platform-tests/tools/wpt/install.py @@ -42,6 +42,8 @@ def get_parser(): 'the latest available development release. For WebDriver installs, ' 'we attempt to select an appropriate, compatible, version for the ' 'latest browser release on the selected channel.') + parser.add_argument('--download-only', action="store_true", + help="Download the selected component but don't install it") parser.add_argument('-d', '--destination', help='filesystem directory to place the component') return parser @@ -73,21 +75,22 @@ def run(venv, **kwargs): raise argparse.ArgumentError(None, "No --destination argument, and no default for the environment") - install(browser, kwargs["component"], destination, channel) + install(browser, kwargs["component"], destination, channel, + download_only=kwargs["download_only"]) -def install(name, component, destination, channel="nightly", logger=None): +def install(name, component, destination, channel="nightly", logger=None, download_only=False): if logger is None: import logging logger = logging.getLogger("install") - if component == 'webdriver': - method = 'install_webdriver' - else: - method = 'install' + prefix = "download" if download_only else "install" + suffix = "_webdriver" if component == 'webdriver' else "" + + method = prefix + suffix subclass = getattr(browser, name.title()) sys.stdout.write('Now installing %s %s...\n' % (name, component)) path = getattr(subclass(logger), method)(dest=destination, channel=channel) if path: - sys.stdout.write('Binary installed as %s\n' % (path,)) + sys.stdout.write('Binary %s as %s\n' % ("downloaded" if download_only else "installed", path,)) diff --git a/tests/wpt/web-platform-tests/tools/wpt/paths b/tests/wpt/web-platform-tests/tools/wpt/paths index 093a7156892..35867c4ccbf 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/paths +++ b/tests/wpt/web-platform-tests/tools/wpt/paths @@ -3,5 +3,4 @@ tools/docker/ tools/lint/ tools/manifest/ tools/serve/ -tools/taskcluster/ tools/wpt/ diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/docs/expectation.rst b/tests/wpt/web-platform-tests/tools/wptrunner/docs/expectation.rst index 2f7467c0912..77938abe03d 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/docs/expectation.rst +++ b/tests/wpt/web-platform-tests/tools/wptrunner/docs/expectation.rst @@ -287,7 +287,7 @@ A more complex manifest with conditional properties might be:: [canvas_test.html] expected: - if os == "osx": FAIL + if os == "mac": FAIL if os == "windows" and version == "XP": FAIL PASS diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt index f49102b8a89..4cbb7a5ec02 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt +++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_firefox.txt @@ -8,4 +8,4 @@ mozprocess==1.0.0 mozprofile==2.4.0 mozrunner==7.7.0 mozversion==2.2.0 -psutil==5.6.5 +psutil==5.6.7 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py index f20f735528c..713d8500113 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py @@ -7,6 +7,7 @@ import os import threading import traceback import socket +import sys from six.moves.urllib.parse import urljoin, urlsplit, urlunsplit from abc import ABCMeta, abstractmethod @@ -15,10 +16,6 @@ from .protocol import Protocol, BaseProtocolPart here = os.path.split(__file__)[0] -# Extra timeout to use after internal test timeout at which the harness -# should force a timeout -extra_timeout = 5 # seconds - def executor_kwargs(test_type, server_config, cache_manager, run_info_data, **kwargs): @@ -130,6 +127,61 @@ class ExecutorException(Exception): self.message = message +class TimedRunner(object): + def __init__(self, logger, func, protocol, url, timeout, extra_timeout): + self.func = func + self.result = None + self.protocol = protocol + self.url = url + self.timeout = timeout + self.extra_timeout = extra_timeout + self.result_flag = threading.Event() + + def run(self): + if self.set_timeout() is Stop: + return Stop + + if self.before_run() is Stop: + return Stop + + executor = threading.Thread(target=self.run_func) + executor.start() + + # Add twice the timeout multiplier since the called function is expected to + # wait at least self.timeout + self.extra_timeout and this gives some leeway + finished = self.result_flag.wait(self.timeout + 2 * self.extra_timeout) + if self.result is None: + if finished: + # flag is True unless we timeout; this *shouldn't* happen, but + # it can if self.run_func fails to set self.result due to raising + self.result = False, ("INTERNAL-ERROR", "%s.run_func didn't set a result" % + self.__class__.__name__) + else: + message = "Executor hit external timeout (this may indicate a hang)\n" + # get a traceback for the current stack of the executor thread + message += "".join(traceback.format_stack(sys._current_frames()[executor.ident])) + self.result = False, ("EXTERNAL-TIMEOUT", message) + elif self.result[1] is None: + # We didn't get any data back from the test, so check if the + # browser is still responsive + if self.protocol.is_alive: + self.result = False, ("INTERNAL-ERROR", None) + else: + self.logger.info("Browser not responding, setting status to CRASH") + self.result = False, ("CRASH", None) + + return self.result + + def set_timeout(self): + raise NotImplementedError + + def before_run(self): + pass + + def run_func(self): + raise NotImplementedError + + class TestExecutor(object): """Abstract Base class for object that actually executes the tests in a specific browser. Typically there will be a different TestExecutor @@ -148,6 +200,10 @@ class TestExecutor(object): convert_result = None supports_testdriver = False supports_jsshell = False + # Extra timeout to use after internal test timeout at which the harness + # should force a timeout + extra_timeout = 5 # seconds + def __init__(self, browser, server_config, timeout_multiplier=1, debug_info=None, **kwargs): @@ -441,7 +497,7 @@ class WdspecExecutor(TestExecutor): pass def do_test(self, test): - timeout = test.timeout * self.timeout_multiplier + extra_timeout + timeout = test.timeout * self.timeout_multiplier + self.extra_timeout success, data = WdspecRun(self.do_wdspec, self.protocol.session_config, diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py index 7a936592f88..b165e8cd93d 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py @@ -16,9 +16,9 @@ from .base import (CallbackHandler, RefTestExecutor, RefTestImplementation, TestharnessExecutor, + TimedRunner, WdspecExecutor, WebDriverProtocol, - extra_timeout, strip_server) from .protocol import (ActionSequenceProtocolPart, AssertsProtocolPart, @@ -566,27 +566,14 @@ class MarionetteProtocol(Protocol): self.prefs.set(name, value) -class ExecuteAsyncScriptRun(object): - def __init__(self, logger, func, protocol, url, timeout): - self.logger = logger - self.result = (None, None) - self.protocol = protocol - self.func = func - self.url = url - self.timeout = timeout - self.result_flag = threading.Event() - - def run(self): - index = self.url.rfind("/storage/") - if index != -1: - # Clear storage - self.protocol.storage.clear_origin(self.url) +class ExecuteAsyncScriptRun(TimedRunner): + def set_timeout(self): timeout = self.timeout try: if timeout is not None: - self.protocol.base.set_timeout(timeout + extra_timeout) + self.protocol.base.set_timeout(timeout + self.extra_timeout) else: # We just want it to never time out, really, but marionette doesn't # make that possible. It also seems to time out immediately if the @@ -596,33 +583,13 @@ class ExecuteAsyncScriptRun(object): self.logger.error("Lost marionette connection before starting test") return Stop - if timeout is not None: - wait_timeout = timeout + 2 * extra_timeout - else: - wait_timeout = None + def before_run(self): + index = self.url.rfind("/storage/") + if index != -1: + # Clear storage + self.protocol.storage.clear_origin(self.url) - timer = threading.Timer(wait_timeout, self._timeout) - timer.start() - - self._run() - - self.result_flag.wait() - timer.cancel() - - if self.result == (None, None): - self.logger.debug("Timed out waiting for a result") - self.result = False, ("EXTERNAL-TIMEOUT", None) - elif self.result[1] is None: - # We didn't get any data back from the test, so check if the - # browser is still responsive - if self.protocol.is_alive: - self.result = False, ("INTERNAL-ERROR", None) - else: - self.logger.info("Browser not responding, setting status to CRASH") - self.result = False, ("CRASH", None) - return self.result - - def _run(self): + def run_func(self): try: self.result = True, self.func(self.protocol, self.url, self.timeout) except errors.ScriptTimeoutException: @@ -650,10 +617,6 @@ class ExecuteAsyncScriptRun(object): finally: self.result_flag.set() - def _timeout(self): - self.result = False, ("EXTERNAL-TIMEOUT", None) - self.result_flag.set() - class MarionetteTestharnessExecutor(TestharnessExecutor): supports_testdriver = True @@ -703,7 +666,8 @@ class MarionetteTestharnessExecutor(TestharnessExecutor): self.do_testharness, self.protocol, self.test_url(test), - timeout).run() + timeout, + self.extra_timeout).run() # The format of data depends on whether the test ran to completion or not # For asserts we only care about the fact that if it didn't complete, the # status is in the first field. @@ -782,7 +746,7 @@ class MarionetteRefTestExecutor(RefTestExecutor): with open(os.path.join(here, "reftest.js")) as f: self.script = f.read() - with open(os.path.join(here, "reftest-wait_marionette.js")) as f: + with open(os.path.join(here, "reftest-wait_webdriver.js")) as f: self.wait_script = f.read() def setup(self, runner): @@ -853,7 +817,8 @@ class MarionetteRefTestExecutor(RefTestExecutor): self._screenshot, self.protocol, test_url, - timeout).run() + timeout, + self.extra_timeout).run() def _screenshot(self, protocol, url, timeout): protocol.marionette.navigate(url) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py index 913a5e6d542..d6745018279 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py @@ -11,7 +11,7 @@ from .base import (CallbackHandler, RefTestExecutor, RefTestImplementation, TestharnessExecutor, - extra_timeout, + TimedRunner, strip_server) from .protocol import (BaseProtocolPart, TestharnessProtocolPart, @@ -237,39 +237,17 @@ class SeleniumProtocol(Protocol): self.testharness.load_runner(self.executor.last_environment["protocol"]) -class SeleniumRun(object): - def __init__(self, func, protocol, url, timeout): - self.func = func - self.result = None - self.protocol = protocol - self.url = url - self.timeout = timeout - self.result_flag = threading.Event() - - def run(self): +class SeleniumRun(TimedRunner): + def set_timeout(self): timeout = self.timeout try: - self.protocol.base.set_timeout(timeout + extra_timeout) + self.protocol.base.set_timeout(timeout + self.extra_timeout) except exceptions.ErrorInResponseException: self.logger.error("Lost WebDriver connection") return Stop - executor = threading.Thread(target=self._run) - executor.start() - - flag = self.result_flag.wait(timeout + 2 * extra_timeout) - if self.result is None: - if flag: - # flag is True unless we timeout; this *shouldn't* happen, but - # it can if self._run fails to set self.result due to raising - self.result = False, ("INTERNAL-ERROR", "self._run didn't set a result") - else: - self.result = False, ("EXTERNAL-TIMEOUT", None) - - return self.result - - def _run(self): + def run_func(self): try: self.result = True, self.func(self.protocol, self.url, self.timeout) except exceptions.TimeoutException: @@ -312,10 +290,12 @@ class SeleniumTestharnessExecutor(TestharnessExecutor): def do_test(self, test): url = self.test_url(test) - success, data = SeleniumRun(self.do_testharness, + success, data = SeleniumRun(self.logger, + self.do_testharness, self.protocol, url, - test.timeout * self.timeout_multiplier).run() + test.timeout * self.timeout_multiplier, + self.extra_timeout).run() if success: return self.convert_result(test, data) @@ -387,10 +367,12 @@ class SeleniumRefTestExecutor(RefTestExecutor): assert viewport_size is None assert dpi is None - return SeleniumRun(self._screenshot, + return SeleniumRun(self.logger, + self._screenshot, self.protocol, self.test_url(test), - test.timeout).run() + test.timeout, + self.extra_timeout).run() def _screenshot(self, protocol, url, timeout): webdriver = protocol.webdriver diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py index eaea0981632..365a1a08653 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py @@ -24,7 +24,6 @@ from ..webdriver_server import ServoDriverServer pytestrunner = None webdriver = None -extra_timeout = 5 # seconds def write_hosts_file(config): hosts_fd, hosts_path = tempfile.mkstemp() diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py index 67a433d9a58..bd377d0d595 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py @@ -1,8 +1,6 @@ import json import os import socket -import threading -import time import traceback from .base import (Protocol, @@ -10,6 +8,7 @@ from .base import (Protocol, RefTestExecutor, RefTestImplementation, TestharnessExecutor, + TimedRunner, strip_server) from ..testrunner import Stop from ..webdriver_server import wait_for_service @@ -19,8 +18,6 @@ ServoCommandExtensions = None here = os.path.join(os.path.split(__file__)[0]) -extra_timeout = 5 - def do_delayed_imports(): global webdriver @@ -131,29 +128,13 @@ class ServoWebDriverProtocol(Protocol): break -class ServoWebDriverRun(object): - def __init__(self, func, session, url, timeout, current_timeout=None): - self.func = func - self.result = None - self.session = session - self.url = url - self.timeout = timeout - self.result_flag = threading.Event() +class ServoWebDriverRun(TimedRunner): + def set_timeout(self): + pass - def run(self): - executor = threading.Thread(target=self._run) - executor.start() - - flag = self.result_flag.wait(self.timeout + extra_timeout) - if self.result is None: - assert not flag - self.result = False, ("EXTERNAL-TIMEOUT", None) - - return self.result - - def _run(self): + def run_func(self): try: - self.result = True, self.func(self.session, self.url, self.timeout) + self.result = True, self.func(self.protocol.session, self.url, self.timeout) except webdriver.TimeoutException: self.result = False, ("EXTERNAL-TIMEOUT", None) except (socket.timeout, IOError): @@ -168,14 +149,6 @@ class ServoWebDriverRun(object): self.result_flag.set() -def timeout_func(timeout): - if timeout: - t0 = time.time() - return lambda: time.time() - t0 > timeout + extra_timeout - else: - return lambda: False - - class ServoWebDriverTestharnessExecutor(TestharnessExecutor): supports_testdriver = True @@ -198,7 +171,7 @@ class ServoWebDriverTestharnessExecutor(TestharnessExecutor): def do_test(self, test): url = self.test_url(test) - timeout = test.timeout * self.timeout_multiplier + extra_timeout + timeout = test.timeout * self.timeout_multiplier + self.extra_timeout if timeout != self.timeout: try: @@ -208,10 +181,12 @@ class ServoWebDriverTestharnessExecutor(TestharnessExecutor): self.logger.error("Lost webdriver connection") return Stop - success, data = ServoWebDriverRun(self.do_testharness, - self.protocol.session, + success, data = ServoWebDriverRun(self.logger, + self.do_testharness, + self.protocol, url, - timeout).run() + timeout, + self.extra_timeout).run() if success: return self.convert_result(test, data) @@ -286,7 +261,7 @@ class ServoWebDriverRefTestExecutor(RefTestExecutor): assert viewport_size is None assert dpi is None - timeout = (test.timeout * self.timeout_multiplier + extra_timeout + timeout = (test.timeout * self.timeout_multiplier + self.extra_timeout if self.debug_info is None else None) if self.timeout != timeout: @@ -297,10 +272,12 @@ class ServoWebDriverRefTestExecutor(RefTestExecutor): self.logger.error("Lost webdriver connection") return Stop - return ServoWebDriverRun(self._screenshot, + return ServoWebDriverRun(self.logger, + self._screenshot, self.protocol.session, self.test_url(test), - timeout).run() + timeout, + self.extra_timeout).run() def _screenshot(self, session, url, timeout): session.url = url diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index 344debf8aa6..39346e805d7 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -1,7 +1,6 @@ import json import os import socket -import sys import threading import time import traceback @@ -12,7 +11,7 @@ from .base import (CallbackHandler, RefTestExecutor, RefTestImplementation, TestharnessExecutor, - extra_timeout, + TimedRunner, strip_server) from .protocol import (BaseProtocolPart, TestharnessProtocolPart, @@ -256,7 +255,6 @@ class WebDriverProtocol(Protocol): self.webdriver = client.Session(host, port, capabilities=capabilities) self.webdriver.start() - def teardown(self): self.logger.debug("Hanging up on WebDriver session") try: @@ -281,42 +279,15 @@ class WebDriverProtocol(Protocol): self.testharness.load_runner(self.executor.last_environment["protocol"]) -class WebDriverRun(object): - def __init__(self, func, protocol, url, timeout): - self.func = func - self.result = None - self.protocol = protocol - self.url = url - self.timeout = timeout - self.result_flag = threading.Event() - - def run(self): - timeout = self.timeout - +class WebDriverRun(TimedRunner): + def set_timeout(self): try: - self.protocol.base.set_timeout(timeout + extra_timeout) + self.protocol.base.set_timeout(self.timeout + self.extra_timeout) except client.UnknownErrorException: self.logger.error("Lost WebDriver connection") return Stop - executor = threading.Thread(target=self._run) - executor.start() - - flag = self.result_flag.wait(timeout + 2 * extra_timeout) - if self.result is None: - if flag: - # flag is True unless we timeout; this *shouldn't* happen, but - # it can if self._run fails to set self.result due to raising - self.result = False, ("INTERNAL-ERROR", "self._run didn't set a result") - else: - message = "Waiting on browser:\n" - # get a traceback for the current stack of the executor thread - message += "".join(traceback.format_stack(sys._current_frames()[executor.ident])) - self.result = False, ("EXTERNAL-TIMEOUT", message) - - return self.result - - def _run(self): + def run_func(self): try: self.result = True, self.func(self.protocol, self.url, self.timeout) except (client.TimeoutException, client.ScriptTimeoutException): @@ -366,10 +337,12 @@ class WebDriverTestharnessExecutor(TestharnessExecutor): def do_test(self, test): url = self.test_url(test) - success, data = WebDriverRun(self.do_testharness, - self.protocol, - url, - test.timeout * self.timeout_multiplier).run() + success, data = WebDriverRun(self.logger, + self.do_testharness, + self.protocol, + url, + test.timeout * self.timeout_multiplier, + self.extra_timeout).run() if success: return self.convert_result(test, data) @@ -485,10 +458,12 @@ class WebDriverRefTestExecutor(RefTestExecutor): assert viewport_size is None assert dpi is None - return WebDriverRun(self._screenshot, - self.protocol, - self.test_url(test), - test.timeout).run() + return WebDriverRun(self.logger, + self._screenshot, + self.protocol, + self.test_url(test), + test.timeout, + self.extra_timeout).run() def _screenshot(self, protocol, url, timeout): webdriver = protocol.webdriver diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/reftest-wait_marionette.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/reftest-wait_marionette.js deleted file mode 100644 index 194e192c2f4..00000000000 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/reftest-wait_marionette.js +++ /dev/null @@ -1,19 +0,0 @@ -var callback = arguments[arguments.length - 1]; - -function test(x) { - if (!root.classList.contains("reftest-wait")) { - observer.disconnect(); - callback(); - } -} - -var root = document.documentElement; -var observer = new MutationObserver(test); - -observer.observe(root, {attributes: true}); - -if (document.readyState != "complete") { - addEventListener('load', test); -} else { - test(); -} diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/reftest-wait_webdriver.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/reftest-wait_webdriver.js index a7486b6594d..f86edacdef2 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/reftest-wait_webdriver.js +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/reftest-wait_webdriver.js @@ -1,21 +1,20 @@ var callback = arguments[arguments.length - 1]; +var observer = null; +var root = document.documentElement; -function root_wait() { - if (!root.classList.contains("reftest-wait")) { - observer.disconnect(); - - if (Document.prototype.hasOwnProperty("fonts")) { - document.fonts.ready.then(ready_for_screenshot); - } else { - // This might take the screenshot too early, depending on whether the - // load event is blocked on fonts being loaded. See: - // https://github.com/w3c/csswg-drafts/issues/1088 - ready_for_screenshot(); - } +function wait_load() { + if (Document.prototype.hasOwnProperty("fonts")) { + document.fonts.ready.then(wait_paints); + } else { + // This might take the screenshot too early, depending on whether the + // load event is blocked on fonts being loaded. See: + // https://github.com/w3c/csswg-drafts/issues/1088 + wait_paints(); } } -function ready_for_screenshot() { + +function wait_paints() { // As of 2017-04-05, the Chromium web browser exhibits a rendering bug // (https://bugs.chromium.org/p/chromium/issues/detail?id=708757) that // produces instability during screen capture. The following use of @@ -27,18 +26,29 @@ function ready_for_screenshot() { requestAnimationFrame(function() { requestAnimationFrame(function() { - callback(); + screenshot_if_ready(); }); }); } -var root = document.documentElement; -var observer = new MutationObserver(root_wait); +function screenshot_if_ready() { + if (root.classList.contains("reftest-wait") && + observer === null) { + observer = new MutationObserver(wait_paints); + observer.observe(root, {attributes: true}); + var event = new Event("TestRendered", {bubbles: true}); + root.dispatchEvent(event); + return; + } + if (observer !== null) { + observer.disconnect(); + } + callback(); +} -observer.observe(root, {attributes: true}); if (document.readyState != "complete") { - addEventListener('load', root_wait); + addEventListener('load', wait_load); } else { - root_wait(); + wait_load(); } diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py index 1b02fc622be..8dece20a8e9 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py @@ -334,6 +334,8 @@ class TestRunnerManager(threading.Thread): # This may not really be what we want self.daemon = True + self.timer = None + self.max_restarts = 5 self.browser = None @@ -559,7 +561,22 @@ class TestRunnerManager(threading.Thread): self.logger.info("Run %d/%d" % (self.run_count, self.rerun)) self.send_message("reset") self.run_count += 1 + # Factor of 3 on the extra timeout here is based on allowing the executor + # at least test.timeout + 2 * extra_timeout to complete, + # which in turn is based on having several layers of timeout inside the executor + wait_timeout = (self.state.test.timeout * self.executor_kwargs['timeout_multiplier'] + + 3 * self.executor_cls.extra_timeout) + self.timer = threading.Timer(wait_timeout, self._timeout) self.send_message("run_test", self.state.test) + self.timer.start() + + def _timeout(self): + self.logger.info("Got timeout in harness") + test = self.state.test + self.test_ended(test, + (test.result_cls("EXTERNAL-TIMEOUT", + "TestRunner hit external timeout " + "(this may indicate a hang)"), [])) def test_ended(self, test, results): """Handle the end of a test. @@ -569,6 +586,7 @@ class TestRunnerManager(threading.Thread): """ assert isinstance(self.state, RunnerManagerState.running) assert test == self.state.test + self.timer.cancel() # Write the result of each subtest file_result, test_results = results subtest_unexpected = False diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/reverse-running-animation-ref.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/reverse-running-animation-ref.html new file mode 100644 index 00000000000..0aaa0443649 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/reverse-running-animation-ref.html @@ -0,0 +1,17 @@ + +Reference for reverse running animation + + +
+

This test reverses the animation shortly after the box starts moving. If + the box doesn't move back to its original position, the test has failed. +

+ diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/reverse-running-animation.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/reverse-running-animation.html new file mode 100644 index 00000000000..584aa0029ea --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/reverse-running-animation.html @@ -0,0 +1,41 @@ + + + + +reverse running animation + + + + + +
+

This test reverses the animation shortly after the box starts moving. If + the box doesn't move back to its original position, the test has failed. +

+ + diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/sync-start-times-ref.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/sync-start-times-ref.html new file mode 100644 index 00000000000..fc843a132f2 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/sync-start-times-ref.html @@ -0,0 +1,20 @@ + + + +Reference for sync start times + + + +

+ This test creates a pair of animations, starts the first animation and then + syncs the second animation to align with the first. The test passes if the + box associated with the first animation is completely occluded by the + second. +

+ diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/sync-start-times.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/sync-start-times.html new file mode 100644 index 00000000000..06dcf030563 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/sync-start-times.html @@ -0,0 +1,68 @@ + + + + +sync start times + + + + + +
+
+

+ This test creates a pair of animations, starts the first animation and then + syncs the second animation to align with the first. The test passes if the + box associated with the first animation is completely occluded by the + second. +

+ + diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-fast-ref.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-fast-ref.html new file mode 100644 index 00000000000..af69b26100a --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-fast-ref.html @@ -0,0 +1,20 @@ + +Reference for update playback rate zero + + +
+

+ This test creates a running animation and changes its playback rate + part way through. The animation finishes ahead of the screenshot. + If any blue pixels appear in the screenshot, the test fails. +

+ diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-fast.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-fast.html new file mode 100644 index 00000000000..63a76ba84a6 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-fast.html @@ -0,0 +1,62 @@ + + + + +Update playback rate zero + + + + + +
+
+

+ This test creates a running animation and changes its playback rate + part way through. The animation finishes ahead of the screenshot. + If any blue pixels appear in the screenshot, the test fails. +

+ + diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-slow-ref.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-slow-ref.html new file mode 100644 index 00000000000..11b87deecca --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-slow-ref.html @@ -0,0 +1,18 @@ + +Reference for update playback rate zero + + +
+

+ This test creates a running animation and changes its playback rate + part way through. The animation slows down so that it does not finish + before the screenshot. If any blue pixels appear in the screenshot, + the test fails. +

+ diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-slow.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-slow.html new file mode 100644 index 00000000000..db449f2ca59 --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-slow.html @@ -0,0 +1,62 @@ + + + + +Update playback rate zero + + + + + +
+
+

+ This test creates a running animation and changes its playback rate + part way through. The animation slows down so that it does not finish + before the screenshot. If any blue pixels appear in the screenshot, + the test fails. +

+ + diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-zero-ref.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-zero-ref.html new file mode 100644 index 00000000000..26293a3aebb --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-zero-ref.html @@ -0,0 +1,17 @@ + +Reference for update playback rate zero + + +
+

+ This test creates a running animation and changes its playback rate + part way through. The animation should stop behind an occluding rectangle. + If not fully occluded, the test fails. +

+ diff --git a/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-zero.html b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-zero.html new file mode 100644 index 00000000000..bed08d630ca --- /dev/null +++ b/tests/wpt/web-platform-tests/web-animations/timing-model/animations/update-playback-rate-zero.html @@ -0,0 +1,61 @@ + + + + +Update playback rate zero + + + + + +
+
+

+ This test creates a running animation and changes its playback rate + part way through. The animation should stop behind an occluding rectangle. + If not fully occluded, the test fails. +

+ + diff --git a/tests/wpt/web-platform-tests/web-nfc/NDEFReader_options.https.html b/tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan_filter.https.html similarity index 78% rename from tests/wpt/web-platform-tests/web-nfc/NDEFReader_options.https.html rename to tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan_filter.https.html index 6901e5cdcb2..4c1e7de4400 100644 --- a/tests/wpt/web-platform-tests/web-nfc/NDEFReader_options.https.html +++ b/tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan_filter.https.html @@ -1,6 +1,6 @@ -Web NFC: NDEFReader option tests +Web NFC: NDEFReader.scan() filter tests @@ -10,7 +10,7 @@ 'use strict'; -const NDEFReaderOptionTests = +const multiScanOptionsTests = [ { desc: "Test that reading data succeed when NDEFScanOptions'" + @@ -78,7 +78,7 @@ const NDEFReaderOptionTests = } ]; -const ReadMultiMessagesTests = +const multiMessagesTests = [ { desc: "Test that filtering 'empty' record from different messages" + @@ -147,21 +147,53 @@ const ReadMultiMessagesTests = } ]; -for (let NDEFReaderOptionTest of NDEFReaderOptionTests) { - testNDEFScanOptions( - NDEFReaderOptionTest.message, - NDEFReaderOptionTest.scanOptions, - NDEFReaderOptionTest.unmatchedScanOptions, - NDEFReaderOptionTest.desc +for (let multiScanOptionsTest of multiScanOptionsTests) { + testMultiScanOptions( + multiScanOptionsTest.message, + multiScanOptionsTest.scanOptions, + multiScanOptionsTest.unmatchedScanOptions, + multiScanOptionsTest.desc ); } -for (let readMultiMessagesTest of ReadMultiMessagesTests) { - testReadingMultiMessages( - readMultiMessagesTest.message, - readMultiMessagesTest.scanOptions, - readMultiMessagesTest.unmatchedMessage, - readMultiMessagesTest.desc +for (let multiMessagesTest of multiMessagesTests) { + testMultiMessages( + multiMessagesTest.message, + multiMessagesTest.scanOptions, + multiMessagesTest.unmatchedMessage, + multiMessagesTest.desc ); } + +nfc_test(async (t, mockNFC) => { + const reader = new NDEFReader(); + const controller = new AbortController(); + const signal = controller.signal; + const textMsg = createMessage([createTextRecord(test_text_data)]); + const urlMsg = createMessage([createUrlRecord(test_url_data)]); + const mimeMsg = createMessage([createMimeRecord(test_buffer_data)]); + + const readerWatcher = new EventWatcher(t, reader, ["reading", "error"]); + const promise = readerWatcher.wait_for("reading").then(event => { + controller.abort(); + assertWebNDEFMessagesEqual(event.message, new NDEFMessage(mimeMsg)); + }); + + const scanOptions1 = { recordType: "text", signal: signal }; + const scanOptions2 = {recordType: "url", signal: signal }; + const scanOptions3 = {recordType: "mime", signal: signal }; + + await reader.scan(scanOptions1); + await reader.scan(scanOptions2); + // There is maximum one filter for an NDEFReader object, + // last filter will replace all previous ones. + await reader.scan(scanOptions3); + + mockNFC.setReadingMessage(textMsg); + mockNFC.setReadingMessage(urlMsg); + mockNFC.setReadingMessage(mimeMsg); + await promise; +}, "Multiple scan() from the same NDEFReader object with new options should \ +replace existing filters."); + diff --git a/tests/wpt/web-platform-tests/web-nfc/NDEFReadingEvent_constructor.https.html b/tests/wpt/web-platform-tests/web-nfc/NDEFReadingEvent_constructor.https.html index 15ef6e466aa..3d734105e9c 100644 --- a/tests/wpt/web-platform-tests/web-nfc/NDEFReadingEvent_constructor.https.html +++ b/tests/wpt/web-platform-tests/web-nfc/NDEFReadingEvent_constructor.https.html @@ -37,4 +37,24 @@ assertWebNDEFMessagesEqual(event.message, new NDEFMessage(message)); }, 'NDEFReadingEvent constructor with valid parameters'); + test(() => { + const record_init = createTextRecord(test_text_data); + const event = new NDEFReadingEvent('type', + {serialNumber: '', message: createMessage([record_init])}); + assert_equals(event.type, 'type', 'type'); + assert_equals(event.serialNumber, '', 'serialNumber'); + assert_equals(1, event.message.records.length, 'only 1 record'); + + const record = new NDEFRecord(record_init); + assert_equals(record.recordType, 'text', 'recordType'); + assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.encoding, 'utf-8', 'encoding'); + assert_equals(record.lang, 'en', 'lang'); + + assert_equals(event.message.records[0].recordType, 'text', 'recordType'); + assert_equals(event.message.records[0].mediaType, null, 'mediaType'); + assert_equals(event.message.records[0].encoding, 'utf-8', 'encoding'); + assert_equals(event.message.records[0].lang, null, 'lang is not set'); + }, 'NDEFReadingEvent constructor does not set NDEFRecord#lang for any text records it embeds'); + diff --git a/tests/wpt/web-platform-tests/web-nfc/resources/nfc-helpers.js b/tests/wpt/web-platform-tests/web-nfc/resources/nfc-helpers.js index eb3006114c7..0fe6fe80cb1 100644 --- a/tests/wpt/web-platform-tests/web-nfc/resources/nfc-helpers.js +++ b/tests/wpt/web-platform-tests/web-nfc/resources/nfc-helpers.js @@ -168,7 +168,7 @@ function assertWebNDEFMessagesEqual(message, expectedMessage) { } } -function testNDEFScanOptions(message, scanOptions, unmatchedScanOptions, desc) { +function testMultiScanOptions(message, scanOptions, unmatchedScanOptions, desc) { nfc_test(async (t, mockNFC) => { const reader1 = new NDEFReader(); const reader2 = new NDEFReader(); @@ -192,8 +192,7 @@ function testNDEFScanOptions(message, scanOptions, unmatchedScanOptions, desc) { }, desc); } -function testReadingMultiMessages( - message, scanOptions, unmatchedMessage, desc) { +function testMultiMessages(message, scanOptions, unmatchedMessage, desc) { nfc_test(async (t, mockNFC) => { const reader = new NDEFReader(); const controller = new AbortController(); diff --git a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/find.py b/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/find.py index b107a8957e0..56e216bb646 100644 --- a/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/find.py +++ b/tests/wpt/web-platform-tests/webdriver/tests/find_element_from_element/find.py @@ -1,4 +1,3 @@ -# META: timeout=long import pytest from webdriver.transport import Response diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html index 73a0fe1e5a1..342e325dad2 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html @@ -216,9 +216,33 @@ await pc2.setRemoteDescription({type: "rollback"}); assert_equals(pc2.getTransceivers().length, 1); - assert_equals(pc2.getTransceivers()[0].mid, null) + assert_equals(pc2.getTransceivers()[0].mid, null); + assert_equals(pc2.getTransceivers()[0].receiver.transport, null); }, "rollback of a remote offer should keep a transceiver"); + promise_test(async t => { + const pc1 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + const pc2 = new RTCPeerConnection(); + t.add_cleanup(() => pc2.close()); + + const stream = await getNoiseStream({video: true}); + t.add_cleanup(() => stream.getTracks().forEach(track => track.stop())); + pc1.addTrack(stream.getTracks()[0], stream); + + const stream2 = await getNoiseStream({video: true}); + t.add_cleanup(() => stream2.getTracks().forEach(track => track.stop())); + pc2.addTrack(stream2.getTracks()[0], stream2); + + await pc2.setRemoteDescription(await pc1.createOffer()); + assert_equals(pc2.getTransceivers().length, 1); + + await pc2.setRemoteDescription({type: "rollback"}); + assert_equals(pc2.getTransceivers().length, 1); + assert_equals(pc2.getTransceivers()[0].mid, null); + assert_equals(pc2.getTransceivers()[0].receiver.transport, null); + }, "rollback of a remote offer should keep a transceiver created by addtrack"); + promise_test(async t => { const pc1 = new RTCPeerConnection(); t.add_cleanup(() => pc1.close()); @@ -257,14 +281,16 @@ const offer = await pc.createOffer(); await pc.setLocalDescription(offer); + assert_not_equals(pc.getTransceivers()[0].sender.transport, null); await pc.setRemoteDescription({type: "rollback"}); assert_equals(pc.getTransceivers().length, 1); assert_equals(pc.getTransceivers()[0].mid, null) + assert_equals(pc.getTransceivers()[0].sender.transport, null); await pc.setLocalDescription(offer); assert_equals(pc.getTransceivers().length, 1); await signalingstatechangeResolver.promise; assert_array_equals(states, ['have-local-offer', 'stable', 'have-local-offer']); - }, "rollback local offer explicitly"); + }, "explicit rollback of local offer should remove transceivers and transport"); promise_test(async t => { const pc1 = new RTCPeerConnection(); @@ -486,7 +512,6 @@ await pc1.setLocalDescription(offer1); await pc2.setRemoteDescription(pc1.pendingLocalDescription); - await pc2.setLocalDescription(await pc2.createAnswer()); await pc1.setRemoteDescription(pc2.localDescription); @@ -505,8 +530,11 @@ assert_equals(remoteStreams[0].getTracks().length, 0); assert_equals(remoteStreams[1].getTracks()[0].id, track.id); await pc2.setRemoteDescription({type: "rollback"}); - assert_equals(remoteStreams[0].getTracks().length, 1); - assert_equals(remoteStreams[0].getTracks()[0].id, track.id); + assert_equals(remoteStreams.length, 3); + assert_equals(remoteStreams[0].id, remoteStreams[2].id); + assert_equals(remoteStreams[1].getTracks().length, 0); + assert_equals(remoteStreams[2].getTracks().length, 1); + assert_equals(remoteStreams[2].getTracks()[0].id, track.id); }, "rollback of a remote offer with stream changes"); diff --git a/tests/wpt/web-platform-tests/xhr/idlharness.any.js b/tests/wpt/web-platform-tests/xhr/idlharness.any.js index f36f0ce0296..d45e52e2341 100644 --- a/tests/wpt/web-platform-tests/xhr/idlharness.any.js +++ b/tests/wpt/web-platform-tests/xhr/idlharness.any.js @@ -1,6 +1,7 @@ // META: global=sharedworker // META: script=/resources/WebIDLParser.js // META: script=/resources/idlharness.js +// META: timeout=long idl_test( ['xhr'],