diff options
author | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2018-05-24 21:43:23 -0400 |
---|---|---|
committer | WPT Sync Bot <josh+wptsync@joshmatthews.net> | 2018-05-24 23:21:05 -0400 |
commit | 7ddb44a302b5815ae10748b333750481e6ca2993 (patch) | |
tree | 270182c8d2ef16a2709d6e29f72935b0fb6959f8 | |
parent | 1e79f27cd4c2a778ab7486aee5741ebcb042fea7 (diff) | |
download | servo-7ddb44a302b5815ae10748b333750481e6ca2993.tar.gz servo-7ddb44a302b5815ae10748b333750481e6ca2993.zip |
Update web-platform-tests to revision a89693b62066da0e4808c0bc76c581188398e73d
102 files changed, 1119 insertions, 421 deletions
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 3e5f358c817..ac800de3d57 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -120945,6 +120945,54 @@ {} ] ], + "css/css-layout-api/perform-child-layout-available-inline-size-htb-htb.https.html": [ + [ + "/css/css-layout-api/perform-child-layout-available-inline-size-htb-htb.https.html", + [ + [ + "/css/css-layout-api/layout-child-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-layout-api/perform-child-layout-available-inline-size-htb-vrl.https.html": [ + [ + "/css/css-layout-api/perform-child-layout-available-inline-size-htb-vrl.https.html", + [ + [ + "/css/css-layout-api/layout-child-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-layout-api/perform-child-layout-available-inline-size-vrl-htb.https.html": [ + [ + "/css/css-layout-api/perform-child-layout-available-inline-size-vrl-htb.https.html", + [ + [ + "/css/css-layout-api/layout-child-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-layout-api/perform-child-layout-available-inline-size-vrl-vrl.https.html": [ + [ + "/css/css-layout-api/perform-child-layout-available-inline-size-vrl-vrl.https.html", + [ + [ + "/css/css-layout-api/layout-child-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html": [ [ "/css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html", @@ -126153,6 +126201,18 @@ {} ] ], + "css/css-pseudo/first-line-and-placeholder.html": [ + [ + "/css/css-pseudo/first-line-and-placeholder.html", + [ + [ + "/css/css-pseudo/first-line-and-placeholder-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-pseudo/marker-and-other-pseudo-elements.html": [ [ "/css/css-pseudo/marker-and-other-pseudo-elements.html", @@ -130405,6 +130465,18 @@ {} ] ], + "css/css-sizing/whitespace-and-break.html": [ + [ + "/css/css-sizing/whitespace-and-break.html", + [ + [ + "/css/reference/ref-filled-green-100px-square.xht", + "==" + ] + ], + {} + ] + ], "css/css-style-attr/style-attr-braces-001.xht": [ [ "/css/css-style-attr/style-attr-braces-001.xht", @@ -178201,6 +178273,18 @@ {} ] ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context.html": [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context.html", + [ + [ + "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context-ref.html", + "==" + ] + ], + {} + ] + ], "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-zero-2.html": [ [ "/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-zero-2.html", @@ -190049,6 +190133,11 @@ {} ] ], + "./CODEOWNERS": [ + [ + {} + ] + ], "./CONTRIBUTING.md": [ [ {} @@ -194684,6 +194773,11 @@ {} ] ], + "async-local-storage/OWNERS": [ + [ + {} + ] + ], "audio-output/OWNERS": [ [ {} @@ -253494,7 +253588,7 @@ {} ] ], - "css/css-layout-api/support/layout-child-fixed-sizes-worklet.js": [ + "css/css-layout-api/support/layout-child-sizes-worklet.js": [ [ {} ] @@ -255074,6 +255168,11 @@ {} ] ], + "css/css-pseudo/first-line-and-placeholder-ref.html": [ + [ + {} + ] + ], "css/css-pseudo/marker-and-other-pseudo-elements-ref.html": [ [ {} @@ -273829,6 +273928,11 @@ {} ] ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context-ref.html": [ + [ + {} + ] + ], "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-zero-2-ref.html": [ [ {} @@ -291324,6 +291428,11 @@ {} ] ], + "keyboard-map/OWNERS": [ + [ + {} + ] + ], "longtask-timing/OWNERS": [ [ {} @@ -336240,9 +336349,9 @@ {} ] ], - "html/browsers/windows/nested-browsing-contexts/frameElement.html": [ + "html/browsers/windows/nested-browsing-contexts/frameElement.sub.html": [ [ - "/html/browsers/windows/nested-browsing-contexts/frameElement.html", + "/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html", {} ] ], @@ -337940,6 +338049,16 @@ {} ] ], + "html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html": [ + [ + "/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html?encoding=utf8", + {} + ], + [ + "/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html?encoding=x-cp1251", + {} + ] + ], "html/infrastructure/urls/resolving-urls/query-encoding/location.sub.html": [ [ "/html/infrastructure/urls/resolving-urls/query-encoding/location.sub.html?encoding=utf8", @@ -379456,6 +379575,12 @@ {} ] ], + "workers/WorkerGlobalScope_requestAnimationFrame.htm": [ + [ + "/workers/WorkerGlobalScope_requestAnimationFrame.htm", + {} + ] + ], "workers/WorkerGlobalScope_setInterval.htm": [ [ "/workers/WorkerGlobalScope_setInterval.htm", @@ -382186,6 +382311,26 @@ {} ] ], + "xhr/sync-no-timeout.any.js": [ + [ + "/xhr/sync-no-timeout.any.html", + { + "timeout": "long" + } + ], + [ + "/xhr/sync-no-timeout.any.sharedworker.html", + { + "timeout": "long" + } + ], + [ + "/xhr/sync-no-timeout.any.worker.html", + { + "timeout": "long" + } + ] + ], "xhr/template-element.html": [ [ "/xhr/template-element.html", @@ -401887,6 +402032,10 @@ "db79dd9531259cfaf670e7b780a9a205ec712369", "support" ], + "./CODEOWNERS": [ + "27076c48623ad8788d0e0cc7679ad86be678744c", + "support" + ], "./CONTRIBUTING.md": [ "d29b019e9828ee3b23b428c684412aa402ec9fff", "support" @@ -401900,7 +402049,7 @@ "support" ], "./README.md": [ - "2ecef188cb7cb27d10b6bf148eddb3f9a031771b", + "8ab843e17aa153bcf91282be3770ed2009061b11", "support" ], "./check_stability.ini": [ @@ -401908,7 +402057,7 @@ "support" ], "./lint.whitelist": [ - "b740ea6ee933d028f6b2bef92cc473778b76002f", + "f18a6bb277d2392446c790aa85eb008d5f3fe05d", "support" ], "./serve.py": [ @@ -411567,6 +411716,10 @@ "32cf112fb1dcb4e7ec3c91bdf5bd6b976a1e4eac", "testharness" ], + "async-local-storage/OWNERS": [ + "0dadd13ec6f4267b77fb4ec782ca528408051a11", + "support" + ], "async-local-storage/storage-smoke-test.https.tentative.html": [ "1e00cf5aff9d85ca66d8b831ee4c2c3cb8259071", "testharness" @@ -514231,20 +514384,36 @@ "567ff67317cae9906e6d159dc232c41464a4e7c6", "reftest" ], + "css/css-layout-api/perform-child-layout-available-inline-size-htb-htb.https.html": [ + "7db4f5c2bebe031f0689be2569ba4ca266535052", + "reftest" + ], + "css/css-layout-api/perform-child-layout-available-inline-size-htb-vrl.https.html": [ + "f22cc9627b7b2ad797cc722f3d369355ffce4f60", + "reftest" + ], + "css/css-layout-api/perform-child-layout-available-inline-size-vrl-htb.https.html": [ + "0e34d5b8b86aa6551e6e6a31eb086bd84b61c636", + "reftest" + ], + "css/css-layout-api/perform-child-layout-available-inline-size-vrl-vrl.https.html": [ + "d619b57c395710bc2e133e05774c9a06bfd19749", + "reftest" + ], "css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html": [ - "341711737d74fb068bb3a2e348e47820c236fa49", + "907b9b1255516caab731555686e5c6b5517eb3f9", "reftest" ], "css/css-layout-api/perform-child-layout-fixed-block-size.https.html": [ - "486fe671afaa9275bc6b32c49ca4c8143290f9be", + "3560b1f8249f945e1453e3e8e53745ef1941405f", "reftest" ], "css/css-layout-api/perform-child-layout-fixed-inline-size-vrl.https.html": [ - "3c3b4c800af40a85eb9ddb588a07fc0d8ceec5cf", + "dfc48415ddbfecad7b382c4efe290b1b8da4ebac", "reftest" ], "css/css-layout-api/perform-child-layout-fixed-inline-size.https.html": [ - "a25a85095781de557edde6dd02b82ee052642bf1", + "bae125f32f28d0cfa7db449cfb10437cb4df12a3", "reftest" ], "css/css-layout-api/position-fragment-htb-ltr.https.html": [ @@ -514295,8 +514464,8 @@ "ed0224a380c50a7e83d23a95be5a4348ce5bf706", "support" ], - "css/css-layout-api/support/layout-child-fixed-sizes-worklet.js": [ - "5ddda72e3c9d077508622511e8685249c7803028", + "css/css-layout-api/support/layout-child-sizes-worklet.js": [ + "3797af00861ae44369a90a0ae05b3a6e13a2ef54", "support" ], "css/css-layout-api/support/layout-child-worklet.js": [ @@ -515180,7 +515349,7 @@ "support" ], "css/css-masking/parsing/clip-invalid.html": [ - "fad5d0257532a5c1572d41f83d045c92a6fe0d61", + "81cd98170ea4abe216c0cf155aa493c58079bd53", "testharness" ], "css/css-masking/parsing/clip-path-invalid.html": [ @@ -515200,7 +515369,7 @@ "testharness" ], "css/css-masking/parsing/clip-valid.html": [ - "e7805a38a0634d760bdc31e4c331da1a56582bc9", + "2630e55883c57a0a733071ad2f49b55e2bd77a59", "testharness" ], "css/css-masking/parsing/resources/parsing-testcommon.js": [ @@ -517531,6 +517700,14 @@ "38d0844f6ef10d214b7d23af45d02c8093d9c00e", "testharness" ], + "css/css-pseudo/first-line-and-placeholder-ref.html": [ + "b1aaba95588025ae60b324f23cc14e3b0ef40836", + "support" + ], + "css/css-pseudo/first-line-and-placeholder.html": [ + "829ee2c50f5b6198f9cc0b3ae01b208d20ed7702", + "reftest" + ], "css/css-pseudo/marker-and-other-pseudo-elements-ref.html": [ "73ab862dcf3131ae7d7166ef06e52db0cd0eb7c7", "support" @@ -521355,6 +521532,10 @@ "33aa880de7eb7c4128022871dfd5e2895be30dcc", "reftest" ], + "css/css-sizing/whitespace-and-break.html": [ + "54107f6567df03437aebb1fe8aa5c6403cb1ecf1", + "reftest" + ], "css/css-speech/Integer.html": [ "8db91e711b22ead393b1d9a18c224a7f838b85b0", "manual" @@ -551652,7 +551833,7 @@ "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-anonymous-items-001-ref.html": [ - "034e0ab0215239f057137323feada9b6a8540e50", + "88f1d3fd76beb69334a236fd60c4c94ba9a4d437", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-anonymous-items-001.html": [ @@ -556867,6 +557048,14 @@ "1f6e81539cf5a3c3a339e3a69f4c6446688c3cd3", "reftest" ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context-ref.html": [ + "af82ff9650987818b6a5a5c3e82386d0fd882325", + "support" + ], + "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context.html": [ + "3d2248b6f9200cd23607c1fe6ff543260c43e378", + "reftest" + ], "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-zero-2-ref.html": [ "54a7661d6ae90a46a811d988687e2d4b9b927a96", "support" @@ -556884,7 +557073,7 @@ "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list": [ - "791816169df64e27949974a29a47805c91592dc5", + "56d1d0dca24abcb9a9147b55f10f2a47b5efd61f", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/transforms/transform-containing-block-dynamic-1a.html": [ @@ -558180,7 +558369,7 @@ "reftest" ], "css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/reftest.list": [ - "b9954b5e7f7ae188dc9323e7ae4b29147e80e96c", + "30fbc616b8608ca9b5dc1aa1a17a0dc12011ddc0", "support" ], "css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/support/WidthTest-Regular.otf": [ @@ -558632,7 +558821,7 @@ "support" ], "docs/_running-tests/chrome_android.md": [ - "7a26348aabd414f1d8e2da68717dd0a16d3f6ce8", + "f1e09247c9f41cf3c55aa087b063e42d48d88319", "support" ], "docs/_running-tests/index.md": [ @@ -564432,7 +564621,7 @@ "support" ], "fetch/corb/README.md": [ - "c786c1df10c1edad9b25be4ec112250864c328e5", + "a20a0aec267558052757c8dd368219730a206e34", "support" ], "fetch/corb/img-html-correctly-labeled.sub-ref.html": [ @@ -568711,8 +568900,8 @@ "0f2e164f656015ba43e2b3471af67a5d16fb97ea", "support" ], - "html/browsers/windows/nested-browsing-contexts/frameElement.html": [ - "9272ddfc9d2d7301e7adadc5ca06f03d9a224b1f", + "html/browsers/windows/nested-browsing-contexts/frameElement.sub.html": [ + "480ab947e93b63641f6920b17851ae2d98605b5c", "testharness" ], "html/browsers/windows/nested-browsing-contexts/resources/frameElement-nested-frame.html": [ @@ -575167,6 +575356,10 @@ "da39a3ee5e6b4b0d3255bfef95601890afd80709", "support" ], + "html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html": [ + "a467530a931aae564a73518487b12521c6dd6377", + "testharness" + ], "html/infrastructure/urls/resolving-urls/query-encoding/location.sub.html": [ "34aa7e5a7d4daba412fa700859913cf9def77565", "testharness" @@ -575188,7 +575381,7 @@ "support" ], "html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js": [ - "03fc73b64f0fd6f80bbb5616da4a4528162638ee", + "d0eac1b59b0514b526be649a28d9fbd54e47db99", "support" ], "html/infrastructure/urls/resolving-urls/query-encoding/resources/resource.py": [ @@ -586271,6 +586464,10 @@ "2ac2738dd428f3937fc2fd15dae2f98df5e3feb1", "support" ], + "keyboard-map/OWNERS": [ + "3151ee04a3b456d750df980594a192161868a337", + "support" + ], "keyboard-map/idlharness.https.html": [ "3215b6729d83ca2841baf6eb33445eb07e0a7c25", "testharness" @@ -587552,7 +587749,7 @@ "manual" ], "mediacapture-streams/MediaStreamTrack-getCapabilities.https.html": [ - "3a6bdcf56d9414934be70d32765c04449532b853", + "2121f9fcccf971874eb2fe41422db05da35b44ba", "testharness" ], "mediacapture-streams/MediaStreamTrack-getSettings.https.html": [ @@ -594912,11 +595109,11 @@ "testharness" ], "offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.html": [ - "bc7b9afa9ae08d707bc6de78b6ca16c5ed6ff425", + "265026f5618d6a538291509c51c323a8810f8e9e", "testharness" ], "offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html": [ - "8dafe883a6f52b66e528fcb6a86c72a147f8cf9d", + "6462aca7d799136064e86fe71d7adda4aed68127", "testharness" ], "offscreen-canvas/the-offscreen-canvas/offscreencanvas.constructor.html": [ @@ -594936,7 +595133,7 @@ "testharness" ], "offscreen-canvas/the-offscreen-canvas/offscreencanvas.resize.html": [ - "1963e2f24313314c99e39e29f6818d39c2385a0d", + "1b4d2ea0c251aac3f35425bd9f871d258074853b", "testharness" ], "offscreen-canvas/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.html": [ @@ -608852,7 +609049,7 @@ "testharness" ], "shadow-dom/Document-prototype-currentScript.html": [ - "eadcbb987e528dee0bd773ce48026f64513a299e", + "c19ae5aa7d8ee63a50514fedd66231e48c31297e", "testharness" ], "shadow-dom/Document-prototype-importNode.html": [ @@ -622627,6 +622824,10 @@ "c67d281e78f9672e5f25fdde6b978e0fb7bd806e", "testharness" ], + "workers/WorkerGlobalScope_requestAnimationFrame.htm": [ + "812f9da59bd8b440aad647f60227c0f66a1404c3", + "testharness" + ], "workers/WorkerGlobalScope_setInterval.htm": [ "30371bcd0af113ee5dc0a7c4a40a67b99efdfa78", "testharness" @@ -625371,6 +625572,10 @@ "db6171c61a37cd98ea5b9c1549432f1e2b53e7eb", "testharness" ], + "xhr/sync-no-timeout.any.js": [ + "d1078052ef5593c33de085f9e0c5ceb73c47f02e", + "testharness" + ], "xhr/template-element.html": [ "748f12beaa646e244f8312afd545f56075cac727", "testharness" diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini index 78879bad5f1..5b38c37b086 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini @@ -1,5 +1,4 @@ [javascript-url-abort-return-value-undefined.tentative.html] - expected: TIMEOUT [Not aborting fetch for javascript:undefined navigation] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.html.ini b/tests/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html.ini index 96ec6c1081b..ff79675f6d3 100644 --- a/tests/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.html.ini +++ b/tests/wpt/metadata/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html.ini @@ -1,5 +1,4 @@ -[frameElement.html] - type: testharness +[frameElement.sub.html] expected: TIMEOUT [The window's frameElement attribute must return its container element if it is a nested browsing context] expected: FAIL diff --git a/tests/wpt/metadata/workers/WorkerGlobalScope_requestAnimationFrame.htm.ini b/tests/wpt/metadata/workers/WorkerGlobalScope_requestAnimationFrame.htm.ini new file mode 100644 index 00000000000..5ec87534923 --- /dev/null +++ b/tests/wpt/metadata/workers/WorkerGlobalScope_requestAnimationFrame.htm.ini @@ -0,0 +1,5 @@ +[WorkerGlobalScope_requestAnimationFrame.htm] + expected: ERROR + [ WorkerGlobalScope API: requestAnimationFrame()] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/xhr/sync-no-timeout.any.js.ini b/tests/wpt/metadata/xhr/sync-no-timeout.any.js.ini new file mode 100644 index 00000000000..1de61088fe1 --- /dev/null +++ b/tests/wpt/metadata/xhr/sync-no-timeout.any.js.ini @@ -0,0 +1,8 @@ +[sync-no-timeout.any.sharedworker.html] + [Untitled] + expected: FAIL + + +[sync-no-timeout.any.worker.html] + +[sync-no-timeout.any.html] diff --git a/tests/wpt/metadata/xhr/xmlhttprequest-sync-default-feature-policy.sub.html.ini b/tests/wpt/metadata/xhr/xmlhttprequest-sync-default-feature-policy.sub.html.ini index 52e7f0fcea5..b1e3d945142 100644 --- a/tests/wpt/metadata/xhr/xmlhttprequest-sync-default-feature-policy.sub.html.ini +++ b/tests/wpt/metadata/xhr/xmlhttprequest-sync-default-feature-policy.sub.html.ini @@ -1,5 +1,5 @@ [xmlhttprequest-sync-default-feature-policy.sub.html] - expected: TIMEOUT + expected: ERROR [Default "sync-xhr" feature policy ["*"\] allows same-origin iframes.] expected: TIMEOUT diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini new file mode 100644 index 00000000000..84c7aa47561 --- /dev/null +++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html.ini @@ -0,0 +1,5 @@ +[context-release-upon-reload.html] + expected: TIMEOUT + [Overall test] + expected: NOTRUN + diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html.ini new file mode 100644 index 00000000000..594360ffb15 --- /dev/null +++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html.ini @@ -0,0 +1,5 @@ +[shader-uniform-packing-restrictions.html] + expected: TIMEOUT + [Overall test] + expected: NOTRUN + diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html.ini new file mode 100644 index 00000000000..fb8852c9e7a --- /dev/null +++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html.ini @@ -0,0 +1,5 @@ +[shader-with-non-reserved-words.html] + expected: TIMEOUT + [Overall test] + expected: NOTRUN + diff --git a/tests/wpt/web-platform-tests/CODEOWNERS b/tests/wpt/web-platform-tests/CODEOWNERS new file mode 100644 index 00000000000..e35f9232079 --- /dev/null +++ b/tests/wpt/web-platform-tests/CODEOWNERS @@ -0,0 +1,2 @@ +# Prevent accidentially touching CSS submodules +/css/tools/ @plinss @kojiishi @jgraham @gsnedders diff --git a/tests/wpt/web-platform-tests/README.md b/tests/wpt/web-platform-tests/README.md index 6fa4f74490b..a942745c7b0 100644 --- a/tests/wpt/web-platform-tests/README.md +++ b/tests/wpt/web-platform-tests/README.md @@ -286,6 +286,14 @@ To prevent browser SSL warnings when running HTTPS tests locally, the web-platform-tests Root CA file `cacert.pem` in [tools/certs](tools/certs) must be added as a trusted certificate in your OS/browser. +**NOTE**: The CA should not be installed in any browser profile used +outside of tests, since it may be used to generate fake +certificates. For browsers that use the OS certificate store, tests +should therefore not be run manually outside a dedicated OS instance +(e.g. a VM). To avoid this problem when running tests in Chrome or +Firefox use `wpt run`, which disables certificate checks and therefore +doesn't require the root CA to be trusted. + Publication =========== diff --git a/tests/wpt/web-platform-tests/async-local-storage/OWNERS b/tests/wpt/web-platform-tests/async-local-storage/OWNERS new file mode 100644 index 00000000000..7231f6248dc --- /dev/null +++ b/tests/wpt/web-platform-tests/async-local-storage/OWNERS @@ -0,0 +1 @@ +@domenic diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-htb-htb.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-htb-htb.https.html new file mode 100644 index 00000000000..e14541b7beb --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-htb-htb.https.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-availableinlinesize"> +<link rel="match" href="layout-child-ref.html"> +<meta name="assert" content="This test checks that setting the available inline size of children works as expected." /> + +<style> +.test { + writing-mode: horizontal-tb; + background: red; + margin: 10px; + width: 100px; +} + +.child { + writing-mode: horizontal-tb; + visibility: hidden; + line-height: 0; + + --available-inline-size: 20; +} + +.inline { + display: inline-block; + height: 8px; +} + +.inline-size-10 { width: 10px; } +.inline-size-30 { width: 30px; } + +@supports (display: layout(test)) { + .test { + background: green; + display: layout(test); + } +} +</style> +<script src="/common/reftest-wait.js"></script> +<script src="/common/worklet-reftest.js"></script> + +<div class="test"> + <!-- As the inlines don't fit within 20px, we'll end up with two lines. --> + <div class="child" style="--inline-size-expected: 30; --block-size-expected: 16;"> + <span class="inline inline-size-10"></span> + <span class="inline inline-size-30"></span> + </div> + + <!-- The single inline doesn't take up the whole 20px, so will be shrink fitted. --> + <div class="child" style="--inline-size-expected: 10; --block-size-expected: 8;"> + <span class="inline inline-size-10"></span> + </div> + + <!-- Make sure the max-width property clamps the size. --> + <div class="child" style="max-width: 25px; --inline-size-expected: 25; --block-size-expected: 8;"> + <span class="inline inline-size-30"></span> + </div> + + <!-- Make sure the min-width property clamps the size. --> + <div class="child" style="min-width: 25px; --inline-size-expected: 25; --block-size-expected: 8;"> + <span class="inline inline-size-10"></span> + </div> +</div> + +<script> +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-htb-vrl.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-htb-vrl.https.html new file mode 100644 index 00000000000..1b45998d2d8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-htb-vrl.https.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-availableinlinesize"> +<link rel="match" href="layout-child-ref.html"> +<meta name="assert" content="This test checks that setting the available inline size of children works as expected." /> + +<style> +.test { + writing-mode: horizontal-tb; + background: red; + margin: 10px; + width: 100px; +} + +.child { + writing-mode: vertical-rl; + visibility: hidden; + line-height: 0; + + --available-block-size: 20; +} + +.inline { + display: inline-block; + width: 8px; +} + +.inline-size-10 { height: 10px; } +.inline-size-30 { height: 30px; } + +@supports (display: layout(test)) { + .test { + background: green; + display: layout(test); + } +} +</style> +<script src="/common/reftest-wait.js"></script> +<script src="/common/worklet-reftest.js"></script> + +<div class="test"> + <!-- As the inlines don't fit within 20px, we'll end up with two lines. --> + <div class="child" style="--block-size-expected: 30; --inline-size-expected: 16;"> + <span class="inline inline-size-10"></span> + <span class="inline inline-size-30"></span> + </div> + + <!-- The single inline doesn't take up the whole 20px, so will be shrink fitted. --> + <div class="child" style="--block-size-expected: 10; --inline-size-expected: 8;"> + <span class="inline inline-size-10"></span> + </div> + + <!-- Make sure the max-height property clamps the size. --> + <div class="child" style="max-height: 25px; --block-size-expected: 25; --inline-size-expected: 8;"> + <span class="inline inline-size-30"></span> + </div> + + <!-- Make sure the min-height property clamps the size. --> + <div class="child" style="min-height: 25px; --block-size-expected: 25; --inline-size-expected: 8;"> + <span class="inline inline-size-10"></span> + </div> +</div> + +<script> +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-vrl-htb.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-vrl-htb.https.html new file mode 100644 index 00000000000..63590c9203b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-vrl-htb.https.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-availableinlinesize"> +<link rel="match" href="layout-child-ref.html"> +<meta name="assert" content="This test checks that setting the available inline size of children works as expected." /> + +<style> +.test { + writing-mode: vertical-rl; + background: red; + margin: 10px; + height: 100px; +} + +.child { + writing-mode: horizontal-tb; + visibility: hidden; + line-height: 0; + + --available-block-size: 20; +} + +.inline { + display: inline-block; + height: 8px; +} + +.inline-size-10 { width: 10px; } +.inline-size-30 { width: 30px; } + +@supports (display: layout(test)) { + .test { + background: green; + display: layout(test); + } +} +</style> +<script src="/common/reftest-wait.js"></script> +<script src="/common/worklet-reftest.js"></script> + +<div class="test"> + <!-- As the inlines don't fit within 20px, we'll end up with two lines. --> + <div class="child" style="--block-size-expected: 30; --inline-size-expected: 16;"> + <span class="inline inline-size-10"></span> + <span class="inline inline-size-30"></span> + </div> + + <!-- The single inline doesn't take up the whole 20px, so will be shrink fitted. --> + <div class="child" style="--block-size-expected: 10; --inline-size-expected: 8;"> + <span class="inline inline-size-10"></span> + </div> + + <!-- Make sure the max-width property clamps the size. --> + <div class="child" style="max-width: 25px; --block-size-expected: 25; --inline-size-expected: 8;"> + <span class="inline inline-size-30"></span> + </div> + + <!-- Make sure the min-width property clamps the size. --> + <div class="child" style="min-width: 25px; --block-size-expected: 25; --inline-size-expected: 8;"> + <span class="inline inline-size-10"></span> + </div> +</div> + +<script> +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-vrl-vrl.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-vrl-vrl.https.html new file mode 100644 index 00000000000..815f5254d5d --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-available-inline-size-vrl-vrl.https.html @@ -0,0 +1,66 @@ +<!DOCTYPE html> +<html class=reftest-wait> +<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraintsoptions-availableinlinesize"> +<link rel="match" href="layout-child-ref.html"> +<meta name="assert" content="This test checks that setting the available inline size of children works as expected." /> + +<style> +.test { + writing-mode: vertical-rl; + background: red; + margin: 10px; + height: 100px; +} + +.child { + writing-mode: vertical-rl; + visibility: hidden; + line-height: 0; + + --available-inline-size: 20; +} + +.inline { + display: inline-block; + width: 8px; +} + +.inline-size-10 { height: 10px; } +.inline-size-30 { height: 30px; } + +@supports (display: layout(test)) { + .test { + background: green; + display: layout(test); + } +} +</style> +<script src="/common/reftest-wait.js"></script> +<script src="/common/worklet-reftest.js"></script> + +<div class="test"> + <!-- As the inlines don't fit within 20px, we'll end up with two lines. --> + <div class="child" style="--inline-size-expected: 30; --block-size-expected: 16;"> + <span class="inline inline-size-10"></span> + <span class="inline inline-size-30"></span> + </div> + + <!-- The single inline doesn't take up the whole 20px, so will be shrink fitted. --> + <div class="child" style="--inline-size-expected: 10; --block-size-expected: 8;"> + <span class="inline inline-size-10"></span> + </div> + + <!-- Make sure the max-height property clamps the size. --> + <div class="child" style="max-height: 25px; --inline-size-expected: 25; --block-size-expected: 8;"> + <span class="inline inline-size-30"></span> + </div> + + <!-- Make sure the min-height property clamps the size. --> + <div class="child" style="min-height: 25px; --inline-size-expected: 25; --block-size-expected: 8;"> + <span class="inline inline-size-10"></span> + </div> +</div> + +<script> +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'}); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html index 1fbfec9f792..cc4448464c3 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size-vrl.https.html @@ -57,5 +57,5 @@ </div> <script> -importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-fixed-sizes-worklet.js'}); +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'}); </script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size.https.html index a158840894f..add1a3d96bf 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-block-size.https.html @@ -56,5 +56,5 @@ </div> <script> -importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-fixed-sizes-worklet.js'}); +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'}); </script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size-vrl.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size-vrl.https.html index 8fab5e44ac4..42e9c563574 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size-vrl.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size-vrl.https.html @@ -57,5 +57,5 @@ </div> <script> -importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-fixed-sizes-worklet.js'}); +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'}); </script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size.https.html b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size.https.html index 79d2aca2a75..188e5864c16 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size.https.html +++ b/tests/wpt/web-platform-tests/css/css-layout-api/perform-child-layout-fixed-inline-size.https.html @@ -56,5 +56,5 @@ </div> <script> -importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-fixed-sizes-worklet.js'}); +importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, {url: 'support/layout-child-sizes-worklet.js'}); </script> diff --git a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-fixed-sizes-worklet.js b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-sizes-worklet.js index 73155732971..7531f69b1b6 100644 --- a/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-fixed-sizes-worklet.js +++ b/tests/wpt/web-platform-tests/css/css-layout-api/support/layout-child-sizes-worklet.js @@ -9,6 +9,8 @@ function parseNumber(value) { registerLayout('test', class { static get childInputProperties() { return [ + '--available-inline-size', + '--available-block-size', '--fixed-inline-size', '--fixed-block-size', '--inline-size-expected', @@ -20,9 +22,16 @@ registerLayout('test', class { *layout(children, edges, constraints, styleMap) { const childFragments = yield children.map((child) => { const childConstraints = {}; + const availableInlineSize = parseNumber(child.styleMap.get('--available-inline-size')); + const availableBlockSize = parseNumber(child.styleMap.get('--available-block-size')); const fixedInlineSize = parseNumber(child.styleMap.get('--fixed-inline-size')); const fixedBlockSize = parseNumber(child.styleMap.get('--fixed-block-size')); - return child.layoutNextFragment({fixedInlineSize, fixedBlockSize}); + return child.layoutNextFragment({ + availableInlineSize, + availableBlockSize, + fixedInlineSize, + fixedBlockSize + }); }); const actual = childFragments.map((childFragment) => { diff --git a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-invalid.html b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-invalid.html index 1ac795be56b..68b67c93131 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-invalid.html +++ b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-invalid.html @@ -14,6 +14,7 @@ <script> test_invalid_value("clip", "none"); test_invalid_value("clip", "rect(10px, 20px, 30px)"); +test_invalid_value("clip", "rect(10%, -20%, auto, auto)"); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-valid.html b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-valid.html index 24bb782d332..34a24ea305d 100644 --- a/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-valid.html +++ b/tests/wpt/web-platform-tests/css/css-masking/parsing/clip-valid.html @@ -14,7 +14,7 @@ <script> test_valid_value("clip", "auto"); test_valid_value("clip", "rect(10px, 20px, -30px, 40px)", ["rect(10px, 20px, -30px, 40px)", "rect(10px 20px -30px 40px)"]); -test_valid_value("clip", "rect(10%, -20%, auto, auto)"); +test_valid_value("clip", "rect(10px, -20px, auto, auto)", ["rect(10px, -20px, auto, auto)", "rect(10px -20px auto auto)"]); </script> </body> </html> diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-placeholder-ref.html b/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-placeholder-ref.html new file mode 100644 index 00000000000..dbadd365c25 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-placeholder-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<style> +input::placeholder { + color: red; +} +</style> +<form> + <input placeholder="this text should be red"> +</form> diff --git a/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-placeholder.html b/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-placeholder.html new file mode 100644 index 00000000000..2db3480feb5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-pseudo/first-line-and-placeholder.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Interaction of ::first-line and ::placeholder</title> +<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#placeholder-pseudo"> +<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-line-pseudo"> +<link rel="match" href="first-line-and-placeholder-ref.html"> +<meta name="assert" content="Tests ::placeholder interaction with ::first-line pseudo element"> +<style> +input::first-line { + background-color: initial; +} + +input::placeholder { + color: red; +} +</style> +<form> + <input placeholder="this text should be red"> +</form> diff --git a/tests/wpt/web-platform-tests/css/css-sizing/whitespace-and-break.html b/tests/wpt/web-platform-tests/css/css-sizing/whitespace-and-break.html new file mode 100644 index 00000000000..f3ea3764478 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-sizing/whitespace-and-break.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<title>Collapsable whitespace and break after inline-block</title> +<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org"> +<link rel="help" href="https://www.w3.org/TR/css-sizing-3/#intrinsic-sizes" title="4.1. Intrinsic Sizes"> +<link rel="match" href="../reference/ref-filled-green-100px-square.xht" /> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="width:fit-content; background:red;"> + <div style="display:inline-block; vertical-align:top; width:100px; height:100px; background:green;"></div> + <br> +</div> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-anonymous-items-001-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-anonymous-items-001-ref.html index d14234b453b..8f99ea1d56a 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-anonymous-items-001-ref.html +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-anonymous-items-001-ref.html @@ -10,6 +10,6 @@ <meta charset="utf-8"> </head> <body> - a ab bx x + a a<div style="display:inline-block">b b</div>x x </body> </html> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context-ref.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context-ref.html new file mode 100644 index 00000000000..31be3d081e8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context-ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS transforms: 'perspective' on a non-transformable element doesn't create a stacking context</title> +<link rel="author" title="Matt Woodrow" href="mailto:mwoodrow@mozilla.com"> +<link rel="author" title="Mozilla" href="http://www.mozilla.org/"> +<style> + html, body { margin: 0; padding: 0 } + #fixedmoves { + position: absolute; + background: green; + height: 100px; + width: 100px; + } +</style> +<body> + <div id="fixedmoves"></div> +</body> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context.html b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context.html new file mode 100644 index 00000000000..8916a39bbb5 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/perspective-untransformable-no-stacking-context.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS transforms: 'perspective' on a non-transformable element doesn't create a stacking context</title> +<link rel="author" title="Matt Woodrow" href="mailto:mwoodrow@mozilla.com"> +<link rel="author" title="Mozilla" href="http://www.mozilla.org/"> +<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#perspective-property"> +<link rel="match" href="perspective-untransformable-no-stacking-context-ref.html"> +<meta name="assert" content="Perspective on a non-transformable element shouldn't create a stacking context."> +<style> +* { margin: 0; padding: 0; } +div, span { width: 100px; height: 100px } +#perspective { background: green; padding-top: 100px; perspective: 100px; } +#child { display:inline-block; z-index: -1; position:absolute; background: red; } +#spacer { display:inline-block; } +#wrapper { overflow:hidden } +</style> +<body> + <div id="wrapper"> + <span id="perspective"> + <div id="child"> + </div> + <span id="spacer"></span> + </span> + </div> +</body> diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list index f398b1b9da3..33773a4c09f 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/transforms/reftest.list @@ -4,6 +4,7 @@ == perspective-containing-block-dynamic-1b.html containing-block-dynamic-1-ref.html == perspective-zero.html reference/green.html == perspective-zero-2.html perspective-zero-2-ref.html +== perspective-untransformable-no-stacking-context.html perspective-untransformable-no-stacking-context-ref.html == individual-transform-1.html individual-transform-1-ref.html == individual-transform-2a.html individual-transform-2-ref.html diff --git a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/reftest.list b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/reftest.list index cdbd971bdfb..be4eea1fabb 100644 --- a/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/reftest.list +++ b/tests/wpt/web-platform-tests/css/vendor-imports/mozilla/mozilla-central-reftests/writing-modes-3/reftest.list @@ -1,4 +1,3 @@ - == text-combine-upright-break-inside-001.html text-combine-upright-break-inside-001-ref.html == text-combine-upright-break-inside-001a.html text-combine-upright-break-inside-001-ref.html == text-combine-upright-compression-001.html text-combine-upright-compression-001-ref.html diff --git a/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md b/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md index 8af8aaed580..334ef8c85bf 100644 --- a/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md +++ b/tests/wpt/web-platform-tests/docs/_running-tests/chrome_android.md @@ -36,6 +36,9 @@ Downloads/ as it'll be easier to find). Open Settings -> Security & location -> Encryption & credentials -> Install from storage. Find and install `cacert.crt`. (The setting entries might be slightly different based your Android version.) +Note that having this CA installed on your device outside of a test +environment represents a security risk. + Finally, we may run wpt with the `chrome_android` product diff --git a/tests/wpt/web-platform-tests/fetch/corb/README.md b/tests/wpt/web-platform-tests/fetch/corb/README.md index 48fc4ad6871..f131b5a1da9 100644 --- a/tests/wpt/web-platform-tests/fetch/corb/README.md +++ b/tests/wpt/web-platform-tests/fetch/corb/README.md @@ -12,20 +12,22 @@ because all of these tests verify behavior that is important to the CORB algorithm. -### Disclaimer: CORB is not standardized yet +### CORB is not universally implemented yet -Note that CORB is currently in very early stages of standardization path. At -the same time, some tests in this directory (e.g. +CORB has been included +in the [Fetch spec](https://fetch.spec.whatwg.org/#corb) +since [May 2018](https://github.com/whatwg/fetch/pull/686). + +Some tests in this directory (e.g. `css-with-json-parser-breaker`) cover behavior spec-ed outside of CORB (making sure that CORB doesn't change the existing web behavior) and therefore are -valuable independently from CORB's standardization efforts. +valuable independently from CORB's standardization efforts and should already +be passing across all browsers. -Tests that cover behavior that is changed by CORB have to be marked as +Tests that cover behavior that is changed by CORB are currently marked as [tentative](https://web-platform-tests.org/writing-tests/file-names.html) -(using `.tentative` substring in their filename) until CORB -is included in the official -[Fetch spec](https://fetch.spec.whatwg.org/). Such tests may fail unless -CORB is enabled. In practice this means that: +(using `.tentative` substring in their filename). +Such tests may fail unless CORB is enabled. In practice this means that: * Such tests will pass in Chromium (where CORB is enabled by default [since M68](https://crrev.com/553830)). * Such tests may fail in other browsers. @@ -53,12 +55,13 @@ WPT tests can cover the following: * blocking of CORB-protected documents can prevent triggering syntax errors in scripts - `script-html-via-cross-origin-blob-url.tentative.sub.html` +* Helping verify which MIME types are protected by CORB. Examples of aspects that WPT tests cannot cover (these aspects have to be covered in other, browser-specific tests): * Verifying that CORB doesn't affect things that are only indirectly observable by the web (like [prefetch](https://html.spec.whatwg.org/#link-type-prefetch). -* Verifying that CORB strips non-safe-listed headers of blocked responses. +* Verifying that CORB strips headers of blocked responses. * Verifying that CORB blocks responses before they reach the process hosting a cross-origin execution context. diff --git a/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.html b/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html index 04365e0a6e8..ebd981a969b 100644 --- a/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.html +++ b/tests/wpt/web-platform-tests/html/browsers/windows/nested-browsing-contexts/frameElement.sub.html @@ -4,7 +4,6 @@ <link rel="author" title="Intel" href="http://www.intel.com/" /> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<script src="/common/get-host-info.sub.js"></script> <script> var t1 = async_test("The window's frameElement attribute must return its container element if it is a nested browsing context"); @@ -50,21 +49,14 @@ function on_load() { <body onload="on_load()"> <div id="log"></div> <iframe id="fr1"></iframe> - <iframe id="fr2" src="resources/frameElement-nested-frame.html"></iframe> <!-- cross origin --> + <iframe id="fr2" src="http://{{hosts[alt][]}}:{{ports[http][0]}}/html/browsers/windows/nested-browsing-contexts/resources/frameElement-nested-frame.html"></iframe><!--cross origin --> <iframe id="fr3" src="" style="display:none"></iframe> <object id="obj" name="win2" type="text/html" data="about:blank"></object> <embed id="emb" name="win3" type="image/svg+xml" src="/images/green.svg" /> <iframe id="fr4" src="resources/frameElement-nested-frame.html"></iframe> <!-- same origin --> - <iframe id="fr5" src="resources/frameElement-window-post.html"></iframe> <!-- cross origin --> + <iframe id="fr5" src="http://{{hosts[alt][]}}:{{ports[http][0]}}/html/browsers/windows/nested-browsing-contexts/resources/frameElement-window-post.html"></iframe> <!-- cross origin --> <script> - setup(function () { - var src_base = get_host_info().HTTP_REMOTE_ORIGIN; - src_base += document.location.pathname.substring(0, document.location.pathname.lastIndexOf("/") + 1); - document.getElementById("fr2").src = src_base + "/resources/frameElement-nested-frame.html"; - document.getElementById("fr5").src = src_base + "/resources/frameElement-window-post.html"; - }); - test(function () { assert_equals(window.frameElement, null, "The frameElement attribute should be null."); diff --git a/tests/wpt/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html b/tests/wpt/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html new file mode 100644 index 00000000000..c6521f0a886 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/attributes.sub.html @@ -0,0 +1,66 @@ +<!doctype html> +<meta charset={{GET[encoding]}}> <!-- ends up as <meta charset> by default which is windows-1252 --> +<meta name=variant content="?encoding=x-cp1251"> +<meta name=variant content="?encoding=utf8"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<link rel=help href=https://html.spec.whatwg.org/multipage/rendering.html#the-page> +<link rel=help href=https://html.spec.whatwg.org/multipage/rendering.html#tables-2> +<link rel=help href=https://html.spec.whatwg.org/multipage/#reflecting-content-attributes-in-idl-attributes> +<div id=log></div> +<script> +function expected(encoding) { + return "?" + { + "UTF-8": "%C3%BF", + "windows-1251": "%26%23255%3B", + "windows-1252": "%FF" + }[encoding]; +} + +function assert_ends_with(input, endsWith) { + assert_true(input.endsWith(endsWith), input + " did not end with " + endsWith); +} + +"body table thead tbody tfoot tr td th".split(" ").forEach(localName => { + test(t => { + const elm = document.createElement(localName); + document.body.appendChild(elm); + t.add_cleanup(() => document.body.removeChild(elm)); + elm.setAttribute("background", "?\u00FF"); + assert_ends_with(getComputedStyle(elm).backgroundImage, expected(document.characterSet) + "\")"); + }, "getComputedStyle <" + localName + " background>"); +}); + +function test_url_reflecting(localName, attr, idlAttr) { + idlAttr = idlAttr || attr; + test(() => { + let input = "?\u00FF"; + const elm = document.createElement(localName); + assert_true(idlAttr in elm, idlAttr + " is not supported"); + elm.setAttribute(attr, input); + assert_ends_with(elm[idlAttr], expected(document.characterSet)); + }, "Getting <" + localName + ">." + idlAttr); +} + +("iframe src, a href, area href, base href, link href, img src, embed src, object data, " + + "track src, video src, audio src, input src, form action, input formaction formAction, " + + "button formaction formAction, script src").split(", ").forEach(str => { + const arr = str.split(" "); + test_url_reflecting(arr[0], arr[1], arr[2]); +}); + +function test_string_reflecting(localName, attr) { + test(() => { + let input = "?\u00FF ?\u00FF"; + const elm = document.createElement(localName); + assert_true(attr in elm, attr + " is not supported"); + elm.setAttribute(attr, input); + assert_equals(elm[attr], input); + }, "Getting <" + localName + ">." + attr); +} + +"a ping, area ping".split(", ").forEach(str => { + const arr = str.split(" "); + test_string_reflecting(arr[0], arr[1]); +}); +</script> diff --git a/tests/wpt/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js b/tests/wpt/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js index 9e0f7f53135..2c8a7fe7b96 100644 --- a/tests/wpt/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js +++ b/tests/wpt/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/resources/resolve-url.js @@ -49,55 +49,6 @@ onload = function() { test_obj.step_timeout(poll, 200); } - // background attribute, check with getComputedStyle - function test_background(tag) { - var spec_url = 'https://html.spec.whatwg.org/multipage/rendering.html'; - spec_url += tag == 'body' ? '#the-page' : '#tables'; - test(function() { - var elm = document.createElement(tag); - document.body.appendChild(elm); - this.add_cleanup(function() { - document.body.removeChild(elm); - }); - elm.setAttribute('background', input_url_png); - var got = getComputedStyle(elm).backgroundImage; - assert_true(got.indexOf(expected_current) > -1, msg(expected_current, got)); - }, 'getComputedStyle <'+tag+' background>', - {help:spec_url}); - } - - 'body, table, thead, tbody, tfoot, tr, td, th'.split(', ').forEach(function(str) { - test_background(str); - }); - - // get a reflecting IDL attributes whose content attribute takes a URL or a list of space-separated URLs - function test_reflecting(tag, attr, idlAttr, multiple) { - idlAttr = idlAttr || attr; - var input = input_url_html; - if (multiple) { - input += ' ' + input; - } - test(function() { - var elm = document.createElement(tag); - assert_true(idlAttr in elm, idlAttr + ' is not supported'); - elm.setAttribute(attr, input); - var got = elm[idlAttr]; - assert_true(got.indexOf(expected_current) > -1, msg(expected_current, got)); - }, 'Getting <'+tag+'>.'+idlAttr + (multiple ? ' (multiple URLs)' : ''), - {help:'https://html.spec.whatwg.org/multipage/#reflecting-content-attributes-in-idl-attributes'}); - } - - ('iframe src, a href, base href, link href, img src, embed src, object data, track src, video src, audio src, input src, form action, ' + - 'input formaction formAction, button formaction formAction, script src').split(', ').forEach(function(str) { - var arr = str.split(' '); - test_reflecting(arr[0], arr[1], arr[2]); - }); - - 'a ping'.split(', ').forEach(function(str) { - var arr = str.split(' '); - test_reflecting(arr[0], arr[1], arr[2], true); - }); - function setup_navigation(elm, iframe, id, test_obj) { iframe.name = id; elm.target = id; diff --git a/tests/wpt/web-platform-tests/keyboard-map/OWNERS b/tests/wpt/web-platform-tests/keyboard-map/OWNERS new file mode 100644 index 00000000000..03891384838 --- /dev/null +++ b/tests/wpt/web-platform-tests/keyboard-map/OWNERS @@ -0,0 +1 @@ +@garykac diff --git a/tests/wpt/web-platform-tests/lint.whitelist b/tests/wpt/web-platform-tests/lint.whitelist index ce825bfa021..4948fe6bf42 100644 --- a/tests/wpt/web-platform-tests/lint.whitelist +++ b/tests/wpt/web-platform-tests/lint.whitelist @@ -214,7 +214,7 @@ SET TIMEOUT: xhr/resources/init.htm SET TIMEOUT: xhr/resources/xmlhttprequest-timeout.js # generate_tests implementation and sample usage -GENERATE_TESTS: resources/test/tests/generate-callback.html +GENERATE_TESTS: resources/test/tests/functional/generate-callback.html GENERATE_TESTS: resources/testharness.js # generate_tests usage (should be got rid of) @@ -289,9 +289,9 @@ SET TIMEOUT: html/browsers/windows/auxiliary-browsing-contexts/resources/close-o SET TIMEOUT: html/dom/documents/dom-tree-accessors/Document.currentScript.html SET TIMEOUT: html/webappapis/timers/* SET TIMEOUT: resources/chromium/* -SET TIMEOUT: resources/test/tests/add_cleanup.html -SET TIMEOUT: resources/test/tests/api-tests-1.html -SET TIMEOUT: resources/test/tests/worker.js +SET TIMEOUT: resources/test/tests/functional/add_cleanup.html +SET TIMEOUT: resources/test/tests/functional/api-tests-1.html +SET TIMEOUT: resources/test/tests/functional/worker.js SET TIMEOUT: resources/testharness.js # setTimeout use in reftests diff --git a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html index d9283705f32..6eea9994891 100644 --- a/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html +++ b/tests/wpt/web-platform-tests/mediacapture-streams/MediaStreamTrack-getCapabilities.https.html @@ -11,6 +11,7 @@ var audioCapabilities = stream.getAudioTracks()[0].getCapabilities(); var videoCapabilities = stream.getVideoTracks()[0].getCapabilities(); assert_true(undefined !== audioCapabilities.deviceId, "MediaTrackCapabilities's deviceId should exist for an audio track."); + assert_true(undefined !== audioCapabilities.groupId, "MediaTrackCapabilities's groupId should exist for an audio track."); assert_true(undefined !== audioCapabilities.echoCancellation, "MediaTrackCapabilities's echoCancellation should exist for an audio track."); assert_true(undefined !== audioCapabilities.autoGainControl, "MediaTrackCapabilities's autoGainControl should exist for an audio track."); assert_true(undefined !== audioCapabilities.noiseSuppression, "MediaTrackCapabilities's noiseSuppression should exist for an audio track."); diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.html b/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.html index 0377410e776..fd8ea50934c 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.html @@ -21,7 +21,6 @@ test(function() { var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = "#0f0"; ctx.fillRect(0, 0, 10, 10); - ctx.commit(); // commit() propagation is taken care of by an async task, which means the // place holder contents should still be transparent black at this moment. verifyPlaceholder(placeholder, 0,0,0,0, "0,0,0,0"); @@ -36,8 +35,7 @@ test(function() { var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = "#0f0"; ctx.fillRect(0, 0, 10, 10); - assert_throws("InvalidStateError", function() { ctx.commit(); }); -}, "Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement throws an exception."); + ctx.commit(); +}, "Test that calling commit on an OffscreenCanvas that is not transferred from a HTMLCanvasElement is a noop."); </script> - diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html b/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html index 380686fd8b1..3b1eac8c9ff 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html @@ -6,8 +6,7 @@ <script id="myWorker" type="text/worker"> -function testCommitPushesContents(offscreenCanvas) -{ +function testCommitPushesContents(offscreenCanvas) { try { var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = "#0f0"; @@ -19,24 +18,12 @@ function testCommitPushesContents(offscreenCanvas) } } -function isInvalidStateError(funcStr, ctx) -{ - try { - eval(funcStr); - } catch (e) { - if (e instanceof DOMException && e.name == "InvalidStateError") - return true; - return false; - } -} - -function testCommitException() -{ +function testCommitException() { var offscreenCanvas = new OffscreenCanvas(10, 10); var ctx = offscreenCanvas.getContext('2d'); ctx.fillStyle = "#0f0"; ctx.fillRect(0, 0, 10, 10); - return isInvalidStateError("ctx.commit()", ctx); + return true; } self.onmessage = function(e) { @@ -54,8 +41,7 @@ self.onmessage = function(e) { <script> -function verifyPlaceholder(placeholder) -{ +function verifyPlaceholder(placeholder) { var canvas = document.createElement('canvas'); canvas.width = canvas.height = 10; var ctx = canvas.getContext('2d'); @@ -63,8 +49,7 @@ function verifyPlaceholder(placeholder) _assertPixel(canvas, 5,5, 0,255,0,255, "5,5", "0,255,0,255"); } -function makeWorker(script) -{ +function makeWorker(script) { var blob = new Blob([script]); return new Worker(URL.createObjectURL(blob)); } diff --git a/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.resize.html b/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.resize.html index 3d40129669d..5770309925c 100644 --- a/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.resize.html +++ b/tests/wpt/web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.resize.html @@ -100,7 +100,6 @@ async_test(function(t) { assert_equals(placeholder.height, 20); }); var asyncStepsCompleted = 0; - ctx.commit(); createImageBitmap(placeholder).then(image => { t.step(function() { // Verify that the placeholder was not updated synchronously. @@ -112,29 +111,33 @@ async_test(function(t) { t.done(); } }); - // Set timeout acts as a sync barrier to allow commit to propagate - setTimeout(function(){ - t.step(function() { - // Verify that commit() asynchronously updates the size of its placeholder canvas. - assert_equals(placeholder.width, 30); - assert_equals(placeholder.height, 40); - var computedStyle = window.getComputedStyle(placeholder); - assert_equals(computedStyle.getPropertyValue('width'), "30px"); - assert_equals(computedStyle.getPropertyValue('height'), "40px"); - }); - createImageBitmap(placeholder).then(image => { + // We wait for up to 3 frames before checking the information has propagated. + requestAnimationFrame(() => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { t.step(function() { - // Verify that an image grabbed from the placeholder has the correct dimensions - assert_equals(image.width, 30); - assert_equals(image.height, 40); + // Verify that updates the size of its placeholder canvas. + assert_equals(placeholder.width, 30); + assert_equals(placeholder.height, 40); + var computedStyle = window.getComputedStyle(placeholder); + assert_equals(computedStyle.getPropertyValue('width'), "30px"); + assert_equals(computedStyle.getPropertyValue('height'), "40px"); + }); + createImageBitmap(placeholder).then(image => { + t.step(function() { + // Verify that an image grabbed from the placeholder has the correct dimensions + assert_equals(image.width, 30); + assert_equals(image.height, 40); + }); + asyncStepsCompleted = asyncStepsCompleted + 1; + if (asyncStepsCompleted == 2) { + t.done(); + } }); - asyncStepsCompleted = asyncStepsCompleted + 1; - if (asyncStepsCompleted == 2) { - t.done(); - } }); - }, 0); -}, "Verify that resizing an OffscreenCanvas with a 2d context propagates the new size to its placeholder canvas asynchronously, upon commit."); + }); + }); +}, "Verify that resizing an OffscreenCanvas with a 2d context propagates the new size to its placeholder canvas asynchronously."); async_test(function(t) { var placeholder = document.createElement('canvas'); @@ -159,7 +162,6 @@ async_test(function(t) { assert_equals(placeholder.height, 20); }); var asyncStepsCompleted = 0; - ctx.commit(); createImageBitmap(placeholder).then(image => { t.step(function() { // Verify that the placeholder was not updated synchronously. @@ -171,29 +173,33 @@ async_test(function(t) { t.done(); } }); - // Set timeout acts as a sync barrier to allow commit to propagate - setTimeout(function(){ - t.step(function() { - // Verify that commit() asynchronously updates the size of its placeholder canvas. - assert_equals(placeholder.width, 30); - assert_equals(placeholder.height, 40); - var computedStyle = window.getComputedStyle(placeholder); - assert_equals(computedStyle.getPropertyValue('width'), "30px"); - assert_equals(computedStyle.getPropertyValue('height'), "40px"); - }); - createImageBitmap(placeholder).then(image => { - t.step(function() { - // Verify that an image grabbed from the placeholder has the correct dimensions - assert_equals(image.width, 30); - assert_equals(image.height, 40); + // We wait for up to 3 frames before checking the information has propagated. + requestAnimationFrame(() => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + t.step(function() { + // Verify that updates the size of its placeholder canvas. + assert_equals(placeholder.width, 30); + assert_equals(placeholder.height, 40); + var computedStyle = window.getComputedStyle(placeholder); + assert_equals(computedStyle.getPropertyValue('width'), "30px"); + assert_equals(computedStyle.getPropertyValue('height'), "40px"); + }); + createImageBitmap(placeholder).then(image => { + t.step(function() { + // Verify that an image grabbed from the placeholder has the correct dimensions + assert_equals(image.width, 30); + assert_equals(image.height, 40); + }); + asyncStepsCompleted = asyncStepsCompleted + 1; + if (asyncStepsCompleted == 2) { + t.done(); + } + }); }); - asyncStepsCompleted = asyncStepsCompleted + 1; - if (asyncStepsCompleted == 2) { - t.done(); - } }); - }, 0); -}, "Verify that resizing an OffscreenCanvas with a webgl context propagates the new size to its placeholder canvas asynchronously, upon commit."); + }); +}, "Verify that resizing an OffscreenCanvas with a webgl context propagates the new size to its placeholder canvas asynchronously."); async_test(function(t){ var placeholder = document.createElement('canvas'); @@ -204,24 +210,27 @@ async_test(function(t){ offscreen.width = offscreen.height = 10; ctx.fillStyle = '#0f0'; ctx.fillRect(0, 0, 10, 10); - ctx.commit(); - // Set timeout acts as a sync barrier to allow commit to propagate - setTimeout(function(){ - var testCanvas = document.createElement('canvas'); - testCanvas.width = testCanvas.height = 20; - testCtx = testCanvas.getContext('2d'); - testCtx.drawImage(placeholder, 0, 0); - var pixel1 = testCtx.getImageData(9, 9, 1, 1).data; - var pixel2 = testCtx.getImageData(9, 10, 1, 1).data; - var pixel3 = testCtx.getImageData(10, 9, 1, 1).data; - t.step(function() { - assert_equals(placeholder.width, 10); - assert_equals(placeholder.height, 10); - assert_array_equals(pixel1, [0, 255, 0, 255]); - assert_array_equals(pixel2, [0, 0, 0, 0]); - assert_array_equals(pixel3, [0, 0, 0, 0]); + // We wait for up to 3 frames before checking the information has propagated. + requestAnimationFrame(() => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + var testCanvas = document.createElement('canvas'); + testCanvas.width = testCanvas.height = 20; + testCtx = testCanvas.getContext('2d'); + testCtx.drawImage(placeholder, 0, 0); + var pixel1 = testCtx.getImageData(9, 9, 1, 1).data; + var pixel2 = testCtx.getImageData(9, 10, 1, 1).data; + var pixel3 = testCtx.getImageData(10, 9, 1, 1).data; + t.step(function() { + assert_equals(placeholder.width, 10); + assert_equals(placeholder.height, 10); + assert_array_equals(pixel1, [0, 255, 0, 255]); + assert_array_equals(pixel2, [0, 0, 0, 0]); + assert_array_equals(pixel3, [0, 0, 0, 0]); + }); + t.done(); + }); }); - t.done(); }); -}, "Verify that drawImage uses the size of the committed frame as the intinsic size of a placeholder canvas."); +}, "Verify that drawImage uses the size of the frame as the intinsic size of a placeholder canvas."); </script> diff --git a/tests/wpt/web-platform-tests/resources/test/README.md b/tests/wpt/web-platform-tests/resources/test/README.md index c228372399c..73885247efc 100644 --- a/tests/wpt/web-platform-tests/resources/test/README.md +++ b/tests/wpt/web-platform-tests/resources/test/README.md @@ -26,12 +26,12 @@ the correct arguments. ## Authoring Tests -Test cases are expressed as `.html` files located within the `tests/` -sub-directory. Each test should include the `testharness.js` library with the -following markup: +Test cases are expressed as `.html` files located within the `tests/unit/` and +`tests/funtional/` sub-directories. Each test should include the +`testharness.js` library with the following markup: - <script src="../../testharness.js"></script> - <script src="../../testharnessreport.js"></script> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> This should be followed by one or more `<script>` tags that interface with the `testharness.js` API in some way. For example: @@ -42,8 +42,25 @@ This should be followed by one or more `<script>` tags that interface with the }, 'This test is expected to fail.'); </script> -Finally, each test may include a summary of the expected results as a JSON -string within a `<script>` tag with an `id` of `"expected"`, e.g.: +### Unit tests + +The "unit test" type allows for concisely testing the expected behavior of +assertion methods. These tests may define any number of sub-tests; the +acceptance criteria is simply that all tests executed pass. + +### Functional tests + +Thoroughly testing the behavior of the harness itself requires ensuring a +number of considerations which cannot be verified with the "unit testing" +strategy. These include: + +- Ensuring that some tests are not run +- Ensuring conditions that cause test failures +- Ensuring conditions that cause harness errors + +Functional tests allow for these details to be verified. Every functional test +must include a summary of the expected results as a JSON string within a +`<script>` tag with an `id` of `"expected"`, e.g.: <script type="text/json" id="expected"> { @@ -64,6 +81,3 @@ string within a `<script>` tag with an `id` of `"expected"`, e.g.: "type": "complete" } </script> - -This is useful to test, for example, whether asserations that should fail or -throw actually do. diff --git a/tests/wpt/web-platform-tests/resources/test/conftest.py b/tests/wpt/web-platform-tests/resources/test/conftest.py index abc3b6cfdda..dc645940d6a 100644 --- a/tests/wpt/web-platform-tests/resources/test/conftest.py +++ b/tests/wpt/web-platform-tests/resources/test/conftest.py @@ -17,8 +17,13 @@ def pytest_addoption(parser): parser.addoption("--binary", action="store", default=None, help="path to browser binary") def pytest_collect_file(path, parent): - if path.ext.lower() == '.html': - return HTMLItem(str(path), parent) + if path.ext.lower() != '.html': + return + + # Tests are organized in directories by type + test_type = os.path.relpath(str(path), HERE).split(os.path.sep)[1] + + return HTMLItem(str(path), test_type, parent) def pytest_configure(config): config.driver = webdriver.Firefox(firefox_binary=config.getoption("--binary")) @@ -28,8 +33,13 @@ def pytest_configure(config): config.add_cleanup(config.driver.quit) class HTMLItem(pytest.Item, pytest.Collector): - def __init__(self, filename, parent): + def __init__(self, filename, test_type, parent): self.filename = filename + self.type = test_type + + if test_type not in ('functional', 'unit'): + raise ValueError('Unrecognized test type: "%s"' % test_type) + with io.open(filename, encoding=ENC) as f: markup = f.read() @@ -47,6 +57,10 @@ class HTMLItem(pytest.Item, pytest.Collector): if not name: raise ValueError('No name found in file: %s' % filename) + elif self.type == 'functional' and not self.expected: + raise ValueError('Functional tests must specify expected report data') + elif self.type == 'unit' and self.expected: + raise ValueError('Unit tests must not specify expected report data') super(HTMLItem, self).__init__(name, parent) @@ -58,6 +72,29 @@ class HTMLItem(pytest.Item, pytest.Collector): return pytest.Collector.repr_failure(self, excinfo) def runtest(self): + if self.type == 'unit': + self._run_unit_test() + elif self.type == 'functional': + self._run_functional_test() + else: + raise NotImplementedError + + def _run_unit_test(self): + driver = self.session.config.driver + server = self.session.config.server + + driver.get(server.url(HARNESS)) + + actual = driver.execute_async_script('runTest("%s", "foo", arguments[0])' % server.url(str(self.filename))) + + summarized = self._summarize(actual) + + assert summarized[u'summarized_status'][u'status_string'] == u'OK', summarized[u'summarized_status'][u'message'] + for test in summarized[u'summarized_tests']: + msg = "%s\n%s" % (test[u'name'], test[u'message']) + assert test[u'status_string'] == u'PASS', msg + + def _run_functional_test(self): driver = self.session.config.driver server = self.session.config.server @@ -70,20 +107,20 @@ class HTMLItem(pytest.Item, pytest.Collector): indices = [test_obj.get('index') for test_obj in actual['tests']] self._assert_sequence(indices) + summarized = self._summarize(actual) + + assert summarized == self.expected + + def _summarize(self, actual): summarized = {} + summarized[u'summarized_status'] = self._summarize_status(actual['status']) summarized[u'summarized_tests'] = [ self._summarize_test(test) for test in actual['tests']] summarized[u'summarized_tests'].sort(key=lambda test_obj: test_obj.get('name')) summarized[u'type'] = actual['type'] - if not self.expected: - assert summarized[u'summarized_status'][u'status_string'] == u'OK', summarized[u'summarized_status'][u'message'] - for test in summarized[u'summarized_tests']: - msg = "%s\n%s" % (test[u'name'], test[u'message']) - assert test[u'status_string'] == u'PASS', msg - else: - assert summarized == self.expected + return summarized @staticmethod def _assert_sequence(nums): diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/helper.js b/tests/wpt/web-platform-tests/resources/test/idl-helper.js index 2b73527ff2b..2b73527ff2b 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/helper.js +++ b/tests/wpt/web-platform-tests/resources/test/idl-helper.js diff --git a/tests/wpt/web-platform-tests/resources/test/tests/add_cleanup.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/add_cleanup.html index c5e0ad79ac7..468319fdbea 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/add_cleanup.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/add_cleanup.html @@ -2,8 +2,8 @@ <html> <head> <title>Test#add_cleanup</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> </head> <body> <div id="log"></div> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/add_cleanup_count.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/add_cleanup_count.html index 3ea30a3f084..75f97821918 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/add_cleanup_count.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/add_cleanup_count.html @@ -2,8 +2,8 @@ <html> <head> <title>Test#add_cleanup reported count</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> </head> <body> <div id="log"></div> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/add_cleanup_err.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/add_cleanup_err.html index bae1eb5a567..5ec6a3fdd08 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/add_cleanup_err.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/add_cleanup_err.html @@ -2,8 +2,8 @@ <html> <head> <title>Test#add_cleanup: error</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> </head> <body> <div id="log"></div> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/add_cleanup_err_multi.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/add_cleanup_err_multi.html index 3f116c5876d..7556829ae09 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/add_cleanup_err_multi.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/add_cleanup_err_multi.html @@ -2,8 +2,8 @@ <html> <head> <title>Test#add_cleanup: multiple functions with one in error</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> </head> <body> <div id="log"></div> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/api-tests-1.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/api-tests-1.html index 3b5234f3626..4d9c774577b 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/api-tests-1.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/api-tests-1.html @@ -7,8 +7,8 @@ <body onload="load_test_attr.done()"> <h1>Sample HTML5 API Tests</h1> <div id="log"></div> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> setup_run = false; setup(function() { diff --git a/tests/wpt/web-platform-tests/resources/test/tests/api-tests-2.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/api-tests-2.html index 164106bb6df..0c269029b4f 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/api-tests-2.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/api-tests-2.html @@ -7,8 +7,8 @@ <h1>Sample HTML5 API Tests</h1> <p>There should be two results</p> <div id="log"></div> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> setup({explicit_done:true}) test(function() {assert_true(true)}, "Test defined before onload"); diff --git a/tests/wpt/web-platform-tests/resources/test/tests/api-tests-3.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/api-tests-3.html index 5dbeb2d94e1..991fc6da670 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/api-tests-3.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/api-tests-3.html @@ -3,7 +3,7 @@ <head> <title>Sample HTML5 API Tests</title> </head> -<script src="../../testharness.js"></script> +<script src="/resources/testharness.js"></script> <body> <h1>Sample HTML5 API Tests</h1> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/force_timeout.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/force_timeout.html index 7827068b03e..2058fdb8621 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/force_timeout.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/force_timeout.html @@ -6,8 +6,8 @@ <body> <h1>Test#force_timeout</h1> <div id="log"></div> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> setup({ explicit_timeout: true }); diff --git a/tests/wpt/web-platform-tests/resources/test/tests/generate-callback.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/generate-callback.html index 574f430d218..11d41743b3e 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/generate-callback.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/generate-callback.html @@ -2,8 +2,8 @@ <html> <head> <title>Sample for using generate_tests to create a series of tests that share the same callback.</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/test_immutable_prototype.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_immutable_prototype.html index a9d631d0a3b..ed578bce0a0 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/test_immutable_prototype.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_immutable_prototype.html @@ -3,10 +3,10 @@ <head> <meta charset="utf-8"> <title>idlharness: Immutable prototypes</title> - <script src="../../../../testharness.js"></script> - <script src="../../../../testharnessreport.js"></script> - <script src="../../../../WebIDLParser.js"></script> - <script src="../../../../idlharness.js"></script> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/resources/WebIDLParser.js"></script> + <script src="/resources/idlharness.js"></script> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/test_primary_interface_of.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_primary_interface_of.html index 69542f1d7d7..69542f1d7d7 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/test_primary_interface_of.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_primary_interface_of.html diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/test_to_json_operation.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_to_json_operation.html index ef8fcc991f6..5c60465bacb 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/test_to_json_operation.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/idlharness/IdlInterface/test_to_json_operation.html @@ -7,7 +7,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> - <script src="../helper.js"></script> + <script src="../../../../idl-helper.js"></script> </head> <body> <script> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/iframe-callback.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/iframe-callback.html index b6b751bfe5f..f49d0aa6b80 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/iframe-callback.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/iframe-callback.html @@ -2,8 +2,8 @@ <html> <head> <title>Example with iframe that notifies containing document via callbacks</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> </head> <body onload="start_test_in_iframe()"> <h1>Callbacks From Tests Running In An IFRAME</h1> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/iframe-consolidate-errors.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/iframe-consolidate-errors.html index a44d034e093..67655fd64e7 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/iframe-consolidate-errors.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/iframe-consolidate-errors.html @@ -2,8 +2,8 @@ <html> <head> <title>Example with iframe that consolidates errors via fetch_tests_from_window</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> var parent_test = async_test("Test executing in parent context"); </script> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/iframe-consolidate-tests.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/iframe-consolidate-tests.html index 7b8a8970284..0fa1f20797d 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/iframe-consolidate-tests.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/iframe-consolidate-tests.html @@ -2,8 +2,8 @@ <html> <head> <title>Example with iframe that consolidates tests via fetch_tests_from_window</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> var parent_test = async_test("Test executing in parent context"); </script> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/iframe-msg.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/iframe-msg.html index c6bc97beef9..283a5d98cc3 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/iframe-msg.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/iframe-msg.html @@ -2,8 +2,8 @@ <html> <head> <title>Example with iframe that notifies containing document via cross document messaging</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> </head> <body> <h1>Notifications From Tests Running In An IFRAME</h1> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/order.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/order.html index 1604f437f3d..686383861a0 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/order.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/order.html @@ -6,8 +6,8 @@ </head> <body> <div id="log"></div> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> test(function() {}, 'second'); test(function() {}, 'first'); diff --git a/tests/wpt/web-platform-tests/resources/test/tests/promise-async.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/promise-async.html index 18101ee97af..fa82665cf00 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/promise-async.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/promise-async.html @@ -7,8 +7,8 @@ <h1>Async Tests and Promises</h1> <p>This test assumes ECMAScript 6 Promise support. Some failures are expected.</p> <div id="log"></div> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> test(function() { diff --git a/tests/wpt/web-platform-tests/resources/test/tests/promise.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html index 4825a38677b..bbda0112a6a 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/promise.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/promise.html @@ -8,8 +8,8 @@ <p>This test demonstrates the use of <tt>promise_test</tt>. Assumes ECMAScript 6 Promise support. Some failures are expected.</p> <div id="log"></div> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> test( function() { diff --git a/tests/wpt/web-platform-tests/resources/test/tests/single-page-test-fail.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/single-page-test-fail.html index a8f247d9ccb..ca90aab5adf 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/single-page-test-fail.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/single-page-test-fail.html @@ -1,7 +1,7 @@ <!DOCTYPE HTML> <title>Example with file_is_test (should fail)</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> onload = function() { assert_true(false); diff --git a/tests/wpt/web-platform-tests/resources/test/tests/single-page-test-no-assertions.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/single-page-test-no-assertions.html index d1a7532f6c5..063a4ca5142 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/single-page-test-no-assertions.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/single-page-test-no-assertions.html @@ -1,7 +1,7 @@ <!DOCTYPE HTML> <title>Example single page test with no asserts</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> done(); </script> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/single-page-test-no-body.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/single-page-test-no-body.html index c62ee18e3cd..41671b83d7c 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/single-page-test-no-body.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/single-page-test-no-body.html @@ -1,7 +1,7 @@ <!DOCTYPE HTML> <title>Example single page test with no body</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> assert_true(true); done(); diff --git a/tests/wpt/web-platform-tests/resources/test/tests/single-page-test-pass.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/single-page-test-pass.html index 91d26b02a0c..1376e28b6b5 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/single-page-test-pass.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/single-page-test-pass.html @@ -1,7 +1,7 @@ <!DOCTYPE HTML> <title>Example with file_is_test</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> <script> onload = function() { assert_true(true); diff --git a/tests/wpt/web-platform-tests/resources/test/tests/uncaught-exception-handle.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/uncaught-exception-handle.html index 061fb8040e4..764b0c4055b 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/uncaught-exception-handle.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/uncaught-exception-handle.html @@ -3,7 +3,7 @@ <head> <title>Harness Handling Uncaught Exception</title> </head> -<script src="../../testharness.js"></script> +<script src="/resources/testharness.js"></script> <body> <h1>Harness Handling Uncaught Exception</h1> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/uncaught-exception-ignore.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/uncaught-exception-ignore.html index 66240780c25..6bd0ddbb0d2 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/uncaught-exception-ignore.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/uncaught-exception-ignore.html @@ -3,7 +3,7 @@ <head> <title>Harness Ignoring Uncaught Exception</title> </head> -<script src="../../testharness.js"></script> +<script src="/resources/testharness.js"></script> <body> <h1>Harness Ignoring Uncaught Exception</h1> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/worker-dedicated.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/worker-dedicated.html index 98a010dd742..dad46761890 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/worker-dedicated.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/worker-dedicated.html @@ -2,8 +2,8 @@ <html> <head> <title>Dedicated Worker Tests</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> </head> <body> <h1>Dedicated Web Worker Tests</h1> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/worker-error.js b/tests/wpt/web-platform-tests/resources/test/tests/functional/worker-error.js index a25f0db188b..8ef2d22d241 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/worker-error.js +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/worker-error.js @@ -1,3 +1,3 @@ -importScripts("../../testharness.js"); +importScripts("/resources/testharness.js"); throw new Error("This failure is expected."); diff --git a/tests/wpt/web-platform-tests/resources/test/tests/worker-service.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/worker-service.html index d970827fc44..2e07746e622 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/worker-service.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/worker-service.html @@ -2,8 +2,8 @@ <html> <head> <title>Example with a service worker</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> </head> <body> <h1>Service Worker Tests</h1> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/worker-shared.html b/tests/wpt/web-platform-tests/resources/test/tests/functional/worker-shared.html index 9c5666b8ed0..e26f17dec27 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/worker-shared.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/worker-shared.html @@ -2,8 +2,8 @@ <html> <head> <title>Example with a shared worker</title> -<script src="../../testharness.js"></script> -<script src="../../testharnessreport.js"></script> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> </head> <body> <h1>Shared Web Worker Tests</h1> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/worker.js b/tests/wpt/web-platform-tests/resources/test/tests/functional/worker.js index a25621ac1e4..a923bc2d89e 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/worker.js +++ b/tests/wpt/web-platform-tests/resources/test/tests/functional/worker.js @@ -1,4 +1,4 @@ -importScripts("../../testharness.js"); +importScripts("/resources/testharness.js"); test( function(test) { diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlArray/is_json_type.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlArray/is_json_type.html index f7ebc9dd059..d31d9173de2 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlArray/is_json_type.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlArray/is_json_type.html @@ -9,7 +9,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> -<script src="../helper.js"></script> +<script src="../../../idl-helper.js"></script> <script> "use strict"; diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlDictionary/get_inheritance_stack.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlDictionary/get_inheritance_stack.html index 98168ee119b..1ac9e8da06f 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlDictionary/get_inheritance_stack.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlDictionary/get_inheritance_stack.html @@ -9,7 +9,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> -<script src="../helper.js"></script> +<script src="../../../idl-helper.js"></script> <script> "use strict"; test(function() { diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlDictionary/test_partial_dictionary.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlDictionary/test_partial_dictionary.html index f716b93ae85..cfcea545ffa 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlDictionary/test_partial_dictionary.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlDictionary/test_partial_dictionary.html @@ -8,7 +8,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> - <script src="../helper.js"></script> + <script src="../../../idl-helper.js"></script> </head> <body> diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/default_to_json_operation.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/default_to_json_operation.html index a77ee3e7f1f..4b3dcfe6898 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/default_to_json_operation.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/default_to_json_operation.html @@ -9,7 +9,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> -<script src="../helper.js"></script> +<script src="../../../idl-helper.js"></script> <pre id=fragments> interface A : B { attribute DOMString a; diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/get_inheritance_stack.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/get_inheritance_stack.html index fed6f9212be..66b79afc12f 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/get_inheritance_stack.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/get_inheritance_stack.html @@ -9,7 +9,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> -<script src="../helper.js"></script> +<script src="../../../idl-helper.js"></script> <script> "use strict"; test(function() { diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/has_default_to_json_regular_operation.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/has_default_to_json_regular_operation.html index 9498a3a7bce..b47262b72b9 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/has_default_to_json_regular_operation.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/has_default_to_json_regular_operation.html @@ -9,7 +9,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> -<script src="../helper.js"></script> +<script src="../../../idl-helper.js"></script> <script> "use strict"; test(function() { diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/has_to_json_regular_operation.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/has_to_json_regular_operation.html index bf7d9261a71..a1a641bd971 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/has_to_json_regular_operation.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/has_to_json_regular_operation.html @@ -9,7 +9,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> -<script src="../helper.js"></script> +<script src="../../../idl-helper.js"></script> <script> "use strict"; test(function() { diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/test_primary_interface_of_undefined.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/test_primary_interface_of_undefined.html index 0031558ad42..0031558ad42 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/test_primary_interface_of_undefined.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/test_primary_interface_of_undefined.html diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/traverse_inherited_and_consequential_interfaces.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/traverse_inherited_and_consequential_interfaces.html index 667c7911b73..21817c485b9 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterface/traverse_inherited_and_consequential_interfaces.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterface/traverse_inherited_and_consequential_interfaces.html @@ -9,7 +9,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> -<script src="../helper.js"></script> +<script src="../../../idl-helper.js"></script> <pre id=fragments> interface A : B { }; interface B : C { }; diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterfaceMember/is_to_json_regular_operation.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterfaceMember/is_to_json_regular_operation.html index ac923dd5a8f..abfa4ab800b 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/IdlInterfaceMember/is_to_json_regular_operation.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/IdlInterfaceMember/is_to_json_regular_operation.html @@ -9,7 +9,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/WebIDLParser.js"></script> <script src="/resources/idlharness.js"></script> -<script src="../helper.js"></script> +<script src="../../../idl-helper.js"></script> <script> "use strict"; test(function() { diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/OWNERS b/tests/wpt/web-platform-tests/resources/test/tests/unit/OWNERS index 37e8095017c..37e8095017c 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/OWNERS +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/OWNERS diff --git a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/basic.html b/tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html index 439c203dc95..439c203dc95 100644 --- a/tests/wpt/web-platform-tests/resources/test/tests/idlharness/basic.html +++ b/tests/wpt/web-platform-tests/resources/test/tests/unit/basic.html diff --git a/tests/wpt/web-platform-tests/resources/testharness.css b/tests/wpt/web-platform-tests/resources/testharness.css deleted file mode 100644 index e2ed5a043f9..00000000000 --- a/tests/wpt/web-platform-tests/resources/testharness.css +++ /dev/null @@ -1,102 +0,0 @@ -html { - font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans; -} - -#log .warning, -#log .warning a { - color: black; - background: yellow; -} - -#log .error, -#log .error a { - color: white; - background: red; -} - -section#summary { - margin-bottom:1em; -} - -table#results { - border-collapse:collapse; - table-layout:fixed; - width:100%; -} - -table#results th:first-child, -table#results td:first-child { - width:4em; -} - -table#results th:last-child, -table#results td:last-child { - width:50%; -} - -table#results.assertions th:last-child, -table#results.assertions td:last-child { - width:35%; -} - -table#results th { - padding:0; - padding-bottom:0.5em; - border-bottom:medium solid black; -} - -table#results td { - padding:1em; - padding-bottom:0.5em; - border-bottom:thin solid black; -} - -tr.pass > td:first-child { - color:green; -} - -tr.fail > td:first-child { - color:red; -} - -tr.timeout > td:first-child { - color:red; -} - -tr.notrun > td:first-child { - color:blue; -} - -.pass > td:first-child, .fail > td:first-child, .timeout > td:first-child, .notrun > td:first-child { - font-variant:small-caps; -} - -table#results span { - display:block; -} - -table#results span.expected { - font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace; - white-space:pre; -} - -table#results span.actual { - font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace; - white-space:pre; -} - -span.ok { - color:green; -} - -tr.error { - color:red; -} - -span.timeout { - color:red; -} - -span.ok, span.timeout, span.error { - font-variant:small-caps; -}
\ No newline at end of file diff --git a/tests/wpt/web-platform-tests/resources/testharness.js b/tests/wpt/web-platform-tests/resources/testharness.js index a48a0cfd3ec..6db163b0779 100644 --- a/tests/wpt/web-platform-tests/resources/testharness.js +++ b/tests/wpt/web-platform-tests/resources/testharness.js @@ -2403,15 +2403,11 @@ policies and contribution forms [3]. log.removeChild(log.lastChild); } - var harness_url = get_harness_url(); - if (harness_url !== undefined) { - var stylesheet = output_document.createElementNS(xhtml_ns, "link"); - stylesheet.setAttribute("rel", "stylesheet"); - stylesheet.setAttribute("href", harness_url + "testharness.css"); - var heads = output_document.getElementsByTagName("head"); - if (heads.length) { - heads[0].appendChild(stylesheet); - } + var stylesheet = output_document.createElementNS(xhtml_ns, "style"); + stylesheet.textContent = stylesheetContent; + var heads = output_document.getElementsByTagName("head"); + if (heads.length) { + heads[0].appendChild(stylesheet); } var status_text_harness = {}; @@ -2921,16 +2917,6 @@ policies and contribution forms [3]. return undefined; } - /** Returns the URL path at which the files for testharness.js are assumed to reside (e.g., '/resources/'). - The path is derived from inspecting the 'src' of the <script> tag that included 'testharness.js'. */ - function get_harness_url() - { - var script_url = get_script_url(); - - // Exclude the 'testharness.js' file from the returned path, but '+ 1' to include the trailing slash. - return script_url ? script_url.slice(0, script_url.lastIndexOf('/') + 1) : undefined; - } - function supports_post_message(w) { var supports; @@ -3009,5 +2995,113 @@ policies and contribution forms [3]. test_environment.on_tests_ready(); + /** + * Stylesheet + */ + var stylesheetContent = ` +html { + font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans; +} + +#log .warning, +#log .warning a { + color: black; + background: yellow; +} + +#log .error, +#log .error a { + color: white; + background: red; +} + +section#summary { + margin-bottom:1em; +} + +table#results { + border-collapse:collapse; + table-layout:fixed; + width:100%; +} + +table#results th:first-child, +table#results td:first-child { + width:4em; +} + +table#results th:last-child, +table#results td:last-child { + width:50%; +} + +table#results.assertions th:last-child, +table#results.assertions td:last-child { + width:35%; +} + +table#results th { + padding:0; + padding-bottom:0.5em; + border-bottom:medium solid black; +} + +table#results td { + padding:1em; + padding-bottom:0.5em; + border-bottom:thin solid black; +} + +tr.pass > td:first-child { + color:green; +} + +tr.fail > td:first-child { + color:red; +} + +tr.timeout > td:first-child { + color:red; +} + +tr.notrun > td:first-child { + color:blue; +} + +.pass > td:first-child, .fail > td:first-child, .timeout > td:first-child, .notrun > td:first-child { + font-variant:small-caps; +} + +table#results span { + display:block; +} + +table#results span.expected { + font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace; + white-space:pre; +} + +table#results span.actual { + font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace; + white-space:pre; +} + +span.ok { + color:green; +} + +tr.error { + color:red; +} + +span.timeout { + color:red; +} + +span.ok, span.timeout, span.error { + font-variant:small-caps; +} +`; + })(this); // vim: set expandtab shiftwidth=4 tabstop=4: diff --git a/tests/wpt/web-platform-tests/shadow-dom/Document-prototype-currentScript.html b/tests/wpt/web-platform-tests/shadow-dom/Document-prototype-currentScript.html index 867cea9795e..ff0344fe493 100644 --- a/tests/wpt/web-platform-tests/shadow-dom/Document-prototype-currentScript.html +++ b/tests/wpt/web-platform-tests/shadow-dom/Document-prototype-currentScript.html @@ -40,10 +40,11 @@ var testedScriptElement = null; function executeNextTest() { var testCase = asyncScriptTests.shift(); - var mode = testCase.mode; if (!testCase) return; + var mode = testCase.mode; + testCase.test.step(function () { testedScriptElement = document.createElement('script'); testedScriptElement.src = 'resources/Document-prototype-currentScript-helper.js'; @@ -75,7 +76,7 @@ var asyncScriptTests = [ test: async_test('document.currentScript must be set to a script element that loads an external script in a document tree'), mode: null, remove: false, expected: function () { return testedScriptElement; }}, { - test: async_test('document.currentScript must be set to a script element that loads an external script in a document tree'), + test: async_test('document.currentScript must be set to a script element that loads an external script in a document tree (2)'), mode: null, remove: true, expected: function () { return testedScriptElement; }}, { test: async_test('document.currentScript must not be set to a script element that loads an external script in an open shadow tree'), diff --git a/tests/wpt/web-platform-tests/tools/ci/before_install.sh b/tests/wpt/web-platform-tests/tools/ci/before_install.sh index 9b80fd95785..f6ef84f0026 100644 --- a/tests/wpt/web-platform-tests/tools/ci/before_install.sh +++ b/tests/wpt/web-platform-tests/tools/ci/before_install.sh @@ -1,7 +1,9 @@ #!/bin/bash set -e -if [[ -z ${RUN_JOB+x} && $(./wpt test-jobs --includes $JOB; echo $?) -eq 0 ]] || [[ $RUN_JOB -eq 1 ]]; then +RELEVANT_JOBS=$(./wpt test-jobs) +RELEVANT_CHANGES=$(echo "$RELEVANT_JOBS" | grep $JOB || true) +if [[ -z ${RUN_JOB+x} && ! -z $RELEVANT_CHANGES ]] || [[ $RUN_JOB -eq 1 ]]; then export RUN_JOB=1 git submodule update --init --recursive 1>&2 export DISPLAY=:99.0 diff --git a/tests/wpt/web-platform-tests/tools/ci/ci_tools_unittest.sh b/tests/wpt/web-platform-tests/tools/ci/ci_tools_unittest.sh index a8e4c41070f..eea6590f37a 100755 --- a/tests/wpt/web-platform-tests/tools/ci/ci_tools_unittest.sh +++ b/tests/wpt/web-platform-tests/tools/ci/ci_tools_unittest.sh @@ -18,8 +18,10 @@ run_applicable_tox () { export TOXENV="$OLD_TOXENV" } +RELEVANT_JOBS=$(./wpt test-jobs) -if [[ $(./wpt test-jobs --includes tools_unittest; echo $?) -eq 0 ]]; then +RELEVANT_CHANGES_TOOLS=$(echo "$RELEVANT_JOBS" | grep "tools_unittest" || true) +if [[ ! -z $RELEVANT_CHANGES_TOOLS ]]; then pip install -U tox codecov cd tools run_applicable_tox @@ -28,7 +30,8 @@ else echo "Skipping tools unittest" fi -if [[ $(./wpt test-jobs --includes wptrunner_unittest; echo $?) -eq 0 ]]; then +RELEVANT_CHANGES_WPTRUNNER=$(echo "$RELEVANT_JOBS" | grep "wptrunner_unittest" || true) +if [[ ! -z $RELEVANT_CHANGES_WPTRUNNER ]]; then cd tools/wptrunner run_applicable_tox cd $WPT_ROOT diff --git a/tests/wpt/web-platform-tests/tools/ci/taskgraph.py b/tests/wpt/web-platform-tests/tools/ci/taskgraph.py index 894071d8d81..a6ca853b265 100644 --- a/tests/wpt/web-platform-tests/tools/ci/taskgraph.py +++ b/tests/wpt/web-platform-tests/tools/ci/taskgraph.py @@ -12,8 +12,8 @@ wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir)) docker_image = "harjgam/web-platform-tests:0.11" task_template = { - "provisionerId": "{{ taskcluster.docker.provisionerId }}", - "workerType": "{{ taskcluster.docker.workerType }}", + "provisionerId": "aws-provisioner-v1", + "workerType": "wpt-docker-worker", "extra": { "github": { "events": ["push"], diff --git a/tests/wpt/web-platform-tests/tools/docker/start.sh b/tests/wpt/web-platform-tests/tools/docker/start.sh index 2fa1204615d..93b657b2ff1 100755 --- a/tests/wpt/web-platform-tests/tools/docker/start.sh +++ b/tests/wpt/web-platform-tests/tools/docker/start.sh @@ -28,7 +28,7 @@ then deb_archive=google-chrome-unstable_current_amd64.deb wget https://dl.google.com/linux/direct/$deb_archive - sudo gdebi -n $deb_archive + sudo apt-get -qqy update && gdebi -n $deb_archive fi sudo Xvfb $DISPLAY -screen 0 ${SCREEN_WIDTH}x${SCREEN_HEIGHT}x${SCREEN_DEPTH} & diff --git a/tests/wpt/web-platform-tests/tools/tox.ini b/tests/wpt/web-platform-tests/tools/tox.ini index 732dab8bc5c..cd9774570e0 100644 --- a/tests/wpt/web-platform-tests/tools/tox.ini +++ b/tests/wpt/web-platform-tests/tools/tox.ini @@ -40,10 +40,8 @@ select = E,W,F,N # E901: SyntaxError or IndentationError # W601: .has_key() is deprecated, use ‘in’ # F401: module imported but unused -# F403: ‘from module import *’ used; unable to detect undefined names -# F405: name may be undefined, or defined from star imports: module # N801: class names should use CapWords convention # N802: function name should be lowercase -ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,F403,F405,N801,N802 +ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,N801,N802 max-line-length = 141 exclude = .tox,html5lib,third_party/py,third_party/pytest,third_party/funcsigs,third_party/attrs,third_party/pluggy/,pywebsocket,six,_venv,webencodings,wptserve/docs,wptserve/tests/functional/docroot/,wpt,wptrunner diff --git a/tests/wpt/web-platform-tests/tools/wpt/tox.ini b/tests/wpt/web-platform-tests/tools/wpt/tox.ini index 6426f6fb55b..86a025fe792 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/tox.ini +++ b/tests/wpt/web-platform-tests/tools/wpt/tox.ini @@ -43,9 +43,7 @@ select = E,W,F,N # E901: SyntaxError or IndentationError # W601: .has_key() is deprecated, use ‘in’ # F401: module imported but unused -# F403: ‘from module import *’ used; unable to detect undefined names -# F405: name may be undefined, or defined from star imports: module # N801: class names should use CapWords convention # N802: function name should be lowercase -ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,F403,F405,N801,N802 +ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,N801,N802 max-line-length = 141 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/tox.ini b/tests/wpt/web-platform-tests/tools/wptrunner/tox.ini index a9761e80d8b..f939b3299cf 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/tox.ini +++ b/tests/wpt/web-platform-tests/tools/wptrunner/tox.ini @@ -53,9 +53,7 @@ select = E,W,F,N # E901: SyntaxError or IndentationError # W601: .has_key() is deprecated, use ‘in’ # F401: module imported but unused -# F403: ‘from module import *’ used; unable to detect undefined names -# F405: name may be undefined, or defined from star imports: module # N801: class names should use CapWords convention # N802: function name should be lowercase -ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,F403,F405,N801,N802 +ignore = E128,E129,E221,E226,E231,E251,E265,E302,E303,E305,E402,E731,E901,W601,F401,N801,N802 max-line-length = 141 diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py index 985b1fe57ed..89179a0bc17 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome_android.py @@ -1,6 +1,5 @@ import subprocess -from ..config import * from .base import Browser, ExecutorBrowser, require_arg from ..webdriver_server import ChromeDriverServer from ..executors import executor_kwargs as base_executor_kwargs diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge.py index b0ec6c149fc..db39a9ab0a6 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/edge.py @@ -43,7 +43,7 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data, executor_kwargs["timeout_multiplier"] = get_timeout_multiplier(test_type, run_info_data, **kwargs) - executor_kwargs["capabilities"] = dict(DesiredCapabilities.EDGE.items()) + executor_kwargs["capabilities"] = {} return executor_kwargs def env_extras(**kwargs): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/parser.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/parser.py index d84a9143fa6..1fa1bc10cc8 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/parser.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/parser.py @@ -17,7 +17,10 @@ from __future__ import unicode_literals import types from cStringIO import StringIO -from node import * +from node import (AtomNode, BinaryExpressionNode, BinaryOperatorNode, + ConditionalNode, DataNode, IndexNode, KeyValueNode, ListNode, + NumberNode, StringNode, UnaryExpressionNode, + UnaryOperatorNode, ValueNode, VariableNode) class ParseError(Exception): diff --git a/tests/wpt/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.htm b/tests/wpt/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.htm new file mode 100644 index 00000000000..dcf58d92497 --- /dev/null +++ b/tests/wpt/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.htm @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<title> WorkerGlobalScope API: requestAnimationFrame()</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id=log></div> +<script id="worker" type="text/worker"> +const res = []; +requestAnimationFrame((dt) => { + res.push(dt); + requestAnimationFrame((dt) => { + res.push(dt); + requestAnimationFrame((dt) => { + res.push(dt); + postMessage(res); + }); + }); +}); +</script> +<script> +async_test(function(t) { + var blob = new Blob([document.getElementById('worker').textContent]); + var worker = new Worker(URL.createObjectURL(blob)); + worker.addEventListener("message", (ev) => { + const ret = ev.data; + assert_equals(ret.length, 3); + assert_true(ret[0] < ret[1]); + assert_true(ret[1] < ret[2]); + t.done(); + }); +}); +</script> diff --git a/tests/wpt/web-platform-tests/xhr/sync-no-timeout.any.js b/tests/wpt/web-platform-tests/xhr/sync-no-timeout.any.js new file mode 100644 index 00000000000..d23fbb8c66d --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/sync-no-timeout.any.js @@ -0,0 +1,16 @@ +// META: global=sharedworker +// META: timeout=long + +// This is a regression test for https://crbug.com/844268, when a timeout of 10 +// seconds was applied to XHR in Chrome. There should be no timeout unless the +// "timeout" parameter is set on the object. +test(t => { + let xhr = new XMLHttpRequest(); + + // For practical reasons, we can't wait forever. 12 seconds is long enough to + // reliably reproduce the bug in Chrome. + xhr.open('GET', 'resources/trickle.py?ms=1000&count=12', false); + + // The test will fail if this throws. + xhr.send(); +}, 'Sync XHR should not have a timeout'); |