diff options
66 files changed, 697 insertions, 266 deletions
diff --git a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini index 3a3d15b8406..3b874fc1748 100644 --- a/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-with-fetch.any.js.ini @@ -14,9 +14,6 @@ [Revoke blob URL after creating Request, will fetch] expected: FAIL - [Revoke blob URL after calling fetch, fetch should succeed] - expected: FAIL - [url-with-fetch.any.html] [Untitled] diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 19ff60052d7..42a7cf5df6e 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -104643,6 +104643,30 @@ {} ] ], + "css/css-animations/animation-opacity-pause-and-set-time.html": [ + [ + "css/css-animations/animation-opacity-pause-and-set-time.html", + [ + [ + "/css/css-animations/animation-opacity-pause-and-set-time-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-animations/animation-transform-pause-and-set-time.html": [ + [ + "css/css-animations/animation-transform-pause-and-set-time.html", + [ + [ + "/css/css-animations/animation-transform-pause-and-set-time-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-backgrounds/background-334.html": [ [ "css/css-backgrounds/background-334.html", @@ -256557,6 +256581,16 @@ {} ] ], + "css/css-animations/animation-opacity-pause-and-set-time-ref.html": [ + [ + {} + ] + ], + "css/css-animations/animation-transform-pause-and-set-time-ref.html": [ + [ + {} + ] + ], "css/css-animations/animationevent-interface.js": [ [ {} @@ -359868,9 +359902,9 @@ {} ] ], - "css/css-tables/border-spacing-included-in-sizes-001.tentative.html": [ + "css/css-tables/border-spacing-included-in-sizes-001.html": [ [ - "css/css-tables/border-spacing-included-in-sizes-001.tentative.html", + "css/css-tables/border-spacing-included-in-sizes-001.html", {} ] ], @@ -365740,6 +365774,12 @@ {} ] ], + "css/cssom-view/offsetTopLeftEmptyInline.html": [ + [ + "css/cssom-view/offsetTopLeftEmptyInline.html", + {} + ] + ], "css/cssom-view/offsetTopLeftInScrollableParent.html": [ [ "css/cssom-view/offsetTopLeftInScrollableParent.html", @@ -429606,6 +429646,12 @@ {} ] ], + "shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html": [ + [ + "shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html", + {} + ] + ], "shadow-dom/event-composed-path-after-dom-mutation.html": [ [ "shadow-dom/event-composed-path-after-dom-mutation.html", @@ -569515,6 +569561,14 @@ "b1d2258f4d79d33e8eedf1d8e5f7c7661c44b1f0", "manual" ], + "css/css-animations/animation-opacity-pause-and-set-time-ref.html": [ + "ab9f614ed8e7e846b9c5f3c5d66a0827db4d6637", + "support" + ], + "css/css-animations/animation-opacity-pause-and-set-time.html": [ + "c63c2f3b9fe3fd0b2e4a727398f1843febf339eb", + "reftest" + ], "css/css-animations/animation-play-state-001-manual.html": [ "779f2fe3102c0a8618b9ef9e078ad8bdc061eb16", "manual" @@ -569591,6 +569645,14 @@ "24ffa39e93b3c54e9343af187ce59a630ec224dd", "manual" ], + "css/css-animations/animation-transform-pause-and-set-time-ref.html": [ + "3cadfd851841deca1b3c9ec5030e34d7e4783ec0", + "support" + ], + "css/css-animations/animation-transform-pause-and-set-time.html": [ + "e8a9bd9706bde58182bcbdd4c10839f320d90708", + "reftest" + ], "css/css-animations/animationevent-interface.html": [ "5b1bc4265f0f06b9b564d66ecc76fd6a11b6fef2", "testharness" @@ -601931,8 +601993,8 @@ "7248befef57932b2d849630637051e02b480a361", "reftest" ], - "css/css-tables/border-spacing-included-in-sizes-001.tentative.html": [ - "b65e29ed27cc72b2662e919d198790cc84a6bc5e", + "css/css-tables/border-spacing-included-in-sizes-001.html": [ + "3f0802305fed5be27d92dc2d65dc273fc852ab85", "testharness" ], "css/css-tables/bounding-box-computation-1.html": [ @@ -626507,6 +626569,10 @@ "c88b616986511b3220449c03421e827be0d2e534", "testharness" ], + "css/cssom-view/offsetTopLeftEmptyInline.html": [ + "85abbb7c01cc95f46aeffb166fc8cd34669c85aa", + "testharness" + ], "css/cssom-view/offsetTopLeftInScrollableParent.html": [ "8f4433795424a00a896278173747aa9e192e181d", "testharness" @@ -663364,7 +663430,7 @@ "support" ], "html/semantics/forms/the-label-element/label-attributes.sub.html": [ - "8149a87cb750da29abfeaa5ee1314c8bdb3ee308", + "3c8591c7eef0aa00ec507ff7dd1a937aeb9878ea", "testharness" ], "html/semantics/forms/the-label-element/labelable-elements.html": [ @@ -670028,7 +670094,7 @@ "support" ], "interfaces/webxr.idl": [ - "4c74fdac384299ed22a9b9244411c3755a8741db", + "edd7e73fd6f00a6bdbac7869b392db42993b1ea2", "support" ], "interfaces/worklets.idl": [ @@ -693068,7 +693134,7 @@ "testharness" ], "resource-timing/buffer-full-add-after-full-event.html": [ - "73ad841e92fddff1e05395241d69a0079e7a84da", + "969446582e0c4de315318ceabb69480bbaf59779", "testharness" ], "resource-timing/buffer-full-add-entries-during-callback-that-drop.html": [ @@ -693300,7 +693366,7 @@ "support" ], "resource-timing/resources/buffer-full-utilities.js": [ - "b143da7b325f0ad24a2f9ad67db7ba31d0aa912c", + "e0a4f0b108094658be0aef453bf826bf01c28f93", "support" ], "resource-timing/resources/cors-ahem.py": [ @@ -698799,6 +698865,10 @@ "a7b97e8026743028c3132534aeec25a431025190", "testharness" ], + "shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html": [ + "bcb4ee62e0c61c488791f5ac045908eacad79596", + "testharness" + ], "shadow-dom/directionality-001-ref.html": [ "7a2eaeb8681e860a52e5bf1268665fb896e4a950", "support" @@ -698904,7 +698974,7 @@ "support" ], "shadow-dom/resources/shadow-dom.js": [ - "192ad45413035ae629ba8158a5ceaca171af11fa", + "81b9a3d4fae226ed460583cb94a2443c807e3ce0", "support" ], "shadow-dom/scroll-to-the-fragment-in-shadow-tree.html": [ @@ -704440,7 +704510,7 @@ "support" ], "tools/ci/jobs.py": [ - "ddf110096440f5c798ffdf46ffb51e90b1365978", + "31b39635a264875e04a558bb9489a3ecec549c23", "support" ], "tools/ci/make_hosts_file.py": [ @@ -704464,11 +704534,11 @@ "support" ], "tools/ci/tests/test_jobs.py": [ - "363401a01b7adfe0564b9be3f6a6611dd3d74f11", + "a10e48d2f23a41b7b6762f507c3a01b9bc6a0bca", "support" ], "tools/ci/tests/test_run_tc.py": [ - "436dc79670e07681b84f85495aeb28f171bab3c8", + "a72dcfe5cfdd516528312488c0d731557fb85492", "support" ], "tools/conftest.py": [ @@ -704524,7 +704594,7 @@ "support" ], "tools/lint/lint.py": [ - "b07dbcbeb9293d7a22e83880672411ac445f0ba6", + "ccadcdc16c72a9790c7de697c6f7762f0cbe06f1", "support" ], "tools/lint/tests/__init__.py": [ @@ -704708,11 +704778,11 @@ "support" ], "tools/manifest/manifest.py": [ - "8634b7089869fbbf9adb604909ebae09efdf36b3", + "dc38d3819883ce049af8447b8e1f87d308b48e23", "support" ], "tools/manifest/sourcefile.py": [ - "97fe89bbda89980d3e0e1ce620ccbe9e46c15275", + "56b938d64ba939e4bf0bc98b6dfe1228aa54cae6", "support" ], "tools/manifest/tests/__init__.py": [ @@ -704728,7 +704798,7 @@ "support" ], "tools/manifest/tests/test_manifest.py": [ - "22335564b7c8a1e7a01b70332a704c01947e0796", + "25944d5aca8e86ae1cd8bdc55dec8153ecfde85c", "support" ], "tools/manifest/tests/test_sourcefile.py": [ @@ -704824,7 +704894,7 @@ "support" ], "tools/pywebsocket/example/echo_client.py": [ - "7395f51a77100bc0c9a708fc540da671c2c6de03", + "f4dbb83bfcc3ba614419f715d73d050a1f3309a8", "support" ], "tools/pywebsocket/example/echo_noext_wsh.py": [ @@ -704984,7 +705054,7 @@ "support" ], "tools/pywebsocket/mod_pywebsocket/standalone.py": [ - "84b2470c8f973ad4c41ba18164a4cbc77a71c766", + "2c8786064889e84f115a75679ab71c74466a0c62", "support" ], "tools/pywebsocket/mod_pywebsocket/stream.py": [ @@ -705024,7 +705094,7 @@ "support" ], "tools/pywebsocket/test/client_for_testing.py": [ - "c7f805ee94e549469ed870dae7e0ccf2026beab7", + "fb5a6cb21068b852b28bd6351e8f3f91d354b1c5", "support" ], "tools/pywebsocket/test/endtoend_with_external_server.py": [ @@ -705184,7 +705254,7 @@ "support" ], "tools/runner/report.py": [ - "952df08b805989c8408ec0e5e90c0652c734a561", + "5eb8d67c7f6da9c5fd01de8de40f5cc92c11be90", "support" ], "tools/runner/runner.css": [ @@ -705232,7 +705302,7 @@ "support" ], "tools/serve/serve.py": [ - "53f81457be1948936b1e4f161b7d2b1c221ab759", + "e0c947a512b9e6cf62d7ab70e00f40e6a943f662", "support" ], "tools/serve/test_functional.py": [ @@ -709196,7 +709266,7 @@ "support" ], "tools/wpt/browser.py": [ - "52157bca4e71a545977444e4277bd4bb7b9ffb9a", + "d77b5f01dfae2b50ec3ab6ca5dedccfbd3b1d531", "support" ], "tools/wpt/commands.json": [ @@ -709224,11 +709294,11 @@ "support" ], "tools/wpt/run.py": [ - "ffdd8efa946310cb6fa1c3fe61b33546919b2176", + "c54d5aaba01c66095760541be766e8e673a02a47", "support" ], "tools/wpt/testfiles.py": [ - "006e4a22d0bbc0bb2dab5a7bd237377cd77bf370", + "7f0f221a1f6be5eb3959184a86e7fe7958554dc6", "support" ], "tools/wpt/tests/latest_mozilla_central.txt": [ @@ -709244,7 +709314,7 @@ "support" ], "tools/wpt/tests/test_wpt.py": [ - "75cedf75ee016d975e2896268571f8217e8e1859", + "49d2b8758f70aafc3e6eea657389262f0be6534d", "support" ], "tools/wpt/tox.ini": [ @@ -709588,7 +709658,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/executormarionette.py": [ - "f9fd97b6ba8b88907db2115157407d153b443a82", + "0b0068f8c5bc9716e1988bc3cb7ea103459699ac", "support" ], "tools/wptrunner/wptrunner/executors/executoropera.py": [ @@ -709600,7 +709670,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/executorselenium.py": [ - "0d97f0f2d93c630fe3a578d1932b48d925838c20", + "e7b9f45dc81d5f11f58beeefff9d9f76d6bc1047", "support" ], "tools/wptrunner/wptrunner/executors/executorservo.py": [ @@ -709612,7 +709682,7 @@ "support" ], "tools/wptrunner/wptrunner/executors/executorwebdriver.py": [ - "e449390116b06fb11208dc9fb078f6c1e37c4f8c", + "65938a7678b1aefc003faa05521dfde3a0edaaa1", "support" ], "tools/wptrunner/wptrunner/executors/executorwebkit.py": [ @@ -709688,7 +709758,7 @@ "support" ], "tools/wptrunner/wptrunner/manifestexpected.py": [ - "b6ef63dbb367dc1510e2e056150067439fd725aa", + "7a93fe41ec7a81e223c51fb6a0f57ac890b51f7a", "support" ], "tools/wptrunner/wptrunner/manifestinclude.py": [ @@ -709696,11 +709766,11 @@ "support" ], "tools/wptrunner/wptrunner/manifestupdate.py": [ - "452c583d32737f8c85e6fc8784744223350cdacb", + "2b0288668cc1c86c5bed2b3e0e4a49dd3294b6c6", "support" ], "tools/wptrunner/wptrunner/metadata.py": [ - "253ab8ed994a0324457e17da5f5d5da105f69c95", + "1a4ce40f86c1fe6c6fdec880471a4d8a0ed944c4", "support" ], "tools/wptrunner/wptrunner/products.py": [ @@ -709736,7 +709806,7 @@ "support" ], "tools/wptrunner/wptrunner/testloader.py": [ - "7b9bbf323703512cec532802f0346dcc0a7f2f13", + "bd08a9cd5cf40db1a5c542aabff747c6ada71f7b", "support" ], "tools/wptrunner/wptrunner/testrunner.py": [ @@ -709784,7 +709854,7 @@ "support" ], "tools/wptrunner/wptrunner/tests/test_wpttest.py": [ - "2b96ee74e76bfa3187d5997f32326ac5388475a4", + "7ca23ba22caf0cef008d0d0dc394eff22b6c32b0", "support" ], "tools/wptrunner/wptrunner/update/__init__.py": [ @@ -709852,11 +709922,11 @@ "support" ], "tools/wptrunner/wptrunner/wptmanifest/parser.py": [ - "b16d96a42d4a5038b80a8807b3eb19fbfe17815e", + "a8e2bd6db2f36f3034d5beecd40f23f03f6c8a06", "support" ], "tools/wptrunner/wptrunner/wptmanifest/serializer.py": [ - "e4749128bf96d64dc17f7c8c0d727b79813ea496", + "d24becbec6d0d9ef78d30d9f43614638f7911d07", "support" ], "tools/wptrunner/wptrunner/wptmanifest/tests/__init__.py": [ @@ -709864,7 +709934,7 @@ "support" ], "tools/wptrunner/wptrunner/wptmanifest/tests/test_conditional.py": [ - "10b6319143230e3ffd8a1e976f804f3047771baf", + "fbc75ec8390fa34ab7e3caa391c3e6e7837a554d", "support" ], "tools/wptrunner/wptrunner/wptmanifest/tests/test_parser.py": [ @@ -709872,15 +709942,15 @@ "support" ], "tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py": [ - "f906afa34a36e5650e4c56d5b87982ca702520d9", + "14c2ef2e2281e6c784568cbc1689bc1899248916", "support" ], "tools/wptrunner/wptrunner/wptmanifest/tests/test_static.py": [ - "e0e83c83e80df2aa67fa75ac8681fa0d352d0332", + "aaf8465915246aac58a068dcfc0697b8c9af4181", "support" ], "tools/wptrunner/wptrunner/wptmanifest/tests/test_tokenizer.py": [ - "40a8acc6cabddd39b7c2d6711a53eb2dda1bd560", + "66b5805542b3abe60085dc7fe0481a1b2f8cb2f5", "support" ], "tools/wptrunner/wptrunner/wptrunner.py": [ @@ -709888,7 +709958,7 @@ "support" ], "tools/wptrunner/wptrunner/wpttest.py": [ - "c2279eaaa2460b21b552f594797e41e7ffc7fd3f", + "0a17fd486123f8eb3be3becff9318c23d675c5e1", "support" ], "tools/wptserve/.gitignore": [ @@ -709964,7 +710034,7 @@ "support" ], "tools/wptserve/tests/functional/base.py": [ - "c114e5e905cb8da98f0c5e6e8811e57af40abf3e", + "0aeceb615896815d05ee2971341efc204ccf319c", "support" ], "tools/wptserve/tests/functional/docroot/bar.any.worker.js": [ @@ -710192,11 +710262,11 @@ "support" ], "tools/wptserve/wptserve/response.py": [ - "efc65ef180133a95dd606fd9a32742faf9cae52f", + "6a2410396bee8040a42551be87312be37acb6c9b", "support" ], "tools/wptserve/wptserve/router.py": [ - "5118c03b728313f703f6e9002c4003fc0d6e1d98", + "5b860b5942548bc5aab81ce63dbbdadda792de90", "support" ], "tools/wptserve/wptserve/routes.py": [ @@ -714008,7 +714078,7 @@ "testharness" ], "webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html": [ - "d5bcbfe990cacbb09c3dc22334cd0620e66b9ced", + "89d361d22f35ffc6e7fbff6abdfc60c57a1d8ebb", "testharness" ], "webaudio/the-audio-api/the-audioworklet-interface/audioworkletglobalscope-sample-rate.https.html": [ @@ -714136,7 +714206,7 @@ "testharness" ], "webaudio/the-audio-api/the-biquadfilternode-interface/biquad-lowpass.html": [ - "69dc85a2e2be61da92d8d48f34472e3da8d35fb1", + "d20786e36b16d7ba36841dd5fcfb30c081113fb2", "testharness" ], "webaudio/the-audio-api/the-biquadfilternode-interface/biquad-lowshelf.html": [ @@ -716404,7 +716474,7 @@ "testharness" ], "webrtc/RTCPeerConnection-transceivers.https.html": [ - "73668e7be6ed8d98630d857657fcace9072b9aee", + "110638cd74e8d91065fb7ef3a28ce1a8051c6370", "testharness" ], "webrtc/RTCPeerConnectionIceEvent-constructor.html": [ @@ -721008,7 +721078,7 @@ "support" ], "webxr/resources/webxr_test_constants.js": [ - "aab0417aed0b08e930347ff666cd672d271b8e00", + "c38c012ba8462589c33fcdecab49299125c85ec5", "support" ], "webxr/resources/webxr_util.js": [ diff --git a/tests/wpt/metadata/css/css-animations/animation-opacity-pause-and-set-time.html.ini b/tests/wpt/metadata/css/css-animations/animation-opacity-pause-and-set-time.html.ini new file mode 100644 index 00000000000..108602c6278 --- /dev/null +++ b/tests/wpt/metadata/css/css-animations/animation-opacity-pause-and-set-time.html.ini @@ -0,0 +1,2 @@ +[animation-opacity-pause-and-set-time.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-animations/animation-transform-pause-and-set-time.html.ini b/tests/wpt/metadata/css/css-animations/animation-transform-pause-and-set-time.html.ini new file mode 100644 index 00000000000..20eb5078b50 --- /dev/null +++ b/tests/wpt/metadata/css/css-animations/animation-transform-pause-and-set-time.html.ini @@ -0,0 +1,2 @@ +[animation-transform-pause-and-set-time.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini b/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini index 7f5a43ceb95..7117872b917 100644 --- a/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini +++ b/tests/wpt/metadata/css/css-fonts/variations/at-font-face-font-matching.html.ini @@ -113,9 +113,6 @@ [Matching font-style: 'oblique 20deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'] expected: FAIL - [Matching font-style: 'oblique 20deg' should prefer 'oblique 0deg' over 'oblique -50deg -20deg'] - expected: FAIL - [Matching font-style: 'oblique 21deg' should prefer 'oblique 30deg 60deg' over 'oblique 40deg 50deg'] expected: FAIL @@ -200,9 +197,6 @@ [Matching font-weight: '500' should prefer '500' over '450 460'] expected: FAIL - [Matching font-style: 'italic' should prefer 'oblique 0deg' over 'oblique -60deg -30deg'] - expected: FAIL - [Matching font-style: 'oblique 20deg' should prefer 'italic' over 'oblique 0deg'] expected: FAIL @@ -275,9 +269,6 @@ [Matching font-style: 'oblique 21deg' should prefer 'oblique 0deg' over 'oblique -50deg -20deg'] expected: FAIL - [Matching font-style: 'oblique -10deg' should prefer 'oblique -1deg 0deg' over 'oblique -20deg -15deg'] - expected: FAIL - [Matching font-style: 'oblique 0deg' should prefer 'italic' over 'oblique -50deg -20deg'] expected: FAIL @@ -299,9 +290,6 @@ [Matching font-stretch: '90%' should prefer '90% 100%' over '50% 80%'] expected: FAIL - [Matching font-weight: '400' should prefer '400' over '450 460'] - expected: FAIL - [Matching font-weight: '400' should prefer '450 460' over '500'] expected: FAIL diff --git a/tests/wpt/metadata/css/cssom-view/offsetTopLeftEmptyInline.html.ini b/tests/wpt/metadata/css/cssom-view/offsetTopLeftEmptyInline.html.ini new file mode 100644 index 00000000000..d595d85d218 --- /dev/null +++ b/tests/wpt/metadata/css/cssom-view/offsetTopLeftEmptyInline.html.ini @@ -0,0 +1,19 @@ +[offsetTopLeftEmptyInline.html] + [offsetTop/Left of empty inline elements should work as if they were not empty: 2] + expected: FAIL + + [offsetTop/Left of empty inline elements should work as if they were not empty: 3] + expected: FAIL + + [offsetTop/Left of empty inline elements should work as if they were not empty: 0] + expected: FAIL + + [offsetTop/Left of empty inline elements should work as if they were not empty: 1] + expected: FAIL + + [offsetTop/Left of empty inline elements should work as if they were not empty: 4] + expected: FAIL + + [offsetTop/Left of empty inline elements should work as if they were not empty: 5] + expected: FAIL + diff --git a/tests/wpt/metadata/encoding/single-byte-decoder.html.ini b/tests/wpt/metadata/encoding/single-byte-decoder.html.ini index 0a7d7b1f930..0bf8ce261c1 100644 --- a/tests/wpt/metadata/encoding/single-byte-decoder.html.ini +++ b/tests/wpt/metadata/encoding/single-byte-decoder.html.ini @@ -32,7 +32,7 @@ [single-byte-decoder.html?XMLHttpRequest] - expected: TIMEOUT + expected: CRASH [ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)] expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-string.tentative.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-string.tentative.html.ini new file mode 100644 index 00000000000..9bacb9f5c4e --- /dev/null +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-string.tentative.html.ini @@ -0,0 +1,4 @@ +[javascript-url-abort-return-value-string.tentative.html] + [Aborting fetch for javascript:string navigation] + expected: FAIL + 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 deleted file mode 100644 index 78879bad5f1..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[javascript-url-abort-return-value-undefined.tentative.html] - expected: TIMEOUT - [Not aborting fetch for javascript:undefined navigation] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini new file mode 100644 index 00000000000..385376c7321 --- /dev/null +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini @@ -0,0 +1,4 @@ +[traverse_the_history_4.html] + [Multiple history traversals, last would be aborted] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html.ini new file mode 100644 index 00000000000..178680e5d14 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html.ini @@ -0,0 +1,2 @@ +[script-onerror-insertion-point-2.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html.ini b/tests/wpt/metadata/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html.ini index 6c08b446ac6..b6e408b9b86 100644 --- a/tests/wpt/metadata/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html.ini +++ b/tests/wpt/metadata/offscreen-canvas/the-offscreen-canvas/offscreencanvas.commit.w.html.ini @@ -1,4 +1,5 @@ [offscreencanvas.commit.w.html] + expected: ERROR [Test that calling OffscreenCanvas's commit pushes its contents to its placeholder.] expected: FAIL diff --git a/tests/wpt/metadata/referrer-policy/css-integration/svg/processing-instruction.html.ini b/tests/wpt/metadata/referrer-policy/css-integration/svg/processing-instruction.html.ini index 0a95e8057cc..0884c846962 100644 --- a/tests/wpt/metadata/referrer-policy/css-integration/svg/processing-instruction.html.ini +++ b/tests/wpt/metadata/referrer-policy/css-integration/svg/processing-instruction.html.ini @@ -1,4 +1,5 @@ [processing-instruction.html] + expected: TIMEOUT [Styling SVG from ProcessingInstruction stroke] expected: FAIL @@ -6,10 +7,10 @@ expected: FAIL [Styling SVG from ProcessingInstruction mask-image] - expected: FAIL + expected: NOTRUN [Styling SVG from ProcessingInstruction marker-end] - expected: FAIL + expected: TIMEOUT [Styling SVG from ProcessingInstruction marker-mid] expected: FAIL @@ -24,5 +25,5 @@ expected: FAIL [Styling SVG from ProcessingInstruction mask] - expected: FAIL + expected: NOTRUN diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini index a56bad443a2..66bd350083b 100644 --- a/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini @@ -1,5 +1,4 @@ [realtimeanalyser-fft-scaling.html] - expected: TIMEOUT [X 2048-point FFT peak position is not equal to 64. Got 0.] expected: FAIL diff --git a/tests/wpt/mozilla/meta/css/transition_calc_implicit.html.ini b/tests/wpt/mozilla/meta/css/transition_calc_implicit.html.ini new file mode 100644 index 00000000000..dbea4f293ad --- /dev/null +++ b/tests/wpt/mozilla/meta/css/transition_calc_implicit.html.ini @@ -0,0 +1,2 @@ +[transition_calc_implicit.html] + expected: TIMEOUT diff --git a/tests/wpt/web-platform-tests/css/css-animations/animation-opacity-pause-and-set-time-ref.html b/tests/wpt/web-platform-tests/css/css-animations/animation-opacity-pause-and-set-time-ref.html new file mode 100644 index 00000000000..ab9f614ed8e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-animations/animation-opacity-pause-and-set-time-ref.html @@ -0,0 +1,17 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> +<style> +#target { + width: 50px; + height: 50px; + background-color: green; + opacity: 0.4; +} +</style> +<body> + <div id="target"></div> +</body> +</html> + diff --git a/tests/wpt/web-platform-tests/css/css-animations/animation-opacity-pause-and-set-time.html b/tests/wpt/web-platform-tests/css/css-animations/animation-opacity-pause-and-set-time.html new file mode 100644 index 00000000000..c63c2f3b9fe --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-animations/animation-opacity-pause-and-set-time.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>CSS Animations Test: pauses a opacity animation and sets the current time</title> +<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-name"> +<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-duration"> +<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-timing-function"> +<link rel="match" href="animation-opacity-pause-and-set-time-ref.html"> +<style> +#target { + width: 50px; + height: 50px; + background-color: green; +} +</style> +<body> + <div id="target"></div> +</body> +<script> +window.onload = () => { + requestAnimationFrame(() => { + let animation = document.getElementById("target").animate([ + {opacity: '0.8'}, + {opacity: '0.0'} + ], 1000); + requestAnimationFrame(() => { + animation.pause(); + animation.currentTime = 500; + document.documentElement.removeAttribute('class'); + }); + }); +}; +</script> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-animations/animation-transform-pause-and-set-time-ref.html b/tests/wpt/web-platform-tests/css/css-animations/animation-transform-pause-and-set-time-ref.html new file mode 100644 index 00000000000..3cadfd85184 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-animations/animation-transform-pause-and-set-time-ref.html @@ -0,0 +1,17 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> +<style> +#target { + width: 50px; + height: 50px; + background-color: green; + transform: translate(500px); +} +</style> +<body> + <div id="target"></div> +</body> +</html> + diff --git a/tests/wpt/web-platform-tests/css/css-animations/animation-transform-pause-and-set-time.html b/tests/wpt/web-platform-tests/css/css-animations/animation-transform-pause-and-set-time.html new file mode 100644 index 00000000000..e8a9bd9706b --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-animations/animation-transform-pause-and-set-time.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<meta charset="utf-8"> +<title>CSS Animations Test: pauses a transform animation and sets the current time</title> +<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-name"> +<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-duration"> +<link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-timing-function"> +<link rel="match" href="animation-transform-pause-and-set-time-ref.html"> +<style> +#target { + width: 50px; + height: 50px; + background-color: green; +} +</style> +<body> + <div id="target"></div> +</body> +<script> +window.onload = () => { + requestAnimationFrame(() => { + let animation = document.getElementById("target").animate([ + {transform: 'translateX(0px)'}, + {transform: 'translateX(1000px)'} + ], 1000); + requestAnimationFrame(() => { + animation.pause(); + animation.currentTime = 500; + document.documentElement.removeAttribute('class'); + }); + }); +}; +</script> +</html> diff --git a/tests/wpt/web-platform-tests/css/css-tables/border-spacing-included-in-sizes-001.tentative.html b/tests/wpt/web-platform-tests/css/css-tables/border-spacing-included-in-sizes-001.html index b65e29ed27c..3f0802305fe 100644 --- a/tests/wpt/web-platform-tests/css/css-tables/border-spacing-included-in-sizes-001.tentative.html +++ b/tests/wpt/web-platform-tests/css/css-tables/border-spacing-included-in-sizes-001.html @@ -4,6 +4,8 @@ <script src='/resources/check-layout-th.js'></script> <link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org"> <link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetheight"> +<link rel="help" href="https://www.w3.org/TR/css-tables-3/#bounding-box-assignment"> +<link rel="bookmark" href="https://crbug.com/613753" /> <meta name="flags" content="" /> <meta name="assert" content="border-spacing occurring outside rows and sections is not included in their height and width" /> diff --git a/tests/wpt/web-platform-tests/css/cssom-view/offsetTopLeftEmptyInline.html b/tests/wpt/web-platform-tests/css/cssom-view/offsetTopLeftEmptyInline.html new file mode 100644 index 00000000000..85abbb7c01c --- /dev/null +++ b/tests/wpt/web-platform-tests/css/cssom-view/offsetTopLeftEmptyInline.html @@ -0,0 +1,47 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#extensions-to-the-htmlelement-interface"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<style> + .container { + position: relative; + width: 8em; + height: 7em; + padding: 1em; + } +</style> +<div class="container" style="writing-mode:horizontal-tb;"> + offset + <br>offset<span class="target"></span><span>ref</span> +</div> +<div class="container" style="writing-mode:vertical-lr;"> + offset + <br>offset<span class="target"></span><span>ref</span> +</div> +<div class="container" style="writing-mode:vertical-rl;"> + offset + <br>offset<span class="target"></span><span>ref</span> +</div> +<div class="container" style="writing-mode:horizontal-tb; direction:rtl;"> + offset + <br>offset<span class="target"></span><span>ref</span> +</div> +<div class="container" style="writing-mode:vertical-lr; direction:rtl;"> + offset + <br>offset<span class="target"></span><span>ref</span> +</div> +<div class="container" style="writing-mode:vertical-rl; direction:rtl;"> + offset + <br>offset<span class="target"></span><span>ref</span> +</div> +<script> +var i = 0; +document.querySelectorAll('span.target').forEach((target) => { + var ref = target.nextSibling; + test(() => { + assert_equals(target.offsetLeft, ref.offsetLeft, 'offsetLeft'); + assert_equals(target.offsetTop, ref.offsetTop, 'offsetTop'); + }, 'offsetTop/Left of empty inline elements should work as if they were not empty: ' + i); + i++; +}); +</script> diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-label-element/label-attributes.sub.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-label-element/label-attributes.sub.html index 8149a87cb75..3c8591c7eef 100644 --- a/tests/wpt/web-platform-tests/html/semantics/forms/the-label-element/label-attributes.sub.html +++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-label-element/label-attributes.sub.html @@ -271,16 +271,7 @@ }, "A labelable element not in a document can label element in the same tree."); test(function () { - var isShadowDOMV0; - if ("createShadowRoot" in document.getElementById('content')) { - isShadowDOMV0 = true; - } - var root1; - if (isShadowDOMV0) { - root1 = document.getElementById('content').createShadowRoot(); - } else { - root1 = document.getElementById('content').attachShadow({mode: 'open'}); - } + var root1 = document.getElementById('content').attachShadow({mode: 'open'}); assert_true(root1 instanceof DocumentFragment, "ShadowRoot should be an instance of DocumentFragment."); // <label><input id="shadow1"/></label><div id="div1"></div> @@ -293,12 +284,7 @@ var div1 = document.createElement('div'); label1.appendChild(div1); // <label for="shadow2"></label><input id="shadow2"/> - var root2; - if (isShadowDOMV0) { - root2 = div1.createShadowRoot(); - } else { - root2 = div1.attachShadow({mode: 'open'}); - } + var root2 = div1.attachShadow({mode: 'open'}); assert_true(root2 instanceof DocumentFragment, "ShadowRoot should be an instance of DocumentFragment."); diff --git a/tests/wpt/web-platform-tests/interfaces/webxr.idl b/tests/wpt/web-platform-tests/interfaces/webxr.idl index 4c74fdac384..edd7e73fd6f 100644 --- a/tests/wpt/web-platform-tests/interfaces/webxr.idl +++ b/tests/wpt/web-platform-tests/interfaces/webxr.idl @@ -149,7 +149,7 @@ interface XRRigidTransform { readonly attribute DOMPointReadOnly position; readonly attribute DOMPointReadOnly orientation; readonly attribute Float32Array matrix; - readonly attribute XRRigidTransform inverse; + [SameObject] readonly attribute XRRigidTransform inverse; }; [SecureContext, Exposed=Window, diff --git a/tests/wpt/web-platform-tests/resource-timing/buffer-full-add-after-full-event.html b/tests/wpt/web-platform-tests/resource-timing/buffer-full-add-after-full-event.html index 73ad841e92f..969446582e0 100644 --- a/tests/wpt/web-platform-tests/resource-timing/buffer-full-add-after-full-event.html +++ b/tests/wpt/web-platform-tests/resource-timing/buffer-full-add-after-full-event.html @@ -53,15 +53,21 @@ let clearAndAddAnotherEntryToBuffer = () => { }; let testThatEntryWasAdded = () => { - return new Promise((resolve, reject) => { - let waitForIt = function() { - if (performance.getEntriesByType("resource").length) { - resolve(); + let tries = 1; + let maxTries = 5; + return waitUntilConditionIsMet( function() { + if (performance.getEntriesByType("resource").length) { + return true; + } else { + if (tries < maxTries) { + tries++; + return false; } else { - reject("After buffer full, entry never added to primary"); + return true; } } - step_timeout(waitForIt, 0); + }).then( () => { + assert_true((performance.getEntriesByType("resource").length) === 1); }); }; @@ -74,7 +80,6 @@ promise_test(async () => { await clearAndAddAnotherEntryToBuffer(); // Since we have no strict guarantees when an entry will be added to the // buffer, waiting till next task to try to avoid flakiness. - await waitForNextTask(); await testThatEntryWasAdded(); }, "Test that entry was added to the buffer after a buffer full event"); </script> diff --git a/tests/wpt/web-platform-tests/resource-timing/resources/buffer-full-utilities.js b/tests/wpt/web-platform-tests/resource-timing/resources/buffer-full-utilities.js index b143da7b325..e0a4f0b1080 100644 --- a/tests/wpt/web-platform-tests/resource-timing/resources/buffer-full-utilities.js +++ b/tests/wpt/web-platform-tests/resource-timing/resources/buffer-full-utilities.js @@ -18,6 +18,19 @@ let waitForNextTask = () => { }); }; +let waitUntilConditionIsMet = cond => { + return new Promise(resolve => { + let checkCondition = function() { + if (cond.apply(null)) { + resolve(); + } else { + step_timeout(checkCondition.bind(null,cond), 0); + } + } + step_timeout(checkCondition.bind(null, cond), 0); + }); +} + let waitForEventToFire = () => { return new Promise(resolve => { let waitForIt = function() { diff --git a/tests/wpt/web-platform-tests/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html b/tests/wpt/web-platform-tests/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html new file mode 100644 index 00000000000..bcb4ee62e0c --- /dev/null +++ b/tests/wpt/web-platform-tests/shadow-dom/capturing-and-bubbling-event-listeners-across-shadow-trees.html @@ -0,0 +1,191 @@ +<!DOCTYPE html> +<html> +<head> +<title>Shadow DOM: Capturing event listeners should be invoked before bubbling event listeners</title> +<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="./resources/shadow-dom.js"></script> +<script> + +function attachEventListeners(eventType, tree) { + const eventLogs = []; + const makeComposedPathResult = (event) => event.composedPath().map((node) => node.id) + for (const id in tree) { + const node = tree[id]; + node.addEventListener(eventType, event => eventLogs.push( + ['bubbling', event.eventPhase, event.target.id, event.currentTarget.id, makeComposedPathResult(event)]), {capture: false}); + node.addEventListener(eventType, event => eventLogs.push( + ['capturing', event.eventPhase, event.target.id, event.currentTarget.id, makeComposedPathResult(event)]), {capture: true}); + } + return eventLogs; +} + +</script> +</head> +<body> + +<div id="test1"> + <div id="parent"> + <div id="target"></div> + </div> +</div> +<script> +test(() => { + const tree = createTestTree(document.getElementById('test1')); + const logs = attachEventListeners('my-event', tree); + tree.target.dispatchEvent(new Event('my-event', { bubbles: true, composed: true })); + + const composedPath = ['target', 'parent', 'test1']; + assert_object_equals(logs, [ + ['capturing', Event.CAPTURING_PHASE, 'target', 'test1', composedPath], + ['capturing', Event.CAPTURING_PHASE, 'target', 'parent', composedPath], + ['capturing', Event.AT_TARGET, 'target', 'target', composedPath], + ['bubbling', Event.AT_TARGET, 'target', 'target', composedPath], + ['bubbling', Event.BUBBLING_PHASE, 'target', 'parent', composedPath], + ['bubbling', Event.BUBBLING_PHASE, 'target', 'test1', composedPath], + ]); +}, 'Capturing event listeners should be invoked before bubbling event listeners on the target without shadow trees'); +</script> + +<div id="test2"> + <div id="host"> + <template id="shadowRoot" data-mode="closed"> + <div id="target"></div> + </template> + </div> +</div> +<script> +test(() => { + const tree = createTestTree(document.getElementById('test2')); + const logs = attachEventListeners('my-event', tree); + tree.target.dispatchEvent(new Event('my-event', { bubbles: true, composed: true })); + + const innerComposedPath = ['target', 'shadowRoot', 'host', 'test2']; + const outerComposedPath = ['host', 'test2']; + assert_object_equals(logs, [ + ['capturing', Event.CAPTURING_PHASE, 'host', 'test2', outerComposedPath], + ['capturing', Event.AT_TARGET, 'host', 'host', outerComposedPath], + ['capturing', Event.CAPTURING_PHASE, 'target', 'shadowRoot', innerComposedPath], + ['capturing', Event.AT_TARGET, 'target', 'target', innerComposedPath], + ['bubbling', Event.AT_TARGET, 'target', 'target', innerComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'target', 'shadowRoot', innerComposedPath], + ['bubbling', Event.AT_TARGET, 'host', 'host', outerComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'host', 'test2', outerComposedPath], + ]); +}, 'Capturing event listeners should be invoked before bubbling event listeners when an event is dispatched inside a shadow tree'); +</script> + +<div id="test3"> + <div id="outerHost"> + <template id="outerShadowRoot" data-mode="closed"> + <div id="innerHost"> + <template id="innerShadowRoot" data-mode="closed"> + <div id="target"></div> + </template> + </div> + </template> + </div> +</div> +<script> +test(() => { + const tree = createTestTree(document.getElementById('test3')); + const logs = attachEventListeners('my-event', tree); + tree.target.dispatchEvent(new Event('my-event', { bubbles: true, composed: true })); + + const innerShadowComposedPath = ['target', 'innerShadowRoot', 'innerHost', 'outerShadowRoot', 'outerHost', 'test3']; + const outerShadowComposedPath = ['innerHost', 'outerShadowRoot', 'outerHost', 'test3']; + const outerComposedPath = ['outerHost', 'test3']; + assert_object_equals(logs, [ + ['capturing', Event.CAPTURING_PHASE, 'outerHost', 'test3', outerComposedPath], + ['capturing', Event.AT_TARGET, 'outerHost', 'outerHost', outerComposedPath], + ['capturing', Event.CAPTURING_PHASE, 'innerHost', 'outerShadowRoot', outerShadowComposedPath], + ['capturing', Event.AT_TARGET, 'innerHost', 'innerHost', outerShadowComposedPath], + ['capturing', Event.CAPTURING_PHASE, 'target', 'innerShadowRoot', innerShadowComposedPath], + ['capturing', Event.AT_TARGET, 'target', 'target', innerShadowComposedPath], + + ['bubbling', Event.AT_TARGET, 'target', 'target', innerShadowComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'target', 'innerShadowRoot', innerShadowComposedPath], + ['bubbling', Event.AT_TARGET, 'innerHost', 'innerHost', outerShadowComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'innerHost', 'outerShadowRoot', outerShadowComposedPath], + ['bubbling', Event.AT_TARGET, 'outerHost', 'outerHost', outerComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'outerHost', 'test3', outerComposedPath], + ]); +}, 'Capturing event listeners should be invoked before bubbling event listeners when an event is dispatched inside a doubly nested shadow tree'); +</script> + +<div id="test4"> + <div id="host"> + <template id="shadowRoot" data-mode="closed"> + <slot id="slot"></slot> + </template> + <div id="target"></div> + </div> +</div> +<script> +test(() => { + const tree = createTestTree(document.getElementById('test4')); + const logs = attachEventListeners('my-event', tree); + tree.target.dispatchEvent(new Event('my-event', { bubbles: true, composed: true })); + + const innerComposedPath = ['target', 'slot', 'shadowRoot', 'host', 'test4']; + const outerComposedPath = ['target', 'host', 'test4']; + assert_object_equals(logs, [ + ['capturing', Event.CAPTURING_PHASE, 'target', 'test4', outerComposedPath], + ['capturing', Event.CAPTURING_PHASE, 'target', 'host', outerComposedPath], + ['capturing', Event.CAPTURING_PHASE, 'target', 'shadowRoot', innerComposedPath], + ['capturing', Event.CAPTURING_PHASE, 'target', 'slot', innerComposedPath], + ['capturing', Event.AT_TARGET, 'target', 'target', outerComposedPath], + + ['bubbling', Event.AT_TARGET, 'target', 'target', outerComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'target', 'slot', innerComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'target', 'shadowRoot', innerComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'target', 'host', outerComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'target', 'test4', outerComposedPath], + ]); +}, 'Capturing event listeners should be invoked before bubbling event listeners when an event is dispatched via a slot'); +</script> + +<div id="test5"> + <div id="upperHost"> + <template id="upperShadowRoot" data-mode="closed"> + <slot id="upperSlot"></slot> + </template> + <div id="lowerHost"> + <template id="lowerShadowRoot" data-mode="closed"> + <div id="target"></div> + </template> + </div> + </div> +</div> +<script> +test(() => { + const tree = createTestTree(document.getElementById('test5')); + const logs = attachEventListeners('my-event', tree); + tree.target.dispatchEvent(new Event('my-event', { bubbles: true, composed: true })); + + const lowerComposedPath = ['target', 'lowerShadowRoot', 'lowerHost', 'upperHost', 'test5']; + const upperComposedPath = ['lowerHost', 'upperSlot', 'upperShadowRoot', 'upperHost', 'test5']; + const outerComposedPath = ['lowerHost', 'upperHost', 'test5']; + assert_object_equals(logs, [ + ['capturing', Event.CAPTURING_PHASE, 'lowerHost', 'test5', outerComposedPath], + ['capturing', Event.CAPTURING_PHASE, 'lowerHost', 'upperHost', outerComposedPath], + ['capturing', Event.CAPTURING_PHASE, 'lowerHost', 'upperShadowRoot', upperComposedPath], + ['capturing', Event.CAPTURING_PHASE, 'lowerHost', 'upperSlot', upperComposedPath], + ['capturing', Event.AT_TARGET, 'lowerHost', 'lowerHost', outerComposedPath], + ['capturing', Event.CAPTURING_PHASE, 'target', 'lowerShadowRoot', lowerComposedPath], + ['capturing', Event.AT_TARGET, 'target', 'target', lowerComposedPath], + + ['bubbling', Event.AT_TARGET, 'target', 'target', lowerComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'target', 'lowerShadowRoot', lowerComposedPath], + ['bubbling', Event.AT_TARGET, 'lowerHost', 'lowerHost', outerComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'lowerHost', 'upperSlot', upperComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'lowerHost', 'upperShadowRoot', upperComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'lowerHost', 'upperHost', outerComposedPath], + ['bubbling', Event.BUBBLING_PHASE, 'lowerHost', 'test5', outerComposedPath], + ]); +}, 'Capturing event listeners should be invoked before bubbling event listeners when an event is dispatched inside a shadow tree which passes through another shadow tree'); +</script> + +</body> +</html> diff --git a/tests/wpt/web-platform-tests/shadow-dom/resources/shadow-dom.js b/tests/wpt/web-platform-tests/shadow-dom/resources/shadow-dom.js index 192ad454130..81b9a3d4fae 100644 --- a/tests/wpt/web-platform-tests/shadow-dom/resources/shadow-dom.js +++ b/tests/wpt/web-platform-tests/shadow-dom/resources/shadow-dom.js @@ -21,13 +21,7 @@ function createTestTree(node) { function attachShadowFromTemplate(template) { let parent = template.parentNode; parent.removeChild(template); - let shadowRoot; - if (template.getAttribute('data-mode') === 'v0') { - // For legacy Shadow DOM - shadowRoot = parent.createShadowRoot(); - } else { - shadowRoot = parent.attachShadow({mode: template.getAttribute('data-mode')}); - } + let shadowRoot = parent.attachShadow({mode: template.getAttribute('data-mode')}); let id = template.id; if (id) { shadowRoot.id = id; diff --git a/tests/wpt/web-platform-tests/tools/ci/jobs.py b/tests/wpt/web-platform-tests/tools/ci/jobs.py index ddf11009644..31b39635a26 100644 --- a/tests/wpt/web-platform-tests/tools/ci/jobs.py +++ b/tests/wpt/web-platform-tests/tools/ci/jobs.py @@ -84,8 +84,7 @@ def get_paths(**kwargs): revish = kwargs["revish"] changed, _ = files_changed(revish) - all_changed = set(os.path.relpath(item, wpt_root) - for item in set(changed)) + all_changed = {os.path.relpath(item, wpt_root) for item in set(changed)} return all_changed diff --git a/tests/wpt/web-platform-tests/tools/ci/tests/test_jobs.py b/tests/wpt/web-platform-tests/tools/ci/tests/test_jobs.py index 363401a01b7..a10e48d2f23 100644 --- a/tests/wpt/web-platform-tests/tools/ci/tests/test_jobs.py +++ b/tests/wpt/web-platform-tests/tools/ci/tests/test_jobs.py @@ -1,6 +1,6 @@ from tools.ci import jobs -all_jobs = set([ +all_jobs = { "build_css", "lint", "manifest_upload", @@ -11,9 +11,9 @@ all_jobs = set([ "wpt_integration", "wptrunner_infrastructure", "wptrunner_unittest", -]) +} -default_jobs = set(["lint", "manifest_upload"]) +default_jobs = {"lint", "manifest_upload"} def test_all(): @@ -25,19 +25,19 @@ def test_default(): def test_testharness(): - assert jobs.get_jobs(["resources/testharness.js"]) == default_jobs | set(["resources_unittest", - "wptrunner_infrastructure"]) + assert jobs.get_jobs(["resources/testharness.js"]) == default_jobs | {"resources_unittest", + "wptrunner_infrastructure"} assert jobs.get_jobs(["resources/testharness.js"], - includes=["resources_unittest"]) == set(["resources_unittest"]) + includes=["resources_unittest"]) == {"resources_unittest"} assert jobs.get_jobs(["tools/wptserve/wptserve/config.py"], - includes=["resources_unittest"]) == set(["resources_unittest"]) + includes=["resources_unittest"]) == {"resources_unittest"} assert jobs.get_jobs(["foo/resources/testharness.js"], includes=["resources_unittest"]) == set() def test_stability(): assert jobs.get_jobs(["dom/historical.html"], - includes=["stability"]) == set(["stability"]) + includes=["stability"]) == {"stability"} assert jobs.get_jobs(["tools/pytest.ini"], includes=["stability"]) == set() assert jobs.get_jobs(["serve"], @@ -55,15 +55,15 @@ def test_stability(): assert jobs.get_jobs(["css/build-css-testsuite.sh"], includes=["stability"]) == set() assert jobs.get_jobs(["css/CSS21/test-001.html"], - includes=["stability"]) == set(["stability"]) + includes=["stability"]) == {"stability"} assert jobs.get_jobs(["css/build-css-testsuite.sh", "css/CSS21/test-001.html"], - includes=["stability"]) == set(["stability"]) + includes=["stability"]) == {"stability"} def test_tools_unittest(): assert jobs.get_jobs(["tools/ci/test/test_jobs.py"], - includes=["tools_unittest"]) == set(["tools_unittest"]) + includes=["tools_unittest"]) == {"tools_unittest"} assert jobs.get_jobs(["dom/tools/example.py"], includes=["tools_unittest"]) == set() assert jobs.get_jobs(["dom/historical.html"], @@ -72,38 +72,38 @@ def test_tools_unittest(): def test_wptrunner_unittest(): assert jobs.get_jobs(["tools/wptrunner/wptrunner/wptrunner.py"], - includes=["wptrunner_unittest"]) == set(["wptrunner_unittest"]) + includes=["wptrunner_unittest"]) == {"wptrunner_unittest"} assert jobs.get_jobs(["tools/example.py"], - includes=["wptrunner_unittest"]) == set(["wptrunner_unittest"]) + includes=["wptrunner_unittest"]) == {"wptrunner_unittest"} def test_build_css(): assert jobs.get_jobs(["css/css-build-testsuites.sh"], - includes=["build_css"]) == set(["build_css"]) + includes=["build_css"]) == {"build_css"} assert jobs.get_jobs(["css/CSS21/test.html"], - includes=["build_css"]) == set(["build_css"]) + includes=["build_css"]) == {"build_css"} assert jobs.get_jobs(["html/css/CSS21/test.html"], includes=["build_css"]) == set() def test_update_built(): assert jobs.get_jobs(["2dcontext/foo.html"], - includes=["update_built"]) == set(["update_built"]) + includes=["update_built"]) == {"update_built"} assert jobs.get_jobs(["html/foo.html"], - includes=["update_built"]) == set(["update_built"]) + includes=["update_built"]) == {"update_built"} assert jobs.get_jobs(["offscreen-canvas/foo.html"], - includes=["update_built"]) == set(["update_built"]) + includes=["update_built"]) == {"update_built"} def test_wpt_integration(): assert jobs.get_jobs(["tools/wpt/wpt.py"], - includes=["wpt_integration"]) == set(["wpt_integration"]) + includes=["wpt_integration"]) == {"wpt_integration"} assert jobs.get_jobs(["tools/wptrunner/wptrunner/wptrunner.py"], - includes=["wpt_integration"]) == set(["wpt_integration"]) + includes=["wpt_integration"]) == {"wpt_integration"} def test_wpt_infrastructure(): assert jobs.get_jobs(["tools/hammer.html"], - includes=["wptrunner_infrastructure"]) == set(["wptrunner_infrastructure"]) + includes=["wptrunner_infrastructure"]) == {"wptrunner_infrastructure"} assert jobs.get_jobs(["infrastructure/assumptions/ahem.html"], - includes=["wptrunner_infrastructure"]) == set(["wptrunner_infrastructure"]) + includes=["wptrunner_infrastructure"]) == {"wptrunner_infrastructure"} diff --git a/tests/wpt/web-platform-tests/tools/ci/tests/test_run_tc.py b/tests/wpt/web-platform-tests/tools/ci/tests/test_run_tc.py index 436dc79670e..a72dcfe5cfd 100644 --- a/tests/wpt/web-platform-tests/tools/ci/tests/test_run_tc.py +++ b/tests/wpt/web-platform-tests/tools/ci/tests/test_run_tc.py @@ -6,12 +6,12 @@ from tools.ci import run_tc @pytest.mark.parametrize("msg,expected", [ - ("Some initial line\n\ntc-jobs:foo,bar", set(["foo", "bar"])), - ("Some initial line\n\ntc-jobs:foo, bar", set(["foo", "bar"])), - ("tc-jobs:foo, bar \nbaz", set(["foo", "bar"])), - ("tc-jobs:all", set(["all"])), + ("Some initial line\n\ntc-jobs:foo,bar", {"foo", "bar"}), + ("Some initial line\n\ntc-jobs:foo, bar", {"foo", "bar"}), + ("tc-jobs:foo, bar \nbaz", {"foo", "bar"}), + ("tc-jobs:all", {"all"}), ("", set()), - ("tc-jobs:foo\ntc-jobs:bar", set(["foo"]))]) + ("tc-jobs:foo\ntc-jobs:bar", {"foo"})]) @pytest.mark.parametrize("event", [ {"commits": [{"message": "<message>"}]}, {"pull_request": {"body": "<message>"}} diff --git a/tests/wpt/web-platform-tests/tools/lint/lint.py b/tests/wpt/web-platform-tests/tools/lint/lint.py index b07dbcbeb92..ccadcdc16c7 100644 --- a/tests/wpt/web-platform-tests/tools/lint/lint.py +++ b/tests/wpt/web-platform-tests/tools/lint/lint.py @@ -373,46 +373,46 @@ class CRRegexp(Regexp): description = "CR character in line separator" class SetTimeoutRegexp(Regexp): - pattern = b"setTimeout\s*\(" + pattern = br"setTimeout\s*\(" error = "SET TIMEOUT" file_extensions = [".html", ".htm", ".js", ".xht", ".xhtml", ".svg"] description = "setTimeout used; step_timeout should typically be used instead" class W3CTestOrgRegexp(Regexp): - pattern = b"w3c\-test\.org" + pattern = br"w3c\-test\.org" error = "W3C-TEST.ORG" description = "External w3c-test.org domain used" class WebPlatformTestRegexp(Regexp): - pattern = b"web\-platform\.test" + pattern = br"web\-platform\.test" error = "WEB-PLATFORM.TEST" description = "Internal web-platform.test domain used" class Webidl2Regexp(Regexp): - pattern = b"webidl2\.js" + pattern = br"webidl2\.js" error = "WEBIDL2.JS" description = "Legacy webidl2.js script used" class ConsoleRegexp(Regexp): - pattern = b"console\.[a-zA-Z]+\s*\(" + pattern = br"console\.[a-zA-Z]+\s*\(" error = "CONSOLE" file_extensions = [".html", ".htm", ".js", ".xht", ".xhtml", ".svg"] description = "Console logging API used" class GenerateTestsRegexp(Regexp): - pattern = b"generate_tests\s*\(" + pattern = br"generate_tests\s*\(" error = "GENERATE_TESTS" file_extensions = [".html", ".htm", ".js", ".xht", ".xhtml", ".svg"] description = "generate_tests used" class PrintRegexp(Regexp): - pattern = b"print(?:\s|\s*\()" + pattern = br"print(?:\s|\s*\()" error = "PRINT STATEMENT" file_extensions = [".py"] description = "Print function used" class LayoutTestsRegexp(Regexp): - pattern = b"eventSender|testRunner|window\.internals" + pattern = br"eventSender|testRunner|window\.internals" error = "LAYOUTTESTS APIS" file_extensions = [".html", ".htm", ".js", ".xht", ".xhtml", ".svg"] description = "eventSender/testRunner/window.internals used; these are LayoutTests-specific APIs (WebKit/Blink)" @@ -640,8 +640,8 @@ def check_python_ast(repo_root, path, f): return errors -broken_js_metadata = re.compile(b"//\s*META:") -broken_python_metadata = re.compile(b"#\s*META:") +broken_js_metadata = re.compile(br"//\s*META:") +broken_python_metadata = re.compile(br"#\s*META:") def check_global_metadata(value): diff --git a/tests/wpt/web-platform-tests/tools/manifest/manifest.py b/tests/wpt/web-platform-tests/tools/manifest/manifest.py index 8634b708986..dc38d381988 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/manifest.py +++ b/tests/wpt/web-platform-tests/tools/manifest/manifest.py @@ -26,13 +26,6 @@ class ManifestVersionMismatch(ManifestError): pass -def iterfilter(filters, iter): - for f in filters: - iter = f(iter) - for item in iter: - yield item - - item_classes = {"testharness": TestharnessTest, "reftest": RefTest, "reftest_node": RefTestNode, @@ -45,7 +38,7 @@ item_classes = {"testharness": TestharnessTest, class TypeData(object): - def __init__(self, manifest, type_cls, meta_filters): + def __init__(self, manifest, type_cls): """Dict-like object containing the TestItems for each test type. Loading an actual Item class for each test is unnecessarily @@ -61,7 +54,6 @@ class TypeData(object): self.json_data = {} self.tests_root = None self.data = {} - self.meta_filters = meta_filters or [] def __getitem__(self, key): if key not in self.data: @@ -134,7 +126,7 @@ class TypeData(object): if self.json_data is not None: data = set() path = from_os_path(key) - for test in iterfilter(self.meta_filters, self.json_data.get(path, [])): + for test in self.json_data.get(path, []): manifest_item = self.type_cls.from_json(self.manifest, path, test) data.add(manifest_item) try: @@ -153,7 +145,7 @@ class TypeData(object): if key in self.data: continue data = set() - for test in iterfilter(self.meta_filters, self.json_data.get(path, [])): + for test in self.json_data.get(path, []): manifest_item = self.type_cls.from_json(self.manifest, path, test) data.add(manifest_item) self.data[key] = data @@ -185,17 +177,17 @@ class TypeData(object): without actually constructing all the items""" rv = set(iterkeys(self.data)) if self.json_data: - rv |= set(to_os_path(item) for item in iterkeys(self.json_data)) + rv |= {to_os_path(item) for item in iterkeys(self.json_data)} return rv class ManifestData(dict): - def __init__(self, manifest, meta_filters=None): + def __init__(self, manifest): """Dictionary subclass containing a TypeData instance for each test type, keyed by type name""" self.initialized = False for key, value in iteritems(item_classes): - self[key] = TypeData(manifest, value, meta_filters=meta_filters) + self[key] = TypeData(manifest, value) self.initialized = True self.json_obj = None @@ -214,10 +206,10 @@ class ManifestData(dict): class Manifest(object): - def __init__(self, tests_root=None, url_base="/", meta_filters=None): + def __init__(self, tests_root=None, url_base="/"): assert url_base is not None self._path_hash = {} - self._data = ManifestData(self, meta_filters) + self._data = ManifestData(self) self._reftest_nodes_by_url = None self.tests_root = tests_root self.url_base = url_base @@ -396,12 +388,12 @@ class Manifest(object): return rv @classmethod - def from_json(cls, tests_root, obj, types=None, meta_filters=None): + def from_json(cls, tests_root, obj, types=None): version = obj.get("version") if version != CURRENT_VERSION: raise ManifestVersionMismatch - self = cls(tests_root, url_base=obj.get("url_base", "/"), meta_filters=meta_filters) + self = cls(tests_root, url_base=obj.get("url_base", "/")) if not hasattr(obj, "items") and hasattr(obj, "paths"): raise ManifestError @@ -419,17 +411,17 @@ class Manifest(object): return self -def load(tests_root, manifest, types=None, meta_filters=None): +def load(tests_root, manifest, types=None): logger = get_logger() logger.warning("Prefer load_and_update instead") - return _load(logger, tests_root, manifest, types, meta_filters) + return _load(logger, tests_root, manifest, types) __load_cache = {} -def _load(logger, tests_root, manifest, types=None, meta_filters=None, allow_cached=True): +def _load(logger, tests_root, manifest, types=None, allow_cached=True): # "manifest" is a path or file-like object. manifest_path = (manifest if isinstance(manifest, string_types) else manifest.name) @@ -445,8 +437,7 @@ def _load(logger, tests_root, manifest, types=None, meta_filters=None, allow_cac with open(manifest) as f: rv = Manifest.from_json(tests_root, fast_json.load(f), - types=types, - meta_filters=meta_filters) + types=types) except IOError: return None except ValueError: @@ -455,8 +446,7 @@ def _load(logger, tests_root, manifest, types=None, meta_filters=None, allow_cac else: rv = Manifest.from_json(tests_root, fast_json.load(manifest), - types=types, - meta_filters=meta_filters) + types=types) if allow_cached: __load_cache[manifest_path] = rv @@ -472,7 +462,6 @@ def load_and_update(tests_root, cache_root=None, working_copy=True, types=None, - meta_filters=None, write_manifest=True, allow_cached=True): logger = get_logger() @@ -484,7 +473,6 @@ def load_and_update(tests_root, tests_root, manifest_path, types=types, - meta_filters=meta_filters, allow_cached=allow_cached) except ManifestVersionMismatch: logger.info("Manifest version changed, rebuilding") @@ -493,7 +481,7 @@ def load_and_update(tests_root, logger.info("Manifest url base did not match, rebuilding") if manifest is None: - manifest = Manifest(tests_root, url_base, meta_filters=meta_filters) + manifest = Manifest(tests_root, url_base) update = True if update: diff --git a/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py b/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py index 97fe89bbda8..56b938d64ba 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py +++ b/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py @@ -17,8 +17,8 @@ from .item import Stub, ManualTest, WebDriverSpecTest, RefTestNode, TestharnessT from .utils import ContextManagerBytesIO, cached_property wd_pattern = "*.py" -js_meta_re = re.compile(b"//\s*META:\s*(\w*)=(.*)$") -python_meta_re = re.compile(b"#\s*META:\s*(\w*)=(.*)$") +js_meta_re = re.compile(br"//\s*META:\s*(\w*)=(.*)$") +python_meta_re = re.compile(br"#\s*META:\s*(\w*)=(.*)$") reference_file_re = re.compile(r'(^|[\-_])(not)?ref[0-9]*([\-_]|$)') @@ -146,11 +146,11 @@ class SourceFile(object): "xhtml":_parse_xml, "svg":_parse_xml} - root_dir_non_test = set(["common"]) + root_dir_non_test = {"common"} - dir_non_test = set(["resources", - "support", - "tools"]) + dir_non_test = {"resources", + "support", + "tools"} dir_path_non_test = {("css21", "archive"), ("css", "CSS2", "archive"), diff --git a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py index 22335564b7c..25944d5aca8 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py +++ b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py @@ -293,39 +293,11 @@ def test_iterpath(): SourceFileWithTest("test3", "0"*40, item.TestharnessTest)] m.update([(s, True) for s in sources]) - assert set(item.url for item in m.iterpath("test2")) == set(["/test2-1.html", - "/test2-2.html"]) + assert {item.url for item in m.iterpath("test2")} == {"/test2-1.html", + "/test2-2.html"} assert set(m.iterpath("missing")) == set() -def test_filter(): - m = manifest.Manifest() - - sources = [SourceFileWithTest("test1", "0"*40, item.RefTestNode, references=[("/test1-ref", "==")]), - SourceFileWithTests("test2", "0"*40, item.TestharnessTest, [("test2-1.html",), - ("test2-2.html",)]), - SourceFileWithTest("test3", "0"*40, item.TestharnessTest)] - m.update([(s, True) for s in sources]) - - json = m.to_json() - - def filter(it): - for test in it: - if test[0] in ["test2-2.html", "test3"]: - yield test - - filtered_manifest = manifest.Manifest.from_json("/", json, types=["testharness"], meta_filters=[filter]) - - actual = [ - (ty, path, [test.id for test in tests]) - for (ty, path, tests) in filtered_manifest - ] - assert actual == [ - ("testharness", "test2", ["/test2-2.html"]), - ("testharness", "test3", ["/test3"]), - ] - - def test_reftest_node_by_url(): m = manifest.Manifest() diff --git a/tests/wpt/web-platform-tests/tools/pywebsocket/example/echo_client.py b/tests/wpt/web-platform-tests/tools/pywebsocket/example/echo_client.py index 7395f51a771..f4dbb83bfcc 100755 --- a/tests/wpt/web-platform-tests/tools/pywebsocket/example/echo_client.py +++ b/tests/wpt/web-platform-tests/tools/pywebsocket/example/echo_client.py @@ -484,7 +484,7 @@ class ClientHandshakeProcessor(ClientHandshakeBase): if ch == '\n': break - m = re.match('HTTP/\\d+\.\\d+ (\\d\\d\\d) .*\r\n', status_line) + m = re.match('HTTP/\\d+\\.\\d+ (\\d\\d\\d) .*\r\n', status_line) if m is None: raise ClientHandshakeError( 'Wrong status line format: %r' % status_line) diff --git a/tests/wpt/web-platform-tests/tools/pywebsocket/mod_pywebsocket/standalone.py b/tests/wpt/web-platform-tests/tools/pywebsocket/mod_pywebsocket/standalone.py index 84b2470c8f9..2c878606488 100755 --- a/tests/wpt/web-platform-tests/tools/pywebsocket/mod_pywebsocket/standalone.py +++ b/tests/wpt/web-platform-tests/tools/pywebsocket/mod_pywebsocket/standalone.py @@ -369,7 +369,7 @@ def _alias_handlers(dispatcher, websock_handlers_map_file): for line in fp: if line[0] == '#' or line.isspace(): continue - m = re.match('(\S+)\s+(\S+)', line) + m = re.match(r'(\S+)\s+(\S+)', line) if not m: logging.warning('Wrong format in map file:' + line) continue diff --git a/tests/wpt/web-platform-tests/tools/pywebsocket/test/client_for_testing.py b/tests/wpt/web-platform-tests/tools/pywebsocket/test/client_for_testing.py index c7f805ee94e..fb5a6cb2106 100644 --- a/tests/wpt/web-platform-tests/tools/pywebsocket/test/client_for_testing.py +++ b/tests/wpt/web-platform-tests/tools/pywebsocket/test/client_for_testing.py @@ -316,7 +316,7 @@ class WebSocketHandshake(object): self._options.server_port, self._options.use_tls)) - if self._options.version is 8: + if self._options.version == 8: fields.append(_sec_origin_header(self._options.origin)) else: fields.append(_origin_header(self._options.origin)) diff --git a/tests/wpt/web-platform-tests/tools/runner/report.py b/tests/wpt/web-platform-tests/tools/runner/report.py index 952df08b805..5eb8d67c7f6 100644 --- a/tests/wpt/web-platform-tests/tools/runner/report.py +++ b/tests/wpt/web-platform-tests/tools/runner/report.py @@ -160,7 +160,7 @@ def all_tests(data): for UA, results in data.iteritems(): for result in results["results"]: id = test_id(result["test"]) - tests[id] |= set(subtest["name"] for subtest in result["subtests"]) + tests[id] |= {subtest["name"] for subtest in result["subtests"]} return tests @@ -179,7 +179,7 @@ def group_results(data): def result(): return { - "harness": dict((UA, (None, None)) for UA in UAs), + "harness": {UA: (None, None) for UA in UAs}, "subtests": None # init this later } @@ -191,9 +191,9 @@ def group_results(data): result = results_by_test[id] if result["subtests"] is None: - result["subtests"] = dict( - (name, dict((UA, (None, None)) for UA in UAs)) for name in tests[id] - ) + result["subtests"] = { + name: {UA: (None, None) for UA in UAs} for name in tests[id] + } result["harness"][UA] = (test_data["status"], test_data["message"]) for subtest in test_data["subtests"]: diff --git a/tests/wpt/web-platform-tests/tools/serve/serve.py b/tests/wpt/web-platform-tests/tools/serve/serve.py index 53f81457be1..e0c947a512b 100644 --- a/tests/wpt/web-platform-tests/tools/serve/serve.py +++ b/tests/wpt/web-platform-tests/tools/serve/serve.py @@ -722,7 +722,7 @@ def build_config(override_path=None, **kwargs): return rv def _make_subdomains_product(s, depth=2): - return set(u".".join(x) for x in chain(*(product(s, repeat=i) for i in range(1, depth+1)))) + return {u".".join(x) for x in chain(*(product(s, repeat=i) for i in range(1, depth+1)))} _subdomains = {u"www", u"www1", diff --git a/tests/wpt/web-platform-tests/tools/wpt/browser.py b/tests/wpt/web-platform-tests/tools/wpt/browser.py index 52157bca4e7..d77b5f01dfa 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/browser.py +++ b/tests/wpt/web-platform-tests/tools/wpt/browser.py @@ -304,7 +304,7 @@ class Firefox(Browser): # This is used rather than an API call to avoid rate limits tags = call("git", "ls-remote", "--tags", "--refs", "https://github.com/mozilla/geckodriver.git") - release_re = re.compile(".*refs/tags/v(\d+)\.(\d+)\.(\d+)") + release_re = re.compile(r".*refs/tags/v(\d+)\.(\d+)\.(\d+)") latest_release = 0 for item in tags.split("\n"): m = release_re.match(item) diff --git a/tests/wpt/web-platform-tests/tools/wpt/run.py b/tests/wpt/web-platform-tests/tools/wpt/run.py index ffdd8efa946..c54d5aaba01 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/run.py +++ b/tests/wpt/web-platform-tests/tools/wpt/run.py @@ -121,7 +121,7 @@ def check_environ(product): missing_hosts = set(expected_hosts) if is_windows: - hosts_path = "%s\System32\drivers\etc\hosts" % os.environ.get("SystemRoot", "C:\Windows") + hosts_path = r"%s\System32\drivers\etc\hosts" % os.environ.get("SystemRoot", r"C:\Windows") else: hosts_path = "/etc/hosts" diff --git a/tests/wpt/web-platform-tests/tools/wpt/testfiles.py b/tests/wpt/web-platform-tests/tools/wpt/testfiles.py index 006e4a22d0b..7f0f221a1f6 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/testfiles.py +++ b/tests/wpt/web-platform-tests/tools/wpt/testfiles.py @@ -196,7 +196,7 @@ def affected_testfiles(files_changed, skip_dirs=None, manifest_path=None, manifest_update=True): """Determine and return list of test files that reference changed files.""" if skip_dirs is None: - skip_dirs = set(["conformance-checkers", "docs", "tools"]) + skip_dirs = {"conformance-checkers", "docs", "tools"} affected_testfiles = set() # Exclude files that are in the repo root, because # they are not part of any test. @@ -219,7 +219,7 @@ def affected_testfiles(files_changed, skip_dirs=None, interfaces_changed = interfaces_files.intersection(nontests_changed) nontests_changed = nontests_changed.intersection(support_files) - tests_changed = set(item for item in files_changed if item in test_files) + tests_changed = {item for item in files_changed if item in test_files} nontest_changed_paths = set() rewrites = {"/resources/webidl2/lib/webidl2.js": "/resources/WebIDLParser.js"} @@ -301,7 +301,7 @@ def get_parser(): # TODO: Consolidate with `./wpt run --affected`: # https://github.com/web-platform-tests/wpt/issues/14560 parser.add_argument("--ignore-rules", nargs="*", type=set, - default=set(["resources/testharness*"]), + default={"resources/testharness*"}, help="Rules for paths to exclude from lists of changes. Rules are paths " "relative to the test root, with * before a separator or the end matching " "anything other than a path separator and ** in that position matching " @@ -355,7 +355,7 @@ def run_tests_affected(**kwargs): manifest_path = os.path.join(kwargs["metadata_root"], "MANIFEST.json") tests_changed, dependents = affected_testfiles( changed, - set(["conformance-checkers", "docs", "tools"]), + {"conformance-checkers", "docs", "tools"}, manifest_path=manifest_path ) diff --git a/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py b/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py index 75cedf75ee0..49d2b8758f7 100644 --- a/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py +++ b/tests/wpt/web-platform-tests/tools/wpt/tests/test_wpt.py @@ -322,8 +322,8 @@ def test_files_changed_ignore(): def test_files_changed_ignore_rules(): from tools.wpt.testfiles import compile_ignore_rule - assert compile_ignore_rule("foo*bar*/baz").pattern == "^foo\*bar[^/]*/baz$" - assert compile_ignore_rule("foo**bar**/baz").pattern == "^foo\*\*bar.*/baz$" + assert compile_ignore_rule("foo*bar*/baz").pattern == r"^foo\*bar[^/]*/baz$" + assert compile_ignore_rule("foo**bar**/baz").pattern == r"^foo\*\*bar.*/baz$" assert compile_ignore_rule("foobar/baz/*").pattern == "^foobar/baz/[^/]*$" assert compile_ignore_rule("foobar/baz/**").pattern == "^foobar/baz/.*$" diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py index f9fd97b6ba8..0b0068f8c5b 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py @@ -135,7 +135,7 @@ class MarionetteTestharnessProtocolPart(TestharnessProtocolPart): "Loading initial page %s failed. Ensure that the " "there are no other programs bound to this port and " "that your firewall rules or network setup does not " - "prevent access.\e%s" % (url, traceback.format_exc(e))) + r"prevent access.\e%s" % (url, traceback.format_exc(e))) raise self.runner_handle = self.marionette.current_window_handle format_map = {"title": threading.current_thread().name.replace("'", '"')} @@ -212,7 +212,7 @@ class MarionetteTestharnessProtocolPart(TestharnessProtocolPart): if test_window is None: handles = self.marionette.window_handles if len(handles) == 2: - test_window = next(iter(set(handles) - set([parent]))) + test_window = next(iter(set(handles) - {parent})) elif handles[0] == parent and len(handles) > 2: # Hope the first one here is the test window test_window = handles[1] diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py index 0d97f0f2d93..e7b9f45dc81 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py @@ -128,7 +128,7 @@ class SeleniumTestharnessProtocolPart(TestharnessProtocolPart): if test_window is None: after = self.webdriver.window_handles if len(after) == 2: - test_window = next(iter(set(after) - set([parent]))) + test_window = next(iter(set(after) - {parent})) elif after[0] == parent and len(after) > 2: # Hope the first one here is the test window test_window = after[1] @@ -247,7 +247,7 @@ class SeleniumRun(object): timeout = self.timeout try: - self.protocol.base.set_timeout((timeout + extra_timeout)) + self.protocol.base.set_timeout(timeout + extra_timeout) except exceptions.ErrorInResponseException: self.logger.error("Lost WebDriver connection") return Stop diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py index e449390116b..65938a7678b 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorwebdriver.py @@ -121,7 +121,7 @@ class WebDriverTestharnessProtocolPart(TestharnessProtocolPart): if test_window is None: after = self.webdriver.handles if len(after) == 2: - test_window = next(iter(set(after) - set([parent]))) + test_window = next(iter(set(after) - {parent})) elif after[0] == parent and len(after) > 2: # Hope the first one here is the test window test_window = after[1] @@ -258,7 +258,7 @@ class WebDriverRun(object): timeout = self.timeout try: - self.protocol.base.set_timeout((timeout + extra_timeout)) + self.protocol.base.set_timeout(timeout + extra_timeout) except client.UnknownErrorException: self.logger.error("Lost WebDriver connection") return Stop diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestexpected.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestexpected.py index b6ef63dbb36..7a93fe41ec7 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestexpected.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestexpected.py @@ -353,7 +353,7 @@ class TestNode(ManifestItem): @property def is_empty(self): - required_keys = set(["type"]) + required_keys = {"type"} if set(self._data.keys()) != required_keys: return False return all(child.is_empty for child in self.children) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py index 452c583d327..2b0288668cc 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py @@ -182,7 +182,7 @@ class TestNode(ManifestItem): @property def is_empty(self): - ignore_keys = set(["type"]) + ignore_keys = {"type"} if set(self._data.keys()) - ignore_keys: return False return all(child.is_empty for child in self.children) @@ -663,7 +663,7 @@ def group_conditionals(values, property_order=None, boolean_properties=None): property_order = ["debug", "os", "version", "processor", "bits"] if boolean_properties is None: - boolean_properties = set(["debug"]) + boolean_properties = {"debug"} else: boolean_properties = set(boolean_properties) @@ -676,7 +676,7 @@ def group_conditionals(values, property_order=None, boolean_properties=None): if not by_property: raise ConditionError - properties = set(item[0] for item in by_property.iterkeys()) + properties = {item[0] for item in by_property.iterkeys()} include_props = [] for prop in property_order: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/metadata.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/metadata.py index 253ab8ed994..1a4ce40f86c 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/metadata.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/metadata.py @@ -516,7 +516,7 @@ class PackedResultList(object): else: value = status_intern.get(value_idx) - run_info = run_info_intern.get((packed & 0x00FF)) + run_info = run_info_intern.get(packed & 0x00FF) return prop, run_info, value diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testloader.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testloader.py index 7b9bbf32370..bd08a9cd5cf 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testloader.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testloader.py @@ -110,14 +110,13 @@ class TagFilter(object): class ManifestLoader(object): def __init__(self, test_paths, force_manifest_update=False, manifest_download=False, - types=None, meta_filters=None): + types=None): do_delayed_imports() self.test_paths = test_paths self.force_manifest_update = force_manifest_update self.manifest_download = manifest_download self.types = types self.logger = structured.get_default_logger() - self.meta_filters = meta_filters if self.logger is None: self.logger = structured.structuredlog.StructuredLogger("ManifestLoader") @@ -137,7 +136,7 @@ class ManifestLoader(object): download_from_github(manifest_path, tests_path) return manifest.load_and_update(tests_path, manifest_path, url_base, cache_root=cache_root, update=self.force_manifest_update, - meta_filters=self.meta_filters, types=self.types) + types=self.types) def iterfilter(filters, iter): diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_wpttest.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_wpttest.py index 2b96ee74e76..7ca23ba22ca 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_wpttest.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/test_wpttest.py @@ -62,7 +62,7 @@ def make_mock_manifest(*items): filename = dir_path + "/%i.html" % i tests.append((test_type, filename, - set([TestharnessTest("/foo.bar", filename, "/", filename)]))) + {TestharnessTest("/foo.bar", filename, "/", filename)})) return rv 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 b16d96a42d4..a8e2bd6db2f 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 @@ -478,7 +478,7 @@ class Tokenizer(object): elif c == "U": return self.decode_escape(6) elif c in ["a", "b", "f", "n", "r", "t", "v"]: - return eval("'\%s'" % c) + return eval(r"'\%s'" % c) elif c is eol: raise ParseError(self.filename, self.line_number, "EOL in escape") else: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/serializer.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/serializer.py index e4749128bf9..d24becbec6d 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/serializer.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/serializer.py @@ -3,7 +3,7 @@ from .parser import atoms, precedence atom_names = {v:"@%s" % k for (k,v) in atoms.items()} -named_escapes = set(["\a", "\b", "\f", "\n", "\r", "\t", "\v"]) +named_escapes = {"\a", "\b", "\f", "\n", "\r", "\t", "\v"} def escape(string, extras=""): # Assumes input bytes are either UTF8 bytes or unicode. diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_conditional.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_conditional.py index 10b63191432..fbc75ec8390 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_conditional.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_conditional.py @@ -142,4 +142,4 @@ key_1: other_value self.assertTrue(manifest.has_key("key_1")) self.assertFalse(manifest.has_key("key_2")) - self.assertEquals(set(manifest.iterkeys()), set(["key", "key_1"])) + self.assertEquals(set(manifest.iterkeys()), {"key", "key_1"}) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py index f906afa34a3..14c2ef2e228 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py @@ -146,7 +146,7 @@ class TokenizerTest(unittest.TestCase): """) def test_18(self): - self.compare("""key: \] + self.compare(r"""key: \] """, """key: ] """) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_static.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_static.py index e0e83c83e80..aaf84659152 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_static.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_static.py @@ -87,8 +87,8 @@ key_1: other_value self.assertTrue(manifest.has_key("key_1")) self.assertFalse(manifest.has_key("key_2")) - self.assertEquals(set(manifest.iterkeys()), set(["key", "key_1"])) - self.assertEquals(set(manifest.itervalues()), set(["value_1", "other_value"])) + self.assertEquals(set(manifest.iterkeys()), {"key", "key_1"}) + self.assertEquals(set(manifest.itervalues()), {"value_1", "other_value"}) def test_is_empty_1(self): data = """ diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_tokenizer.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_tokenizer.py index 40a8acc6cab..66b5805542b 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_tokenizer.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_tokenizer.py @@ -27,7 +27,7 @@ class TokenizerTest(unittest.TestCase): (token_types.paren, "]")]) def test_heading_1(self): - self.compare(b"""[Heading [text\]]""", + self.compare(br"""[Heading [text\]]""", [(token_types.paren, "["), (token_types.string, "Heading [text]"), (token_types.paren, "]")]) @@ -39,7 +39,7 @@ class TokenizerTest(unittest.TestCase): (token_types.paren, "]")]) def test_heading_3(self): - self.compare(b"""[Heading [\]text]""", + self.compare(br"""[Heading [\]text]""", [(token_types.paren, "["), (token_types.string, "Heading []text"), (token_types.paren, "]")]) @@ -49,7 +49,7 @@ class TokenizerTest(unittest.TestCase): self.tokenize(b"[Heading") def test_heading_5(self): - self.compare(b"""[Heading [\]text] #comment""", + self.compare(br"""[Heading [\]text] #comment""", [(token_types.paren, "["), (token_types.string, "Heading []text"), (token_types.paren, "]")]) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py index c2279eaaa24..0a17fd48612 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py @@ -6,7 +6,7 @@ from collections import defaultdict from .wptmanifest.parser import atoms atom_reset = atoms["Reset"] -enabled_tests = set(["testharness", "reftest", "wdspec"]) +enabled_tests = {"testharness", "reftest", "wdspec"} class Result(object): @@ -39,28 +39,28 @@ class SubtestResult(object): class TestharnessResult(Result): default_expected = "OK" - statuses = set(["OK", "ERROR", "INTERNAL-ERROR", "TIMEOUT", "EXTERNAL-TIMEOUT", "CRASH"]) + statuses = {"OK", "ERROR", "INTERNAL-ERROR", "TIMEOUT", "EXTERNAL-TIMEOUT", "CRASH"} class TestharnessSubtestResult(SubtestResult): default_expected = "PASS" - statuses = set(["PASS", "FAIL", "TIMEOUT", "NOTRUN"]) + statuses = {"PASS", "FAIL", "TIMEOUT", "NOTRUN"} class ReftestResult(Result): default_expected = "PASS" - statuses = set(["PASS", "FAIL", "ERROR", "INTERNAL-ERROR", "TIMEOUT", "EXTERNAL-TIMEOUT", - "CRASH"]) + statuses = {"PASS", "FAIL", "ERROR", "INTERNAL-ERROR", "TIMEOUT", "EXTERNAL-TIMEOUT", + "CRASH"} class WdspecResult(Result): default_expected = "OK" - statuses = set(["OK", "ERROR", "INTERNAL-ERROR", "TIMEOUT", "EXTERNAL-TIMEOUT", "CRASH"]) + statuses = {"OK", "ERROR", "INTERNAL-ERROR", "TIMEOUT", "EXTERNAL-TIMEOUT", "CRASH"} class WdspecSubtestResult(SubtestResult): default_expected = "PASS" - statuses = set(["PASS", "FAIL", "ERROR"]) + statuses = {"PASS", "FAIL", "ERROR"} def get_run_info(metadata_root, product, **kwargs): diff --git a/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/base.py b/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/base.py index c114e5e905c..0aeceb61589 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/base.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/tests/functional/base.py @@ -75,7 +75,7 @@ class TestUsingServer(unittest.TestCase): req.add_data(body) if auth is not None: - req.add_header("Authorization", b"Basic %s" % base64.b64encode((b"%s:%s" % auth))) + req.add_header("Authorization", b"Basic %s" % base64.b64encode(b"%s:%s" % auth)) return urlopen(req) diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py index efc65ef1801..6a2410396be 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/response.py @@ -113,10 +113,10 @@ class Response(object): time or interval from now when the cookie expires """ - days = dict((i+1, name) for i, name in enumerate(["jan", "feb", "mar", - "apr", "may", "jun", - "jul", "aug", "sep", - "oct", "nov", "dec"])) + days = {i+1: name for i, name in enumerate(["jan", "feb", "mar", + "apr", "may", "jun", + "jul", "aug", "sep", + "oct", "nov", "dec"])} if value is None: value = '' max_age = 0 diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/router.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/router.py index 5118c03b728..5b860b59425 100644 --- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/router.py +++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/router.py @@ -102,7 +102,7 @@ class Router(object): self.register(*route) def register(self, methods, path, handler): - """Register a handler for a set of paths. + r"""Register a handler for a set of paths. :param methods: Set of methods this should match. "*" is a special value indicating that all methods should diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html index d5bcbfe990c..89d361d22f3 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html @@ -14,22 +14,24 @@ const context = new AudioContext(); const filePath = 'processors/dummy-processor.js'; + context.suspend(); + // Suspends the context right away and then activate worklet. The current // time must not advance since the context is suspended. audit.define( {label: 'load-worklet-and-suspend'}, async (task, should) => { - context.suspend(); - const suspendTime = context.currentTime; await context.audioWorklet.addModule(filePath); + const suspendTime = context.currentTime; const dummy = new AudioWorkletNode(context, 'dummy'); dummy.connect(context.destination); task.timeout(() => { - should(context.currentTime, 'context.currentTime') - .beEqualTo(suspendTime); + should(context.currentTime === suspendTime, + 'context.currentTime did not change after worklet started') + .beTrue(); should(context.state, 'context.state').beEqualTo('suspended'); task.done(); - }, 1000); + }, 500); }); audit.run(); diff --git a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-lowpass.html b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-lowpass.html index 69dc85a2e2b..d20786e36b1 100644 --- a/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-lowpass.html +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-biquadfilternode-interface/biquad-lowpass.html @@ -34,7 +34,7 @@ createTestAndRun(context, 'lowpass', { should: should, - threshold: 4.6943e-8, + threshold: 9.7869e-8, filterParameters: filterParameters }).then(task.done.bind(task)); }); diff --git a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-transceivers.https.html b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-transceivers.https.html index 73668e7be6e..110638cd74e 100644 --- a/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-transceivers.https.html +++ b/tests/wpt/web-platform-tests/webrtc/RTCPeerConnection-transceivers.https.html @@ -469,4 +469,35 @@ promise_test(async t => { await exchangeOfferAndListenToOntrack(t, pc1, pc2); }, 'Changing transceiver direction to \'sendrecv\' makes ontrack fire'); +// Regression test coverage for https://crbug.com/950280. +promise_test(async t => { + const pc1 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + const pc2 = new RTCPeerConnection(); + t.add_cleanup(() => pc2.close()); + const pc2Promise = pc2.createOffer() + .then((offer) => { return pc1.setRemoteDescription(offer); }) + .then(() => { return pc1.createAnswer(); }) + .then((answer) => { return pc1.setLocalDescription(answer); }); + const pc1Promise = pc1.createOffer({ offerToReceiveAudio: true}) + .then(() => { pc1.addTrack(pc1.getReceivers()[0].track); }); + await Promise.all([pc1Promise, pc2Promise]); + assert_equals(pc1.getSenders()[0].track, pc1.getReceivers()[0].track); +}, 'transceiver.sender.track does not revert to an old state'); + +// Regression test coverage for https://crbug.com/950280. +promise_test(async t => { + const pc1 = new RTCPeerConnection(); + t.add_cleanup(() => pc1.close()); + const pc2 = new RTCPeerConnection(); + t.add_cleanup(() => pc2.close()); + const pc2Promise = pc2.createOffer() + .then((offer) => { return pc1.setRemoteDescription(offer); }) + .then(() => { return pc1.createAnswer(); }); + const pc1Promise = pc1.createOffer({ offerToReceiveAudio: true}) + .then(() => { pc1.getTransceivers()[0].direction = 'inactive'; }); + await Promise.all([pc1Promise, pc2Promise]); + assert_equals(pc1.getTransceivers()[0].direction, 'inactive'); +}, 'transceiver.direction does not revert to an old state'); + </script> diff --git a/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js b/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js index aab0417aed0..c38c012ba84 100644 --- a/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js +++ b/tests/wpt/web-platform-tests/webxr/resources/webxr_test_constants.js @@ -30,3 +30,12 @@ const VALID_GRIP_WITH_POINTER_OFFSET = const VALID_STAGE_TRANSFORM = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1.0, 1.65, -1.0, 1]; + +const VALID_BOUNDS = [ + { x: 3.0, y: 0, z: -2.0 }, + { x: 3.5, y: 0, z: 0.0 }, + { x: 3.0, y: 0, z: 2.0 }, + { x: -3.0, y: 0, z: 2.0 }, + { x: -3.5, y: 0, z: 0.0 }, + { x: -3.0, y: 0, z: -2.0 } +]; diff --git a/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini b/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini index f43c95153a6..772b6425f61 100644 --- a/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini +++ b/tests/wpt/webgl/meta/conformance/textures/misc/texture-upload-size.html.ini @@ -32,3 +32,6 @@ [WebGL test #172: could not create image (SVG)] expected: FAIL + [WebGL test #124: could not create image (SVG)] + expected: FAIL + |