diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-04-16 04:38:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-16 04:38:39 -0400 |
commit | b9d625f16e31be71eb493f0cb38c07a713b4fe86 (patch) | |
tree | b3c70f44fe9e5676aef3301909790c71c2a785c4 | |
parent | a16110682b512d56c5691ffedbd380233e57117c (diff) | |
parent | c8202ddbe16fdb3894b8f725310096a345d6b37d (diff) | |
download | servo-b9d625f16e31be71eb493f0cb38c07a713b4fe86.tar.gz servo-b9d625f16e31be71eb493f0cb38c07a713b4fe86.zip |
Auto merge of #23206 - servo-wpt-sync:wpt_update_16-04-2019, r=servo-wpt-sync
Sync WPT with upstream (16-04-2019)
Automated downstream sync of changes from upstream as of 16-04-2019.
[no-wpt-sync]
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23206)
<!-- Reviewable:end -->
50 files changed, 1209 insertions, 190 deletions
diff --git a/tests/wpt/metadata/FileAPI/blob/Blob-array-buffer.any.js.ini b/tests/wpt/metadata/FileAPI/blob/Blob-array-buffer.any.js.ini new file mode 100644 index 00000000000..aff6150a13b --- /dev/null +++ b/tests/wpt/metadata/FileAPI/blob/Blob-array-buffer.any.js.ini @@ -0,0 +1,27 @@ +[Blob-array-buffer.any.html] + [Blob.arrayBuffer() non-unicode input] + expected: FAIL + + [Blob.arrayBuffer()] + expected: FAIL + + [Blob.arrayBuffer() non-ascii input] + expected: FAIL + + [Blob.arrayBuffer() empty Blob data] + expected: FAIL + + +[Blob-array-buffer.any.worker.html] + [Blob.arrayBuffer() non-unicode input] + expected: FAIL + + [Blob.arrayBuffer()] + expected: FAIL + + [Blob.arrayBuffer() non-ascii input] + expected: FAIL + + [Blob.arrayBuffer() empty Blob data] + expected: FAIL + diff --git a/tests/wpt/metadata/FileAPI/blob/Blob-stream.any.js.ini b/tests/wpt/metadata/FileAPI/blob/Blob-stream.any.js.ini new file mode 100644 index 00000000000..c827cd7661f --- /dev/null +++ b/tests/wpt/metadata/FileAPI/blob/Blob-stream.any.js.ini @@ -0,0 +1,21 @@ +[Blob-stream.any.worker.html] + [Blob.stream() empty Blob] + expected: FAIL + + [Blob.stream()] + expected: FAIL + + [Blob.stream() non-unicode input] + expected: FAIL + + +[Blob-stream.any.html] + [Blob.stream() empty Blob] + expected: FAIL + + [Blob.stream()] + expected: FAIL + + [Blob.stream() non-unicode input] + expected: FAIL + diff --git a/tests/wpt/metadata/FileAPI/blob/Blob-text.any.js.ini b/tests/wpt/metadata/FileAPI/blob/Blob-text.any.js.ini new file mode 100644 index 00000000000..1038fd55d04 --- /dev/null +++ b/tests/wpt/metadata/FileAPI/blob/Blob-text.any.js.ini @@ -0,0 +1,45 @@ +[Blob-text.any.html] + [Blob.text() different charset param in type option] + expected: FAIL + + [Blob.text() different charset param with non-ascii input] + expected: FAIL + + [Blob.text() multi-element array in constructor] + expected: FAIL + + [Blob.text() invalid utf-8 input] + expected: FAIL + + [Blob.text() non-unicode] + expected: FAIL + + [Blob.text()] + expected: FAIL + + [Blob.text() empty blob data] + expected: FAIL + + +[Blob-text.any.worker.html] + [Blob.text() different charset param in type option] + expected: FAIL + + [Blob.text() different charset param with non-ascii input] + expected: FAIL + + [Blob.text() multi-element array in constructor] + expected: FAIL + + [Blob.text() invalid utf-8 input] + expected: FAIL + + [Blob.text() non-unicode] + expected: FAIL + + [Blob.text()] + expected: FAIL + + [Blob.text() empty blob data] + expected: FAIL + diff --git a/tests/wpt/metadata/FileAPI/idlharness.html.ini b/tests/wpt/metadata/FileAPI/idlharness.html.ini index e0de309e99f..3c3fa133edc 100644 --- a/tests/wpt/metadata/FileAPI/idlharness.html.ini +++ b/tests/wpt/metadata/FileAPI/idlharness.html.ini @@ -18,3 +18,30 @@ [File API automated IDL tests] expected: FAIL + [Blob interface: new File(["myFileBits"\], "myFileName") must inherit property "text()" with the proper type] + expected: FAIL + + [Blob interface: operation stream()] + expected: FAIL + + [Blob interface: new Blob(["TEST"\]) must inherit property "arrayBuffer()" with the proper type] + expected: FAIL + + [Blob interface: operation text()] + expected: FAIL + + [Blob interface: new Blob(["TEST"\]) must inherit property "text()" with the proper type] + expected: FAIL + + [Blob interface: new Blob(["TEST"\]) must inherit property "stream()" with the proper type] + expected: FAIL + + [Blob interface: operation arrayBuffer()] + expected: FAIL + + [Blob interface: new File(["myFileBits"\], "myFileName") must inherit property "stream()" with the proper type] + expected: FAIL + + [Blob interface: new File(["myFileBits"\], "myFileName") must inherit property "arrayBuffer()" with the proper type] + expected: FAIL + diff --git a/tests/wpt/metadata/FileAPI/idlharness.worker.js.ini b/tests/wpt/metadata/FileAPI/idlharness.worker.js.ini index 5f2f46cbe25..7a8f638a336 100644 --- a/tests/wpt/metadata/FileAPI/idlharness.worker.js.ini +++ b/tests/wpt/metadata/FileAPI/idlharness.worker.js.ini @@ -30,3 +30,30 @@ [idlharness] expected: FAIL + [Blob interface: new File(["myFileBits"\], "myFileName") must inherit property "text()" with the proper type] + expected: FAIL + + [Blob interface: operation stream()] + expected: FAIL + + [Blob interface: new Blob(["TEST"\]) must inherit property "arrayBuffer()" with the proper type] + expected: FAIL + + [Blob interface: operation text()] + expected: FAIL + + [Blob interface: new Blob(["TEST"\]) must inherit property "text()" with the proper type] + expected: FAIL + + [Blob interface: new Blob(["TEST"\]) must inherit property "stream()" with the proper type] + expected: FAIL + + [Blob interface: operation arrayBuffer()] + expected: FAIL + + [Blob interface: new File(["myFileBits"\], "myFileName") must inherit property "stream()" with the proper type] + expected: FAIL + + [Blob interface: new File(["myFileBits"\], "myFileName") must inherit property "arrayBuffer()" with the proper type] + expected: FAIL + diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 3ca5aafc9c4..19ff60052d7 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -292127,6 +292127,11 @@ {} ] ], + "feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html.headers": [ + [ + {} + ] + ], "feature-policy/experimental-features/resources/animation-property-height.js": [ [ {} @@ -319252,7 +319257,7 @@ {} ] ], - "tools/manifest/tests/test_vcs.py": [ + "tools/manifest/tests/test_utils.py": [ [ {} ] @@ -337034,6 +337039,38 @@ {} ] ], + "FileAPI/blob/Blob-array-buffer.any.js": [ + [ + "FileAPI/blob/Blob-array-buffer.any.html", + { + "script_metadata": [ + [ + "title", + "Blob Array Buffer" + ], + [ + "script", + "../support/Blob.js" + ] + ] + } + ], + [ + "FileAPI/blob/Blob-array-buffer.any.worker.html", + { + "script_metadata": [ + [ + "title", + "Blob Array Buffer" + ], + [ + "script", + "../support/Blob.js" + ] + ] + } + ] + ], "FileAPI/blob/Blob-constructor-endings.html": [ [ "FileAPI/blob/Blob-constructor-endings.html", @@ -337064,6 +337101,70 @@ {} ] ], + "FileAPI/blob/Blob-stream.any.js": [ + [ + "FileAPI/blob/Blob-stream.any.html", + { + "script_metadata": [ + [ + "title", + "Blob Stream" + ], + [ + "script", + "../support/Blob.js" + ] + ] + } + ], + [ + "FileAPI/blob/Blob-stream.any.worker.html", + { + "script_metadata": [ + [ + "title", + "Blob Stream" + ], + [ + "script", + "../support/Blob.js" + ] + ] + } + ] + ], + "FileAPI/blob/Blob-text.any.js": [ + [ + "FileAPI/blob/Blob-text.any.html", + { + "script_metadata": [ + [ + "title", + "Blob Text" + ], + [ + "script", + "../support/Blob.js" + ] + ] + } + ], + [ + "FileAPI/blob/Blob-text.any.worker.html", + { + "script_metadata": [ + [ + "title", + "Blob Text" + ], + [ + "script", + "../support/Blob.js" + ] + ] + } + ] + ], "FileAPI/file/File-constructor-endings.html": [ [ "FileAPI/file/File-constructor-endings.html", @@ -360283,6 +360384,18 @@ {} ] ], + "css/css-text-decor/parsing/text-decoration-line-invalid.html": [ + [ + "css/css-text-decor/parsing/text-decoration-line-invalid.html", + {} + ] + ], + "css/css-text-decor/parsing/text-decoration-line-valid.html": [ + [ + "css/css-text-decor/parsing/text-decoration-line-valid.html", + {} + ] + ], "css/css-text-decor/text-decoration-serialization.tentative.html": [ [ "css/css-text-decor/text-decoration-serialization.tentative.html", @@ -380835,6 +380948,12 @@ {} ] ], + "feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html": [ + [ + "feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html", + {} + ] + ], "feature-policy/experimental-features/sync-script.tentative.https.sub.html": [ [ "feature-policy/experimental-features/sync-script.tentative.https.sub.html", @@ -384370,6 +384489,18 @@ {} ] ], + "fetch/sec-metadata/prefetch.tentative.https.sub.html": [ + [ + "fetch/sec-metadata/prefetch.tentative.https.sub.html", + {} + ] + ], + "fetch/sec-metadata/preload.tentative.https.sub.html": [ + [ + "fetch/sec-metadata/preload.tentative.https.sub.html", + {} + ] + ], "fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html": [ [ "fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html", @@ -387445,6 +387576,12 @@ {} ] ], + "html/dom/elements/global-attributes/dataset-binding.window.js": [ + [ + "html/dom/elements/global-attributes/dataset-binding.window.html", + {} + ] + ], "html/dom/elements/global-attributes/dataset-delete.html": [ [ "html/dom/elements/global-attributes/dataset-delete.html", @@ -416189,6 +416326,12 @@ {} ] ], + "portals/portal-activate-event-constructor.html": [ + [ + "portals/portal-activate-event-constructor.html", + {} + ] + ], "portals/portal-activate-event.html": [ [ "portals/portal-activate-event.html", @@ -442657,6 +442800,12 @@ {} ] ], + "webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html": [ + [ + "webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html", + {} + ] + ], "webaudio/the-audio-api/the-audioworklet-interface/audioworkletglobalscope-sample-rate.https.html": [ [ "webaudio/the-audio-api/the-audioworklet-interface/audioworkletglobalscope-sample-rate.https.html", @@ -478714,6 +478863,10 @@ "506a59fec1eb33661658850254344e264c323c2e", "support" ], + "FileAPI/blob/Blob-array-buffer.any.js": [ + "b72427fd5cfaf60ab665eb30e31a4654c4169d01", + "testharness" + ], "FileAPI/blob/Blob-constructor-endings.html": [ "1dee99ff775da3562194719be06b711c246b30ef", "testharness" @@ -478734,6 +478887,14 @@ "03fe6ca5343bd1dbac65c2d885a7eb79f064d99e", "testharness" ], + "FileAPI/blob/Blob-stream.any.js": [ + "894f09f8ece47cab1301b8b474285204a4b7c4f1", + "testharness" + ], + "FileAPI/blob/Blob-text.any.js": [ + "960c96054627fce66631f7bf59516cc6797d8521", + "testharness" + ], "FileAPI/file/File-constructor-endings.html": [ "f0f9090768f48e25fb7fd47e5cd182bf11f065e4", "testharness" @@ -478867,7 +479028,7 @@ "support" ], "FileAPI/support/Blob.js": [ - "1d66f23a6040f37ded99531627d0bc1ebdd9130f", + "04069acd3ccbe713ad03f6e0a7d63f3e5a3c81b9", "support" ], "FileAPI/support/document-domain-setter.sub.html": [ @@ -602326,6 +602487,14 @@ "633c5c00392711f1fe1911a07f9cf53c3cd702e9", "reftest" ], + "css/css-text-decor/parsing/text-decoration-line-invalid.html": [ + "ec8d792c0a803dc726b01e762602b717befc5426", + "testharness" + ], + "css/css-text-decor/parsing/text-decoration-line-valid.html": [ + "3dd2d0c834ec8c7340b093a4c7a1272fb35a8a26", + "testharness" + ], "css/css-text-decor/reference/line-through-vertical-ref.html": [ "979512787a18ec9cbed7e9baf4b2cbd57ab99d33", "support" @@ -640455,7 +640624,7 @@ "testharness" ], "custom-elements/upgrading/Node-cloneNode.html": [ - "1a8786e914b9974ce114e9cda227823b3ea4a161", + "364cecd76debd8b9657392641267be5f0918e84d", "testharness" ], "custom-elements/upgrading/upgrading-enqueue-reactions.html": [ @@ -640463,7 +640632,7 @@ "testharness" ], "custom-elements/upgrading/upgrading-parser-created-element.html": [ - "7cc3b18aeefb8db55bcac7ac1cf321c1b5fff28c", + "0f7f95786dd11fd7013f057fd492cc9b7c924db9", "testharness" ], "device-memory/META.yml": [ @@ -645770,6 +645939,14 @@ "a913158982e04d34a79c662673a9754d457bb002", "testharness" ], + "feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html": [ + "2a6faefcd3bcab4efe6147fa142fc7369efafc81", + "testharness" + ], + "feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html.headers": [ + "8cba4d2df9c22809641984a0071aae947b4f91ae", + "support" + ], "feature-policy/experimental-features/resources/animation-property-height.js": [ "79316cb488fade6e877c690f90c74961ff944f52", "support" @@ -647842,6 +648019,14 @@ "b60ae206c78b3dd8e934dde7a7408fe4a7465932", "testharness" ], + "fetch/sec-metadata/prefetch.tentative.https.sub.html": [ + "2c230b8949688940067d9bbc151b12f59e20b517", + "testharness" + ], + "fetch/sec-metadata/preload.tentative.https.sub.html": [ + "2fdf65d5920d5851416679eee21fd9362ca3d532", + "testharness" + ], "fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html": [ "06b58744fb5a26f16f5ed8fc923f1c91989e2eb8", "testharness" @@ -647891,7 +648076,7 @@ "support" ], "fetch/sec-metadata/resources/record-header.py": [ - "f215b0165073ec6275308ed272cea763d9572a9e", + "683c0a6a0c4b6e32e06fce50aa8f6af19eacff76", "support" ], "fetch/sec-metadata/resources/sharedWorker.js": [ @@ -652330,6 +652515,10 @@ "17077dafd1ff38298b052aa17fcc1e1062a83baf", "testharness" ], + "html/dom/elements/global-attributes/dataset-binding.window.js": [ + "e0e85677d1d4c07533a5d8eaa6dc1268305fa0c6", + "testharness" + ], "html/dom/elements/global-attributes/dataset-delete.html": [ "1440118f6daa531d2bfde982c67676d22cffa197", "testharness" @@ -669295,7 +669484,7 @@ "support" ], "interfaces/FileAPI.idl": [ - "15b2e5582fee1c7fee29e7d20bb82b0ca901af73", + "b5b40296429646cfbe13110153f2e281201ba669", "support" ], "interfaces/IndexedDB.idl": [ @@ -682959,7 +683148,7 @@ "testharness" ], "pointerevents/pointerlock/pointerevent_coordinates_when_locked.html": [ - "2556e83da10d9b8ee36b8ebbe67d513597d2fe77", + "9dfd5e1764d33dfd1af7ee62af20b1e0424ac64b", "testharness" ], "pointerevents/pointerlock/pointerevent_movementxy-manual.html": [ @@ -683086,6 +683275,10 @@ "0d8ec33cae787ddd0ed22284ed0a955e312d505d", "testharness" ], + "portals/portal-activate-event-constructor.html": [ + "7263b121151f5b1331622c0c7007df49f90b6376", + "testharness" + ], "portals/portal-activate-event.html": [ "33d91e37d9d9ac77c5243a60b42ce841645d248e", "testharness" @@ -704503,7 +704696,7 @@ "support" ], "tools/manifest/download.py": [ - "e8f27e7ac100dad8d587a91d67e9a5f2ff0c3433", + "91ae664336e4c09ef165db25cf363e61fec3d603", "support" ], "tools/manifest/item.py": [ @@ -704515,7 +704708,7 @@ "support" ], "tools/manifest/manifest.py": [ - "bfe57c7823b26f778e81fb793a7cb9b0fdfd264a", + "8634b7089869fbbf9adb604909ebae09efdf36b3", "support" ], "tools/manifest/sourcefile.py": [ @@ -704542,20 +704735,20 @@ "18aa55a63a2695b3f3581e1b7eee5042f5cea051", "support" ], - "tools/manifest/tests/test_vcs.py": [ - "8124b9ac380d9e9826aa2d6493bb4802ae63372e", + "tools/manifest/tests/test_utils.py": [ + "1bdffb9b1fe0f10b6e49768fd3bdd502f8aeb3fd", "support" ], "tools/manifest/update.py": [ - "321cfebe2a605c9a50267129ed574127ed023634", + "f1a70930bb3377d86164767b71d985bad42c0104", "support" ], "tools/manifest/utils.py": [ - "a097ad5090e16aa1a43c8e43332f0761ecd6f240", + "c3456d96604cb31d83de3d0a31dd0e259893e22c", "support" ], "tools/manifest/vcs.py": [ - "cfb0ff27c364a5a66f85c264bbb4978ae56d9b5b", + "b63df4d0a8ae750a3a1edc7ee6c9eaa5fcc3718b", "support" ], "tools/py27-flake8.ini": [ @@ -713399,7 +713592,7 @@ "support" ], "webaudio/resources/audit.js": [ - "b7ca020161071437087c349c0e8b59dbf132f764", + "f3ce71911ac02d971157e31462b1c8d34f83f756", "support" ], "webaudio/resources/biquad-filters.js": [ @@ -713814,6 +714007,10 @@ "8194d1977ad452390efb870197057bcf48fad499", "testharness" ], + "webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html": [ + "d5bcbfe990cacbb09c3dc22334cd0620e66b9ced", + "testharness" + ], "webaudio/the-audio-api/the-audioworklet-interface/audioworkletglobalscope-sample-rate.https.html": [ "d87e35b571d75c0ff595ab023f4a54a420111523", "testharness" @@ -717583,7 +717780,7 @@ "support" ], "webstorage/set.window.js": [ - "479ad588910b907e6e9fe41d5080b744a22a54fe", + "228ce60296697a21520b8c635bd352ed1fbefb2c", "testharness" ], "webstorage/storage_builtins.html": [ @@ -720931,7 +721128,7 @@ "testharness" ], "webxr/xrSession_transfer_outputContext.https.html": [ - "69c52d2bfb4d8d942e233872b40c618accaad1b9", + "658cb322487df1af1f2333423ac8c223fdd8733c", "testharness" ], "workers/META.yml": [ 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 9721e582130..7f5a43ceb95 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 @@ -314,3 +314,24 @@ [Matching font-stretch: '90%' should prefer '110% 140%' over '120% 130%'] expected: FAIL + [Matching font-weight: '500' should prefer '400' over '350 399'] + expected: FAIL + + [Matching font-weight: '399' should prefer '500 501' over '502 510'] + expected: FAIL + + [Matching font-style: 'normal' should prefer 'oblique -50deg -20deg' over 'oblique -40deg -30deg'] + expected: FAIL + + [Matching font-weight: '500' should prefer '350 399' over '351 398'] + expected: FAIL + + [Matching font-style: 'oblique 21deg' should prefer 'oblique 20deg' over 'oblique 10deg'] + expected: FAIL + + [Matching font-style: 'oblique 10deg' should prefer 'oblique 5deg' over 'oblique 15deg 20deg'] + expected: FAIL + + [Matching font-style: 'oblique -10deg' should prefer 'oblique -50deg -40deg' over 'italic'] + expected: FAIL + diff --git a/tests/wpt/metadata/css/css-text-decor/parsing/text-decoration-line-valid.html.ini b/tests/wpt/metadata/css/css-text-decor/parsing/text-decoration-line-valid.html.ini new file mode 100644 index 00000000000..bb50604b3df --- /dev/null +++ b/tests/wpt/metadata/css/css-text-decor/parsing/text-decoration-line-valid.html.ini @@ -0,0 +1,7 @@ +[text-decoration-line-valid.html] + [e.style['text-decoration-line'\] = "spelling-error" should set the property value] + expected: FAIL + + [e.style['text-decoration-line'\] = "grammar-error" should set the property value] + expected: FAIL + diff --git a/tests/wpt/metadata/custom-elements/upgrading/Node-cloneNode.html.ini b/tests/wpt/metadata/custom-elements/upgrading/Node-cloneNode.html.ini index 47aab04dca8..4ef8083287b 100644 --- a/tests/wpt/metadata/custom-elements/upgrading/Node-cloneNode.html.ini +++ b/tests/wpt/metadata/custom-elements/upgrading/Node-cloneNode.html.ini @@ -2,3 +2,12 @@ [Node.prototype.cloneNode(false) must be able to clone as a customized built-in element when it has an inconsistent "is" attribute] expected: FAIL + [HTMLElement constructor must throw an TypeError when the top of the construction stack is marked AlreadyConstructed due to a custom element constructor constructing itself before super() call] + expected: FAIL + + [Upgrading a custom element must throw TypeError when the custom element's constructor returns another element] + expected: FAIL + + [HTMLElement constructor must throw an TypeError when the top of the construction stack is marked AlreadyConstructed due to a custom element constructor constructing itself after super() call] + expected: FAIL + diff --git a/tests/wpt/metadata/custom-elements/upgrading/upgrading-parser-created-element.html.ini b/tests/wpt/metadata/custom-elements/upgrading/upgrading-parser-created-element.html.ini new file mode 100644 index 00000000000..84e2a61bc0b --- /dev/null +++ b/tests/wpt/metadata/custom-elements/upgrading/upgrading-parser-created-element.html.ini @@ -0,0 +1,16 @@ +[upgrading-parser-created-element.html] + [Upgrading a custom element whose constructor returns a Text node must throw] + expected: FAIL + + [HTMLElement constructor must throw an TypeError when the top of the construction stack is marked AlreadyConstructed due to a custom element constructor constructing itself after super() call] + expected: FAIL + + [Upgrading a custom element whose constructor returns an Element must throw] + expected: FAIL + + [Upgrading a custom element must throw an TypeError when the returned element is not SameValue as the upgraded element] + expected: FAIL + + [HTMLElement constructor must throw an TypeError when the top of the construction stack is marked AlreadyConstructed due to a custom element constructor constructing itself before super() call] + 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 7b2de98b371..0a7d7b1f930 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: CRASH + expected: TIMEOUT [ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)] expected: FAIL @@ -96,9 +96,6 @@ [windows-1254: csisolatin5 (XMLHttpRequest)] expected: TIMEOUT - [windows-1254: iso8859-9 (XMLHttpRequest)] - expected: TIMEOUT - [windows-1254: iso-ir-148 (XMLHttpRequest)] expected: TIMEOUT @@ -126,5 +123,11 @@ [windows-1256: windows-1256 (XMLHttpRequest)] expected: TIMEOUT + [windows-1254: l5 (XMLHttpRequest)] + expected: TIMEOUT + + [windows-1254: latin5 (XMLHttpRequest)] + expected: TIMEOUT + [single-byte-decoder.html?TextDecoder] diff --git a/tests/wpt/metadata/fetch/sec-metadata/prefetch.tentative.https.sub.html.ini b/tests/wpt/metadata/fetch/sec-metadata/prefetch.tentative.https.sub.html.ini new file mode 100644 index 00000000000..ace4812ca1b --- /dev/null +++ b/tests/wpt/metadata/fetch/sec-metadata/prefetch.tentative.https.sub.html.ini @@ -0,0 +1,14 @@ +[prefetch.tentative.https.sub.html] + expected: TIMEOUT + [<link rel='prefetch' href='https://www.web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='prefetch' href='https://www.not-web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='prefetch' href='https://web-platform.test:8443/...'>] + expected: TIMEOUT + + [Browser supports prefetch.] + expected: FAIL + diff --git a/tests/wpt/metadata/fetch/sec-metadata/preload.tentative.https.sub.html.ini b/tests/wpt/metadata/fetch/sec-metadata/preload.tentative.https.sub.html.ini new file mode 100644 index 00000000000..326d86df3ef --- /dev/null +++ b/tests/wpt/metadata/fetch/sec-metadata/preload.tentative.https.sub.html.ini @@ -0,0 +1,59 @@ +[preload.tentative.https.sub.html] + expected: TIMEOUT + [<link rel='preload' as='fetch' href='https://web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='script' href='https://www.web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='font' href='https://www.not-web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='script' href='https://www.not-web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='track' href='https://www.not-web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='image' href='https://web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='image' href='https://www.not-web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='track' href='https://web-platform.test:8443/...'>] + expected: TIMEOUT + + [Browser supports preload.] + expected: FAIL + + [<link rel='preload' as='fetch' href='https://www.not-web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='style' href='https://www.web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='font' href='https://web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='fetch' href='https://www.web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='image' href='https://www.web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='font' href='https://www.web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='style' href='https://www.not-web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='script' href='https://web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='track' href='https://www.web-platform.test:8443/...'>] + expected: TIMEOUT + + [<link rel='preload' as='style' href='https://web-platform.test:8443/...'>] + expected: TIMEOUT + diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini deleted file mode 100644 index dc2e45516de..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[traverse_the_history_5.html] - [Multiple history traversals, last would be aborted] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/the-window-object/closed-attribute.window.js.ini b/tests/wpt/metadata/html/browsers/the-window-object/closed-attribute.window.js.ini index ede7a979848..0a61dc7e11e 100644 --- a/tests/wpt/metadata/html/browsers/the-window-object/closed-attribute.window.js.ini +++ b/tests/wpt/metadata/html/browsers/the-window-object/closed-attribute.window.js.ini @@ -1,5 +1,4 @@ [closed-attribute.window.html] - expected: CRASH [closed and cross-site nested browsing context] expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-binding.window.js.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-binding.window.js.ini new file mode 100644 index 00000000000..19996050bff --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-binding.window.js.ini @@ -0,0 +1,13 @@ +[dataset-binding.window.html] + [Setting property for key x with accessor property on prototype] + expected: FAIL + + [Setting property for key 9 with accessor property on prototype] + expected: FAIL + + [Getting property descriptor for key 9] + expected: FAIL + + [Getting property descriptor for key x] + expected: FAIL + diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini deleted file mode 100644 index 8cc42056d34..00000000000 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/non-active-document.html.ini +++ /dev/null @@ -1,10 +0,0 @@ -[non-active-document.html] - [DOMParser] - expected: FAIL - - [createHTMLDocument] - expected: FAIL - - [<template>] - expected: FAIL - diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini deleted file mode 100644 index 6cf9d13975c..00000000000 --- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini +++ /dev/null @@ -1,4 +0,0 @@ -[iframe_005.html] - [document.write external script into iframe write back into parent] - expected: FAIL - 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 b6e408b9b86..6c08b446ac6 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,5 +1,4 @@ [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/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 66bd350083b..a56bad443a2 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,4 +1,5 @@ [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/metadata/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html.ini new file mode 100644 index 00000000000..289bde2ec04 --- /dev/null +++ b/tests/wpt/metadata/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html.ini @@ -0,0 +1,2 @@ +[audioworklet-suspend.https.html] + expected: ERROR diff --git a/tests/wpt/metadata/webstorage/set.window.js.ini b/tests/wpt/metadata/webstorage/set.window.js.ini index 687d23b09d1..e54c1a810ff 100644 --- a/tests/wpt/metadata/webstorage/set.window.js.ini +++ b/tests/wpt/metadata/webstorage/set.window.js.ini @@ -5,3 +5,9 @@ [Setting property for key x on sessionStorage with accessor property on prototype] expected: FAIL + [Setting property for key 9 on localStorage with accessor property on prototype] + expected: FAIL + + [Setting property for key 9 on sessionStorage with accessor property on prototype] + 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 deleted file mode 100644 index dbea4f293ad..00000000000 --- a/tests/wpt/mozilla/meta/css/transition_calc_implicit.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[transition_calc_implicit.html] - expected: TIMEOUT diff --git a/tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js new file mode 100644 index 00000000000..b72427fd5cf --- /dev/null +++ b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-array-buffer.any.js @@ -0,0 +1,34 @@ +// META: title=Blob Array Buffer +// META: script=../support/Blob.js +'use strict'; + +promise_test(async () => { + const input_arr = new TextEncoder().encode("PASS"); + const blob = new Blob([input_arr]); + const array_buffer = await blob.arrayBuffer(); + assert_true(array_buffer instanceof ArrayBuffer); + assert_equals_typed_array(new Uint8Array(array_buffer), input_arr); +}, "Blob.arrayBuffer()") + +promise_test(async () => { + const input_arr = new TextEncoder().encode(""); + const blob = new Blob([input_arr]); + const array_buffer = await blob.arrayBuffer(); + assert_true(array_buffer instanceof ArrayBuffer); + assert_equals_typed_array(new Uint8Array(array_buffer), input_arr); +}, "Blob.arrayBuffer() empty Blob data") + +promise_test(async () => { + const input_arr = new TextEncoder().encode("\u08B8\u000a"); + const blob = new Blob([input_arr]); + const array_buffer = await blob.arrayBuffer(); + assert_equals_typed_array(new Uint8Array(array_buffer), input_arr); +}, "Blob.arrayBuffer() non-ascii input") + +promise_test(async () => { + const input_arr = [8, 241, 48, 123, 151]; + const typed_arr = new Uint8Array(input_arr); + const blob = new Blob([typed_arr]); + const array_buffer = await blob.arrayBuffer(); + assert_equals_typed_array(new Uint8Array(array_buffer), typed_arr); +}, "Blob.arrayBuffer() non-unicode input") diff --git a/tests/wpt/web-platform-tests/FileAPI/blob/Blob-stream.any.js b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-stream.any.js new file mode 100644 index 00000000000..894f09f8ece --- /dev/null +++ b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-stream.any.js @@ -0,0 +1,50 @@ +// META: title=Blob Stream +// META: script=../support/Blob.js +'use strict'; + +// Takes in a ReadableStream and reads from it until it is done, returning +// an array that contains the results of each read operation +async function read_all_chunks(stream) { + assert_true(stream instanceof ReadableStream); + assert_true('getReader' in stream); + const reader = stream.getReader(); + + assert_true('read' in reader); + let read_value = await reader.read(); + + let out = []; + let i = 0; + while (!read_value.done) { + for (let val of read_value.value) { + out[i++] = val; + } + read_value = await reader.read(); + } + return out; +} + +promise_test(async () => { + const blob = new Blob(["PASS"]); + const stream = await blob.stream() + const chunks = await read_all_chunks(stream); + for (let [index, value] of chunks.entries()) { + assert_equals(value, "PASS".charCodeAt(index)); + } +}, "Blob.stream()") + +promise_test(async () => { + const blob = new Blob(); + const stream = await blob.stream() + const chunks = await read_all_chunks(stream); + + assert_array_equals(chunks, []); +}, "Blob.stream() empty Blob") + +promise_test(async () => { + const input_arr = [8, 241, 48, 123, 151]; + const typed_arr = new Uint8Array(input_arr); + const blob = new Blob([typed_arr]); + const stream = await blob.stream() + const chunks = await read_all_chunks(stream); + assert_array_equals(chunks, input_arr) +}, "Blob.stream() non-unicode input") diff --git a/tests/wpt/web-platform-tests/FileAPI/blob/Blob-text.any.js b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-text.any.js new file mode 100644 index 00000000000..960c9605462 --- /dev/null +++ b/tests/wpt/web-platform-tests/FileAPI/blob/Blob-text.any.js @@ -0,0 +1,52 @@ +// META: title=Blob Text +// META: script=../support/Blob.js +'use strict'; + +promise_test(async () => { + const blob = new Blob(["PASS"]); + const text = await blob.text(); + assert_equals(text, "PASS"); +}, "Blob.text()") + +promise_test(async () => { + const blob = new Blob(); + const text = await blob.text(); + assert_equals(text, ""); +}, "Blob.text() empty blob data") + +promise_test(async () => { + const blob = new Blob(["P", "A", "SS"]); + const text = await blob.text(); + assert_equals(text, "PASS"); +}, "Blob.text() multi-element array in constructor") + +promise_test(async () => { + const non_unicode = "\u0061\u030A"; + const input_arr = new TextEncoder().encode(non_unicode); + const blob = new Blob([input_arr]); + const text = await blob.text(); + assert_equals(text, non_unicode); +}, "Blob.text() non-unicode") + +promise_test(async () => { + const blob = new Blob(["PASS"], { type: "text/plain;charset=utf-16le" }); + const text = await blob.text(); + assert_equals(text, "PASS"); +}, "Blob.text() different charset param in type option") + +promise_test(async () => { + const non_unicode = "\u0061\u030A"; + const input_arr = new TextEncoder().encode(non_unicode); + const blob = new Blob([input_arr], { type: "text/plain;charset=utf-16le" }); + const text = await blob.text(); + assert_equals(text, non_unicode); +}, "Blob.text() different charset param with non-ascii input") + +promise_test(async () => { + const input_arr = new Uint8Array([192, 193, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255]); + const blob = new Blob([input_arr]); + const text = await blob.text(); + assert_equals(text, "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd" + + "\ufffd\ufffd\ufffd\ufffd"); +}, "Blob.text() invalid utf-8 input") diff --git a/tests/wpt/web-platform-tests/FileAPI/support/Blob.js b/tests/wpt/web-platform-tests/FileAPI/support/Blob.js index 1d66f23a604..04069acd3cc 100644 --- a/tests/wpt/web-platform-tests/FileAPI/support/Blob.js +++ b/tests/wpt/web-platform-tests/FileAPI/support/Blob.js @@ -1,3 +1,5 @@ +'use strict' + function test_blob(fn, expectations) { var expected = expectations.expected, type = expectations.type, @@ -47,3 +49,22 @@ function test_blob_binary(fn, expectations) { fr.readAsArrayBuffer(blob); }); } + +// Assert that two TypedArray objects have the same byte values +self.assert_equals_typed_array = (array1, array2) => { + const [view1, view2] = [array1, array2].map((array) => { + assert_true(array.buffer instanceof ArrayBuffer, + 'Expect input ArrayBuffers to contain field `buffer`'); + return new DataView(array.buffer, array.byteOffset, array.byteLength); + }); + + assert_equals(view1.byteLength, view2.byteLength, + 'Expect both arrays to be of the same byte length'); + + const byteLength = view1.byteLength; + + for (let i = 0; i < byteLength; ++i) { + assert_equals(view1.getUint8(i), view2.getUint8(i), + `Expect byte at buffer position ${i} to be equal`); + } +} diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/parsing/text-decoration-line-invalid.html b/tests/wpt/web-platform-tests/css/css-text-decor/parsing/text-decoration-line-invalid.html new file mode 100644 index 00000000000..ec8d792c0a8 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/parsing/text-decoration-line-invalid.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text Decoration Test: Parsing text-decoration-line with invalid values</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-line-property"> +<meta name="assert" content="text-decoration-line supports only the grammar 'none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<script> +test_invalid_value("text-decoration-line", "auto"); +test_invalid_value("text-decoration-line", "null"); +test_invalid_value("text-decoration-line", "noone"); +test_invalid_value("text-decoration-line", "under-line"); +test_invalid_value("text-decoration-line", "over-line"); +test_invalid_value("text-decoration-line", "linethrough"); +test_invalid_value("text-decoration-line", "none underline"); +test_invalid_value("text-decoration-line", "none spelling-error"); +test_invalid_value("text-decoration-line", "underline underline"); +test_invalid_value("text-decoration-line", "underline none overline"); +test_invalid_value("text-decoration-line", "blink line-through blink"); +test_invalid_value("text-decoration-line", "spelling-error overline"); +test_invalid_value("text-decoration-line", "spelling-error grammar-error"); +test_invalid_value("text-decoration-line", "blink underline line-through grammar-error"); +</script> diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/parsing/text-decoration-line-valid.html b/tests/wpt/web-platform-tests/css/css-text-decor/parsing/text-decoration-line-valid.html new file mode 100644 index 00000000000..3dd2d0c834e --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-text-decor/parsing/text-decoration-line-valid.html @@ -0,0 +1,86 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Text Decoration Test: Parsing text-decoration-line with valid values</title> +<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> +<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-line-property"> +<meta name="assert" content="text-decoration-line supports the full grammar 'none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<script> +// none +test_valid_value("text-decoration-line", "none"); + +// underline || overline || line-through || blink +test_valid_value("text-decoration-line", "underline"); +test_valid_value("text-decoration-line", "overline"); +test_valid_value("text-decoration-line", "line-through"); +test_valid_value("text-decoration-line", "blink"); +test_valid_value("text-decoration-line", "underline overline"); +test_valid_value("text-decoration-line", "overline underline", "underline overline"); +test_valid_value("text-decoration-line", "underline line-through"); +test_valid_value("text-decoration-line", "line-through underline", "underline line-through"); +test_valid_value("text-decoration-line", "underline blink"); +test_valid_value("text-decoration-line", "blink underline", "underline blink"); +test_valid_value("text-decoration-line", "overline line-through"); +test_valid_value("text-decoration-line", "line-through overline", "overline line-through"); +test_valid_value("text-decoration-line", "overline blink"); +test_valid_value("text-decoration-line", "blink overline", "overline blink"); +test_valid_value("text-decoration-line", "line-through blink"); +test_valid_value("text-decoration-line", "blink line-through", "line-through blink"); +test_valid_value("text-decoration-line", "underline overline line-through"); +test_valid_value("text-decoration-line", "underline line-through overline", "underline overline line-through"); +test_valid_value("text-decoration-line", "overline underline line-through", "underline overline line-through"); +test_valid_value("text-decoration-line", "overline line-through underline", "underline overline line-through"); +test_valid_value("text-decoration-line", "line-through underline overline", "underline overline line-through"); +test_valid_value("text-decoration-line", "line-through overline underline", "underline overline line-through"); +test_valid_value("text-decoration-line", "underline overline blink"); +test_valid_value("text-decoration-line", "underline blink overline", "underline overline blink"); +test_valid_value("text-decoration-line", "overline underline blink", "underline overline blink"); +test_valid_value("text-decoration-line", "overline blink underline", "underline overline blink"); +test_valid_value("text-decoration-line", "blink underline overline", "underline overline blink"); +test_valid_value("text-decoration-line", "blink overline underline", "underline overline blink"); +test_valid_value("text-decoration-line", "underline line-through blink"); +test_valid_value("text-decoration-line", "underline blink line-through", "underline line-through blink"); +test_valid_value("text-decoration-line", "line-through underline blink", "underline line-through blink"); +test_valid_value("text-decoration-line", "line-through blink underline", "underline line-through blink"); +test_valid_value("text-decoration-line", "blink underline line-through", "underline line-through blink"); +test_valid_value("text-decoration-line", "blink line-through underline", "underline line-through blink"); +test_valid_value("text-decoration-line", "overline line-through blink"); +test_valid_value("text-decoration-line", "overline blink line-through", "overline line-through blink"); +test_valid_value("text-decoration-line", "line-through overline blink", "overline line-through blink"); +test_valid_value("text-decoration-line", "line-through blink overline", "overline line-through blink"); +test_valid_value("text-decoration-line", "blink overline line-through", "overline line-through blink"); +test_valid_value("text-decoration-line", "blink line-through overline", "overline line-through blink"); +test_valid_value("text-decoration-line", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "underline overline blink line-through", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "underline line-through overline blink", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "underline line-through blink overline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "underline blink overline line-through", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "underline blink line-through overline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "overline underline line-through blink", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "overline underline blink line-through", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "overline line-through underline blink", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "overline line-through blink underline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "overline blink underline line-through", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "overline blink line-through underline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "line-through underline overline blink", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "line-through underline blink overline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "line-through overline underline blink", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "line-through overline blink underline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "line-through blink underline overline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "line-through blink overline underline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "blink underline overline line-through", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "blink underline line-through overline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "blink overline underline line-through", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "blink overline line-through underline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "blink line-through underline overline", "underline overline line-through blink"); +test_valid_value("text-decoration-line", "blink line-through overline underline", "underline overline line-through blink"); + +// spelling-error +test_valid_value("text-decoration-line", "spelling-error"); + +// grammar-error +test_valid_value("text-decoration-line", "grammar-error"); + +</script> diff --git a/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html b/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html index 1a8786e914b..364cecd76de 100644 --- a/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html +++ b/tests/wpt/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html @@ -165,8 +165,8 @@ test(function () { var uncaughtError; window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; } instance.cloneNode(false); - assert_equals(uncaughtError.name, 'InvalidStateError'); -}, 'HTMLElement constructor must throw an InvalidStateError when the top of the construction stack is marked AlreadyConstructed' + assert_equals(uncaughtError.name, 'TypeError'); +}, 'HTMLElement constructor must throw an TypeError when the top of the construction stack is marked AlreadyConstructed' + ' due to a custom element constructor constructing itself after super() call'); test(function () { @@ -183,8 +183,8 @@ test(function () { var uncaughtError; window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; } instance.cloneNode(false); - assert_equals(uncaughtError.name, 'InvalidStateError'); -}, 'HTMLElement constructor must throw an InvalidStateError when the top of the construction stack is marked AlreadyConstructed' + assert_equals(uncaughtError.name, 'TypeError'); +}, 'HTMLElement constructor must throw an TypeError when the top of the construction stack is marked AlreadyConstructed' + ' due to a custom element constructor constructing itself before super() call'); test(function () { @@ -203,8 +203,8 @@ test(function () { var uncaughtError; window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; } instance.cloneNode(false); - assert_equals(uncaughtError.name, 'InvalidStateError'); -}, 'Upgrading a custom element must throw InvalidStateError when the custom element\'s constructor returns another element'); + assert_equals(uncaughtError.name, 'TypeError'); +}, 'Upgrading a custom element must throw TypeError when the custom element\'s constructor returns another element'); test(function () { var instance = document.createElement('my-custom-element-throw-exception'); diff --git a/tests/wpt/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html b/tests/wpt/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html index 7cc3b18aeef..0f7f95786dd 100644 --- a/tests/wpt/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html +++ b/tests/wpt/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html @@ -15,6 +15,8 @@ <instantiates-itself-before-super></instantiates-itself-before-super> <my-other-element id="instance"></my-other-element> <my-other-element id="otherInstance"></my-other-element> +<not-an-element></not-an-element> +<not-an-html-element></not-an-html-element> <script> setup({allow_uncaught_exception:true}); @@ -48,8 +50,8 @@ test(function () { var uncaughtError; window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; } customElements.define('instantiates-itself-after-super', InstantiatesItselfAfterSuper); - assert_equals(uncaughtError.name, 'InvalidStateError'); -}, 'HTMLElement constructor must throw an InvalidStateError when the top of the construction stack is marked AlreadyConstructed' + assert_equals(uncaughtError.name, 'TypeError'); +}, 'HTMLElement constructor must throw an TypeError when the top of the construction stack is marked AlreadyConstructed' + ' due to a custom element constructor constructing itself after super() call'); test(function () { @@ -64,8 +66,8 @@ test(function () { var uncaughtError; window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; } customElements.define('instantiates-itself-before-super', InstantiatesItselfBeforeSuper); - assert_equals(uncaughtError.name, 'InvalidStateError'); -}, 'HTMLElement constructor must throw an InvalidStateError when the top of the construction stack is marked AlreadyConstructed' + assert_equals(uncaughtError.name, 'TypeError'); +}, 'HTMLElement constructor must throw an TypeError when the top of the construction stack is marked AlreadyConstructed' + ' due to a custom element constructor constructing itself before super() call'); test(function () { @@ -85,12 +87,38 @@ test(function () { var uncaughtError; window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; } customElements.define('my-other-element', MyOtherElement); - assert_equals(uncaughtError.name, 'InvalidStateError'); + assert_equals(uncaughtError.name, 'TypeError'); assert_true(document.createElement('my-other-element') instanceof MyOtherElement, 'Upgrading of custom elements must happen after the definition was added to the registry.'); -}, 'Upgrading a custom element must throw an InvalidStateError when the returned element is not SameValue as the upgraded element'); +}, 'Upgrading a custom element must throw an TypeError when the returned element is not SameValue as the upgraded element'); + +test(() => { + class NotAnElement extends HTMLElement { + constructor() { + return new Text(); + } + } + + let uncaughtError; + window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; } + customElements.define("not-an-element", NotAnElement); + assert_equals(uncaughtError.name, "TypeError"); +}, "Upgrading a custom element whose constructor returns a Text node must throw"); + +test(() => { + class NotAnHTMLElement extends HTMLElement { + constructor() { + return document.createElementNS("", "test"); + } + } + + let uncaughtError; + window.onerror = function (message, url, lineNumber, columnNumber, error) { uncaughtError = error; return true; } + customElements.define("not-an-html-element", NotAnHTMLElement); + assert_equals(uncaughtError.name, "TypeError"); +}, "Upgrading a custom element whose constructor returns an Element must throw"); </script> </body> diff --git a/tests/wpt/web-platform-tests/feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html b/tests/wpt/web-platform-tests/feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html new file mode 100644 index 00000000000..2a6faefcd3b --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html @@ -0,0 +1,53 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/feature-policy/experimental-features/resources/common.js"></script> +<style> +html, body { + height: 100%; + width: 100%; +} + +iframe { + width: 400px; + height: 400px; + margin: 10px; +} + +.spacer { + width: 100%; + height: 10000px; +} +</style> +<div class="spacer"></div> +<script> + let load_timeout = 600; // ms + let expected_timeout_msg = false; + + let cross_origin_url = + "http://{{hosts[alt][www]}}:{{ports[http][0]}}/" + + "feature-policy/experimental-features/resources/lazyload-contents.html"; + + window.scrollTo(0, 0); + + // Verify that when 'loading-frame-default-eager' policy is disabled, the + // loading attribute "auto" leads to lazy loading. + promise_test(async(t) => { + // Add a frame with load="off". + let frame_loading_auto = createIframe(document.body, { + id: "auto", + // Sets the "loading" attribute to "auto". + loading: "auto", + src: `${cross_origin_url}?id=auto` + }); + // Sanity-check: The frame is not visible. + assert_greater_than( + frame_loading_auto.getBoundingClientRect().top, + window.innerHeight * 2, + "Unexpected position for <iframe> with ID 'auto'."); + let msg_or_timeout = + await waitForMessageOrTimeout(t, "auto", load_timeout); + assert_false(msg_or_timeout, "Expected the frame not to load."); + }, "When 'loading-frame-default-eager' feature is disabled, a frame with " + + "'loading attribute 'auto' will be lazily loaded."); +</script> diff --git a/tests/wpt/web-platform-tests/feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html.headers b/tests/wpt/web-platform-tests/feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html.headers new file mode 100644 index 00000000000..8cba4d2df9c --- /dev/null +++ b/tests/wpt/web-platform-tests/feature-policy/experimental-features/lazyload/loading-frame-default-eager-disabled-tentative.sub.html.headers @@ -0,0 +1 @@ +Feature-Policy: loading-frame-default-eager 'none' diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/prefetch.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/prefetch.tentative.https.sub.html new file mode 100644 index 00000000000..2c230b89496 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/prefetch.tentative.https.sub.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/fetch/sec-metadata/resources/helper.js></script> +<script src=/common/utils.js></script> +<body></body> +<script> + test(t => { + assert_true(document.createElement('link').relList.supports('prefetch')); + }, "Browser supports prefetch."); + + function create_test(host, expected) { + async_test(t => { + let nonce = token(); + let key = "prefetch" + nonce; + + let e = document.createElement('link'); + e.rel = "prefetch"; + e.href = `https://${host}/fetch/sec-metadata/resources/record-header.py?file=${key}`; + e.setAttribute("crossorigin", "crossorigin"); + e.onload = t.step_func(e => { + fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key) + .then(t.step_func(response => response.text())) + .then(t.step_func_done(text => assert_header_equals(text, expected))) + .catch(t.unreached_func("Fetching and verifying the results should succeed.")); + }); + e.onerror = t.unreached_func(); + + document.head.appendChild(e); + }, `<link rel='prefetch' href='https://${host}/...'>`); + } + + create_test("{{host}}:{{ports[https][0]}}", {"dest":"empty", "site":"same-origin", "user":"", "mode": "cors"}); + create_test("{{hosts[][www]}}:{{ports[https][0]}}", {"dest":"empty", "site":"same-site", "user":"", "mode": "cors"}); + create_test("{{hosts[alt][www]}}:{{ports[https][0]}}", {"dest":"empty", "site":"cross-site", "user":"", "mode": "cors"}); +</script> diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/preload.tentative.https.sub.html b/tests/wpt/web-platform-tests/fetch/sec-metadata/preload.tentative.https.sub.html new file mode 100644 index 00000000000..2fdf65d5920 --- /dev/null +++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/preload.tentative.https.sub.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=/fetch/sec-metadata/resources/helper.js></script> +<script src=/common/utils.js></script> +<body></body> +<script> + test(t => { + assert_true(document.createElement('link').relList.supports('preload')); + }, "Browser supports preload."); + + function create_test(host, as, expected) { + async_test(t => { + let nonce = token(); + let key = as + nonce; + + let e = document.createElement('link'); + e.rel = "preload"; + e.href = `https://${host}/fetch/sec-metadata/resources/record-header.py?file=${key}`; + e.setAttribute("crossorigin", "crossorigin"); + if (as !== undefined) { + e.setAttribute("as", as); + } + e.onload = e.onerror = t.step_func_done(e => { + fetch("/fetch/sec-metadata/resources/record-header.py?retrieve=true&file=" + key) + .then(t.step_func(response => response.text())) + .then(t.step_func(text => assert_header_equals(text, expected))) + .then(t.step_func_done(_ => resolve())) + .catch(t.unreached_func()); + }); + + document.head.appendChild(e); + }, `<link rel='preload' as='${as}' href='https://${host}/...'>`); + } + + let as_tests = [ + [ "fetch", "empty" ], + [ "font", "font" ], + [ "image", "image" ], + [ "script", "script" ], + [ "style", "style" ], + [ "track", "track" ], + ]; + + as_tests.forEach(item => { + create_test("{{host}}:{{ports[https][0]}}", item[0], {"dest":item[1], "site":"same-origin", "user":"", "mode": "cors"}); + create_test("{{hosts[][www]}}:{{ports[https][0]}}", item[0], {"dest":item[1], "site":"same-site", "user":"", "mode": "cors"}); + create_test("{{hosts[alt][www]}}:{{ports[https][0]}}", item[0], {"dest":item[1], "site":"cross-site", "user":"", "mode": "cors"}); + }); +</script> diff --git a/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/record-header.py b/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/record-header.py index f215b016507..683c0a6a0c4 100644 --- a/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/record-header.py +++ b/tests/wpt/web-platform-tests/fetch/sec-metadata/resources/record-header.py @@ -54,6 +54,14 @@ def main(request, response): if key.startswith("serviceworker"): response.headers.set("Content-Type", "application/javascript") + ## Add a valid image Content-Type ## + if key.startswith("image"): + response.headers.set("Content-Type", "image/png") + file = open(os.path.join(request.doc_root, "media", "1x1-green.png"), "r") + image = file.read() + file.close() + return image + ## Return a valid .vtt content for the <track> tag ## if key.startswith("track"): return "WEBVTT" diff --git a/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/dataset-binding.window.js b/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/dataset-binding.window.js new file mode 100644 index 00000000000..e0e85677d1d --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/dataset-binding.window.js @@ -0,0 +1,45 @@ +[9, "x"].forEach(function(key) { + test(function() { + var element = document.createElement("div"); + var dataset = element.dataset; + + var value = "value for " + this.name; + + assert_equals(dataset[key], undefined); + + element.setAttribute("data-" + key, value); + assert_equals(element.getAttribute("data-" + key), value); + assert_equals(dataset[key], value); + + var propdesc = Object.getOwnPropertyDescriptor(dataset, key); + assert_not_equals(propdesc, undefined); + assert_equals(propdesc.value, value); + assert_true(propdesc.writable); + assert_true(propdesc.enumerable); + assert_true(propdesc.configurable); + }, "Getting property descriptor for key " + key); + + test(function() { + var element = document.createElement("div"); + var dataset = element.dataset; + + var proto = "proto getter for " + this.name; + var calledSetter = []; + Object.defineProperty(DOMStringMap.prototype, key, { + "get": function() { return proto; }, + "set": this.unreached_func("Should not call [[Set]] on prototype"), + "configurable": true, + }); + this.add_cleanup(function() { + delete DOMStringMap.prototype[key]; + }); + + var value = "value for " + this.name; + + assert_equals(dataset[key], proto); + assert_equals(element.getAttribute("data-" + key), null); + assert_equals(dataset[key] = value, value); + assert_equals(dataset[key], value); + assert_equals(element.getAttribute("data-" + key), value); + }, "Setting property for key " + key + " with accessor property on prototype"); +}); diff --git a/tests/wpt/web-platform-tests/interfaces/FileAPI.idl b/tests/wpt/web-platform-tests/interfaces/FileAPI.idl index 15b2e5582fe..b5b40296429 100644 --- a/tests/wpt/web-platform-tests/interfaces/FileAPI.idl +++ b/tests/wpt/web-platform-tests/interfaces/FileAPI.idl @@ -15,6 +15,11 @@ interface Blob { Blob slice(optional [Clamp] long long start, optional [Clamp] long long end, optional DOMString contentType); + + // read from the Blob. + [NewObject] ReadableStream stream(); + [NewObject] Promise<USVString> text(); + [NewObject] Promise<ArrayBuffer> arrayBuffer(); }; enum EndingType { "transparent", "native" }; diff --git a/tests/wpt/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html b/tests/wpt/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html index 2556e83da10..9dfd5e1764d 100644 --- a/tests/wpt/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html +++ b/tests/wpt/web-platform-tests/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html @@ -73,15 +73,15 @@ }); var actions = new test_driver.Actions(); - actions.pointerMove(/* x = */ 0, /* y = */ 0, {origin: target}).pointerDown(); + actions.pointerMove(/* x = */ 0, /* y = */ 0, {origin: div1}).pointerDown(); - pos_x = target.getBoundingClientRect().x + target.offsetWidth / 2; - pos_y = target.getBoundingClientRect().y + target.offsetHeight / 2; + pos_x = div1.offsetWidth / 2; + pos_y = div1.offsetHeight / 2; for (var i = 0; i < 10; i++) { // Alternatively move left/right and up/down. pos_x += ((-1)**i) * i * 10; pos_y -= ((-1)**i) * i * 10; - actions.pointerMove(pos_x, pos_y); + actions.pointerMove(pos_x, pos_y, {origin: div1}); } actions.pointerUp().send(); } diff --git a/tests/wpt/web-platform-tests/portals/portal-activate-event-constructor.html b/tests/wpt/web-platform-tests/portals/portal-activate-event-constructor.html new file mode 100644 index 00000000000..7263b121151 --- /dev/null +++ b/tests/wpt/web-platform-tests/portals/portal-activate-event-constructor.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +test(() => { + // Even though UA-generated portalactivate events are different, the + // properties supplied should be used. + const e = new PortalActivateEvent("eventtype", { bubbles: true, cancelable: true }); + assert_equals(e.type, "eventtype"); + assert_true(e.bubbles); + assert_true(e.cancelable); + assert_equals(null, e.data); +}, "It should be possible to construct a PortalActivateEvent with a dictionary"); + +test(() => { + const data = {}; + const e = new PortalActivateEvent("portalactivate", { data }); + assert_equals(data, e.data); +}, "A PortalActivateEvent should expose exactly the data object supplied in the original realm"); + +test(() => { + const e = new PortalActivateEvent("portalactivate"); + assert_throws("InvalidStateError", () => e.adoptPredecessor()); +}, "Invoking adoptPredecessor on a synthetic PortalActivateEvent should throw"); +</script> diff --git a/tests/wpt/web-platform-tests/tools/manifest/download.py b/tests/wpt/web-platform-tests/tools/manifest/download.py index e8f27e7ac10..91ae664336e 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/download.py +++ b/tests/wpt/web-platform-tests/tools/manifest/download.py @@ -15,7 +15,7 @@ try: except ImportError: zstandard = None -from .vcs import Git +from .utils import git from . import log @@ -40,9 +40,9 @@ def should_download(manifest_path, rebuild_time=timedelta(days=5)): def merge_pr_tags(repo_root, max_count=50): - git = Git.get_func(repo_root) + gitfunc = git(repo_root) tags = [] - for line in git("log", "--format=%D", "--max-count=%s" % max_count).split("\n"): + for line in gitfunc("log", "--format=%D", "--max-count=%s" % max_count).split("\n"): for ref in line.split(", "): if ref.startswith("tag: merge_pr_"): tags.append(ref[5:]) diff --git a/tests/wpt/web-platform-tests/tools/manifest/manifest.py b/tests/wpt/web-platform-tests/tools/manifest/manifest.py index bfe57c7823b..8634b708986 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/manifest.py +++ b/tests/wpt/web-platform-tests/tools/manifest/manifest.py @@ -470,7 +470,7 @@ def load_and_update(tests_root, rebuild=False, metadata_path=None, cache_root=None, - working_copy=False, + working_copy=True, types=None, meta_filters=None, write_manifest=True, diff --git a/tests/wpt/web-platform-tests/tools/manifest/tests/test_vcs.py b/tests/wpt/web-platform-tests/tools/manifest/tests/test_utils.py index 8124b9ac380..1bdffb9b1fe 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/tests/test_vcs.py +++ b/tests/wpt/web-platform-tests/tools/manifest/tests/test_utils.py @@ -3,7 +3,7 @@ import subprocess import mock -from .. import vcs +from .. import utils def test_git_for_path_no_git(): @@ -11,4 +11,4 @@ def test_git_for_path_no_git(): with mock.patch( "subprocess.check_output", side_effect=subprocess.CalledProcessError(1, "foo")): - assert vcs.Git.for_path(this_dir, "/", this_dir) is None + assert utils.git(this_dir) is None diff --git a/tests/wpt/web-platform-tests/tools/manifest/update.py b/tests/wpt/web-platform-tests/tools/manifest/update.py index 321cfebe2a6..f1a70930bb3 100755 --- a/tests/wpt/web-platform-tests/tools/manifest/update.py +++ b/tests/wpt/web-platform-tests/tools/manifest/update.py @@ -17,7 +17,7 @@ logger = get_logger() def update(tests_root, manifest, manifest_path=None, - working_copy=False, + working_copy=True, cache_root=None, rebuild=False): logger.warning("Deprecated; use manifest.load_and_update instead") @@ -41,8 +41,7 @@ def update_from_cli(**kwargs): kwargs["url_base"], update=True, rebuild=kwargs["rebuild"], - cache_root=kwargs["cache_root"], - working_copy=kwargs["work"]) + cache_root=kwargs["cache_root"]) def abs_path(path): @@ -59,9 +58,6 @@ def create_parser(): "-r", "--rebuild", action="store_true", default=False, help="Force a full rebuild of the manifest.") parser.add_argument( - "--work", action="store_true", default=False, - help="Build from the working tree rather than the latest commit") - parser.add_argument( "--url-base", action="store", default="/", help="Base url to use as the mount point for tests in this manifest.") parser.add_argument( diff --git a/tests/wpt/web-platform-tests/tools/manifest/utils.py b/tests/wpt/web-platform-tests/tools/manifest/utils.py index a097ad5090e..c3456d96604 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/utils.py +++ b/tests/wpt/web-platform-tests/tools/manifest/utils.py @@ -1,5 +1,6 @@ -import platform import os +import platform +import subprocess from six import BytesIO @@ -32,6 +33,27 @@ def to_os_path(path): return path.replace("/", os.path.sep) +def git(path): + def gitfunc(cmd, *args): + full_cmd = ["git", cmd] + list(args) + try: + return subprocess.check_output(full_cmd, cwd=path, stderr=subprocess.STDOUT) + except Exception as e: + if platform.uname()[0] == "Windows" and isinstance(e, WindowsError): + full_cmd[0] = "git.bat" + return subprocess.check_output(full_cmd, cwd=path, stderr=subprocess.STDOUT) + else: + raise + + try: + # this needs to be a command that fails if we aren't in a git repo + gitfunc("rev-parse", "--show-toplevel") + except (subprocess.CalledProcessError, OSError): + return None + else: + return gitfunc + + class ContextManagerBytesIO(BytesIO): def __enter__(self): return self diff --git a/tests/wpt/web-platform-tests/tools/manifest/vcs.py b/tests/wpt/web-platform-tests/tools/manifest/vcs.py index cfb0ff27c36..b63df4d0a8a 100644 --- a/tests/wpt/web-platform-tests/tools/manifest/vcs.py +++ b/tests/wpt/web-platform-tests/tools/manifest/vcs.py @@ -1,13 +1,10 @@ import json import os -import platform import stat -import subprocess from collections import deque -from six import iteritems - from .sourcefile import SourceFile +from .utils import git MYPY = False if MYPY: @@ -16,7 +13,7 @@ if MYPY: def get_tree(tests_root, manifest, manifest_path, cache_root, - working_copy=False, rebuild=False): + working_copy=True, rebuild=False): tree = None if cache_root is None: cache_root = os.path.join(tests_root, ".wptcache") @@ -27,11 +24,8 @@ def get_tree(tests_root, manifest, manifest_path, cache_root, cache_root = None if not working_copy: - tree = Git.for_path(tests_root, - manifest.url_base, - manifest_path=manifest_path, - cache_path=cache_root, - rebuild=rebuild) + raise ValueError("working_copy=False unsupported") + if tree is None: tree = FileSystem(tests_root, manifest.url_base, @@ -41,39 +35,9 @@ def get_tree(tests_root, manifest, manifest_path, cache_root, return tree -class Git(object): - def __init__(self, repo_root, url_base, cache_path, manifest_path=None, - rebuild=False): - self.root = repo_root - self.git = Git.get_func(repo_root) - self.url_base = url_base - # rebuild is a noop for now since we don't cache anything - - @staticmethod - def get_func(repo_path): - def git(cmd, *args): - full_cmd = ["git", cmd] + list(args) - try: - return subprocess.check_output(full_cmd, cwd=repo_path, stderr=subprocess.STDOUT) - except Exception as e: - if platform.uname()[0] == "Windows" and isinstance(e, WindowsError): - full_cmd[0] = "git.bat" - return subprocess.check_output(full_cmd, cwd=repo_path, stderr=subprocess.STDOUT) - else: - raise - return git - - @classmethod - def for_path(cls, path, url_base, cache_path, manifest_path=None, rebuild=False): - git = Git.get_func(path) - try: - # this needs to be a command that fails if we aren't in a git repo - git("rev-parse", "--show-toplevel") - except (subprocess.CalledProcessError, OSError): - return None - else: - return cls(path, url_base, cache_path, - manifest_path=manifest_path, rebuild=rebuild) +class GitHasher(object): + def __init__(self, path): + self.git = git(path) def _local_changes(self): """get a set of files which have changed between HEAD and working copy""" @@ -95,10 +59,6 @@ class Git(object): return changes - def _show_file(self, path): - path = os.path.relpath(os.path.abspath(path), self.root) - return self.git("show", "HEAD:%s" % path) - def hash_cache(self): # type: () -> Dict[str, Optional[str]] """ @@ -114,20 +74,6 @@ class Git(object): return hash_cache - def __iter__(self): - for rel_path, hash in iteritems(self.hash_cache()): - if hash is None: - contents = self._show_file(rel_path) - else: - contents = None - yield SourceFile(self.root, - rel_path, - self.url_base, - hash, - contents=contents), True - - def dump_caches(self): - pass class FileSystem(object): @@ -145,7 +91,7 @@ class FileSystem(object): self.path_filter = gitignore.PathFilter(self.root, extras=[".git/"], cache=self.ignore_cache) - git = Git.for_path(root, url_base, cache_path) + git = GitHasher(root) if git is not None: self.hash_cache = git.hash_cache() else: diff --git a/tests/wpt/web-platform-tests/webaudio/resources/audit.js b/tests/wpt/web-platform-tests/webaudio/resources/audit.js index b7ca0201610..f3ce71911ac 100644 --- a/tests/wpt/web-platform-tests/webaudio/resources/audit.js +++ b/tests/wpt/web-platform-tests/webaudio/resources/audit.js @@ -1210,6 +1210,18 @@ window.Audit = (function() { this._taskRunner._runNextTask(); } + // Runs |subTask| |time| milliseconds later. |setTimeout| is not allowed in + // WPT linter, so a thin wrapper around the harness's |step_timeout| is + // used here. + timeout(subTask, time) { + async_test((test) => { + test.step_timeout(() => { + subTask(); + test.done(); + }, time); + }); + } + isPassed() { return this._state === TaskState.FINISHED && this._result; } 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 new file mode 100644 index 00000000000..d5bcbfe990c --- /dev/null +++ b/tests/wpt/web-platform-tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> + <head> + <title> + Test if activation of worklet thread does not resume context rendering. + </title> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script src="/webaudio/resources/audit.js"></script> + </head> + <body> + <script id="layout-test-code"> + const audit = Audit.createTaskRunner(); + const context = new AudioContext(); + const filePath = 'processors/dummy-processor.js'; + + // 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 dummy = new AudioWorkletNode(context, 'dummy'); + dummy.connect(context.destination); + task.timeout(() => { + should(context.currentTime, 'context.currentTime') + .beEqualTo(suspendTime); + should(context.state, 'context.state').beEqualTo('suspended'); + task.done(); + }, 1000); + }); + + audit.run(); + </script> + </body> +</html> diff --git a/tests/wpt/web-platform-tests/webstorage/set.window.js b/tests/wpt/web-platform-tests/webstorage/set.window.js index 479ad588910..228ce602966 100644 --- a/tests/wpt/web-platform-tests/webstorage/set.window.js +++ b/tests/wpt/web-platform-tests/webstorage/set.window.js @@ -1,7 +1,8 @@ ["localStorage", "sessionStorage"].forEach(function(name) { [9, "x"].forEach(function(key) { test(function() { - var value = "value"; + var expected = "value for " + this.name; + var value = expected; var storage = window[name]; storage.clear(); @@ -9,13 +10,14 @@ assert_equals(storage[key], undefined); assert_equals(storage.getItem(key), null); assert_equals(storage[key] = value, value); - assert_equals(storage[key], "value"); - assert_equals(storage.getItem(key), "value"); + assert_equals(storage[key], expected); + assert_equals(storage.getItem(key), expected); }, "Setting property for key " + key + " on " + name); test(function() { + var expected = "value for " + this.name; var value = { - toString: function() { return "value"; } + toString: function() { return expected; } }; var storage = window[name]; @@ -24,79 +26,77 @@ assert_equals(storage[key], undefined); assert_equals(storage.getItem(key), null); assert_equals(storage[key] = value, value); - assert_equals(storage[key], "value"); - assert_equals(storage.getItem(key), "value"); + assert_equals(storage[key], expected); + assert_equals(storage.getItem(key), expected); }, "Setting property with toString for key " + key + " on " + name); test(function() { - Storage.prototype[key] = "proto"; + var proto = "proto for " + this.name; + Storage.prototype[key] = proto; this.add_cleanup(function() { delete Storage.prototype[key]; }); - var value = "value"; + var value = "value for " + this.name; var storage = window[name]; storage.clear(); - assert_equals(storage[key], "proto"); + assert_equals(storage[key], proto); assert_equals(storage.getItem(key), null); assert_equals(storage[key] = value, value); // Hidden because no [OverrideBuiltins]. - assert_equals(storage[key], "proto"); + assert_equals(storage[key], proto); assert_equals(Object.getOwnPropertyDescriptor(storage, key), undefined); - assert_equals(storage.getItem(key), "value"); + assert_equals(storage.getItem(key), value); }, "Setting property for key " + key + " on " + name + " with data property on prototype"); test(function() { - Storage.prototype[key] = "proto"; + var proto = "proto for " + this.name; + Storage.prototype[key] = proto; this.add_cleanup(function() { delete Storage.prototype[key]; }); - var value = "value"; + var value = "value for " + this.name; + var existing = "existing for " + this.name; var storage = window[name]; storage.clear(); - storage.setItem(key, "existing"); + storage.setItem(key, existing); // Hidden because no [OverrideBuiltins]. - assert_equals(storage[key], "proto"); + assert_equals(storage[key], proto); assert_equals(Object.getOwnPropertyDescriptor(storage, key), undefined); - assert_equals(storage.getItem(key), "existing"); + assert_equals(storage.getItem(key), existing); assert_equals(storage[key] = value, value); - assert_equals(storage[key], "proto"); + assert_equals(storage[key], proto); assert_equals(Object.getOwnPropertyDescriptor(storage, key), undefined); - assert_equals(storage.getItem(key), "value"); + assert_equals(storage.getItem(key), value); }, "Setting property for key " + key + " on " + name + " with data property on prototype and existing item"); test(function() { - var calledSetter = []; + var storage = window[name]; + storage.clear(); + + var proto = "proto getter for " + this.name; Object.defineProperty(Storage.prototype, key, { - "get": function() { return "proto getter"; }, - "set": function(v) { calledSetter.push(v); }, - configurable: true, + "get": function() { return proto; }, + "set": this.unreached_func("Should not call [[Set]] on prototype"), + "configurable": true, + }); + this.add_cleanup(function() { + delete Storage.prototype[key]; + delete storage[key]; + assert_false(key in storage); }); - this.add_cleanup(function() { delete Storage.prototype[key]; }); - - var value = "value"; - var storage = window[name]; - storage.clear(); + var value = "value for " + this.name; - assert_equals(storage[key], "proto getter"); + assert_equals(storage[key], proto); assert_equals(storage.getItem(key), null); assert_equals(storage[key] = value, value); // Property is hidden because no [OverrideBuiltins]. - if (typeof key === "number") { - // P is an array index: call through to OrdinarySetWithOwnDescriptor() - assert_array_equals(calledSetter, [value]); - assert_equals(storage[key], "proto getter"); - assert_equals(storage.getItem(key), null); - } else { - // P is not an array index: early return in [[Set]] step 2. - // https://github.com/heycam/webidl/issues/630 - assert_equals(storage[key], "proto getter"); - assert_equals(Object.getOwnPropertyDescriptor(storage, key), undefined); - assert_equals(storage.getItem(key), "value"); - } + assert_equals(storage[key], proto); + assert_equals(Object.getOwnPropertyDescriptor(storage, key), undefined); + assert_equals(storage.getItem(key), value); }, "Setting property for key " + key + " on " + name + " with accessor property on prototype"); }); }); diff --git a/tests/wpt/web-platform-tests/webxr/xrSession_transfer_outputContext.https.html b/tests/wpt/web-platform-tests/webxr/xrSession_transfer_outputContext.https.html index 69c52d2bfb4..658cb322487 100644 --- a/tests/wpt/web-platform-tests/webxr/xrSession_transfer_outputContext.https.html +++ b/tests/wpt/web-platform-tests/webxr/xrSession_transfer_outputContext.https.html @@ -3,40 +3,53 @@ <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <script src="resources/webxr_util.js"></script> + <canvas></canvas> <script> xr_promise_test( "Ensure that XRPresentationContexts are properly transfered between session", (t) => { return XRTest.simulateDeviceConnection({ supportsImmersive:false }) .then( (controller) => { - Promise.all([ + return Promise.all([ navigator.xr.requestSession({ mode: 'inline'}), navigator.xr.requestSession({ mode: 'inline'}) ]).then((sessions) => { - assert_not_equals(sessions[0], null); - assert_not_equals(sessions[1], null); + t.step(() => { + assert_not_equals(sessions[0], null); + assert_not_equals(sessions[1], null); + }); + const webglCanvas = document.getElementsByTagName('canvas')[0]; + let gl = webglCanvas.getContext('webgl', {xrCompatible: true}); let outputContext = getOutputContext(); sessions[0].updateRenderState({ - baseLayer: new XRWebGLLayer(session, gl), + baseLayer: new XRWebGLLayer(sessions[0], gl), outputContext: outputContext }); - sessions[0].requestAnimationFrame((time, xrFrame) => { - sessions[1].updateRenderState({ - baseLayer: new XRWebGLLayer(session, gl), - outputContext: outputContext - }); + return new Promise((resolve, reject) => { + sessions[0].requestAnimationFrame((time, xrFrame) => { + sessions[1].updateRenderState({ + baseLayer: new XRWebGLLayer(sessions[1], gl), + outputContext: outputContext + }); + + t.step(() => { + // outputContext reassignment should not happen until the next frame is processed. + assert_equals(sessions[0].renderState.outputContext, outputContext); + assert_equals(sessions[1].renderState.outputContext, null); + }); - // outputContext reassignment should not happen until the next frame is processed. - assert_equals(sessions[0].renderState.outputContext, outputContext); - assert_equals(sessions[1].renderState.outputContext, null); + sessions[1].requestAnimationFrame((time, xrFrame) => { + t.step(() => { + // Ensure the outputContext was properly reassigned from one context to the other. + assert_equals(sessions[0].renderState.outputContext, null); + assert_equals(sessions[1].renderState.outputContext, outputContext); + }); - sessions[1].requestAnimationFrame((time, xrFrame) => { - // Ensure the outputContext was properly reassigned from one context to the other. - assert_equals(sessions[0].renderState.outputContext, null); - assert_equals(sessions[1].renderState.outputContext, outputContext); + resolve(); + }); }); }); }); |