Update web-platform-tests to revision 85e8612e81c8b478c8cac7260436646e48d3f7ae

This commit is contained in:
WPT Sync Bot 2019-04-16 21:36:56 -04:00
parent a14b952fa3
commit 87dcce0f06
66 changed files with 697 additions and 266 deletions

View file

@ -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]

View file

@ -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": [

View file

@ -0,0 +1,2 @@
[animation-opacity-pause-and-set-time.html]
expected: TIMEOUT

View file

@ -0,0 +1,2 @@
[animation-transform-pause-and-set-time.html]
expected: TIMEOUT

View file

@ -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

View file

@ -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

View file

@ -32,7 +32,7 @@
[single-byte-decoder.html?XMLHttpRequest]
expected: TIMEOUT
expected: CRASH
[ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
expected: FAIL

View file

@ -0,0 +1,4 @@
[javascript-url-abort-return-value-string.tentative.html]
[Aborting fetch for javascript:string navigation]
expected: FAIL

View file

@ -1,5 +0,0 @@
[javascript-url-abort-return-value-undefined.tentative.html]
expected: TIMEOUT
[Not aborting fetch for javascript:undefined navigation]
expected: TIMEOUT

View file

@ -0,0 +1,4 @@
[traverse_the_history_4.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -0,0 +1,2 @@
[script-onerror-insertion-point-2.html]
expected: TIMEOUT

View file

@ -1,4 +1,5 @@
[offscreencanvas.commit.w.html]
expected: ERROR
[Test that calling OffscreenCanvas's commit pushes its contents to its placeholder.]
expected: FAIL

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,2 @@
[transition_calc_implicit.html]
expected: TIMEOUT

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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" />

View file

@ -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>

View file

@ -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.");

View file

@ -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,

View file

@ -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>

View file

@ -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() {

View file

@ -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>

View file

@ -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;

View file

@ -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

View file

@ -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"}

View file

@ -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>"}}

View file

@ -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):

View file

@ -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:

View file

@ -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"),

View file

@ -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()

View file

@ -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)

View file

@ -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

View file

@ -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))

View file

@ -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"]:

View file

@ -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",

View file

@ -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)

View file

@ -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"

View file

@ -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
)

View file

@ -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/.*$"

View file

@ -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]

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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:

View file

@ -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

View file

@ -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):

View file

@ -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

View file

@ -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:

View file

@ -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.

View file

@ -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"})

View file

@ -146,7 +146,7 @@ class TokenizerTest(unittest.TestCase):
""")
def test_18(self):
self.compare("""key: \]
self.compare(r"""key: \]
""", """key: ]
""")

View file

@ -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 = """

View file

@ -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, "]")])

View file

@ -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):

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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();

View file

@ -34,7 +34,7 @@
createTestAndRun(context, 'lowpass', {
should: should,
threshold: 4.6943e-8,
threshold: 9.7869e-8,
filterParameters: filterParameters
}).then(task.done.bind(task));
});

View file

@ -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>

View file

@ -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 }
];

View file

@ -32,3 +32,6 @@
[WebGL test #172: could not create image (SVG)]
expected: FAIL
[WebGL test #124: could not create image (SVG)]
expected: FAIL