From 40c0b971f1de4a5da70e43f88a8414eb4d97551e Mon Sep 17 00:00:00 2001 From: WPT Sync Bot Date: Tue, 20 Mar 2018 21:09:12 -0400 Subject: [PATCH] Update web-platform-tests to revision 3a8328470d53c4501e31cec2775c4d33821c2275 --- tests/wpt/metadata/MANIFEST.json | 133 +++++++++++--- .../vh_not_refreshing_on_chrome.html.ini | 2 + .../parsing/filter-parsing-valid.html.ini | 12 ++ .../canvas/rapid-resizing.html.ini | 5 - .../shader-with-non-reserved-words.html.ini | 4 - tests/wpt/web-platform-tests/.travis.yml | 3 - .../IndexedDB/interfaces.any.js | 32 ++++ .../IndexedDB/interfaces.html | 61 ------- .../IndexedDB/interfaces.worker.js | 53 ------ .../shadow-disabled-sheet-001.html | 21 +++ .../shadow-fallback-dynamic-001.html | 2 +- .../shadow-fallback-dynamic-002.html | 2 +- .../shadow-fallback-dynamic-003.html | 2 +- .../shadow-fallback-dynamic-004.html | 2 +- .../shadow-fallback-dynamic-005.html | 2 +- .../shadow-root-insert-into-document.html | 18 ++ .../properties/pointer-events.html | 29 ++++ .../properties/resources/testsuite.js | 2 +- .../parsing/filter-parsing-invalid.html | 2 - .../parsing/filter-parsing-valid.html | 7 +- .../interfaces/web-share.idl | 7 +- tests/wpt/web-platform-tests/lint.whitelist | 1 + .../cache-storage/script-tests/cache-abort.js | 81 +++++++++ .../serviceworker/cache-abort.https.html | 9 + .../window/cache-abort.https.html | 8 + .../worker/cache-abort.https.html | 8 + .../streams/readable-byte-streams/general.js | 163 +++++++++++++----- .../tools/ci/check_stability.py | 19 +- .../wptrunner/executors/executormarionette.py | 4 +- .../executors/testharness_marionette.js | 24 +-- .../testharness_marionette_resume.js | 16 +- .../xhr/xmlhttprequest-closing-worker.html | 32 ++++ 32 files changed, 529 insertions(+), 237 deletions(-) create mode 100644 tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini delete mode 100644 tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html.ini create mode 100644 tests/wpt/web-platform-tests/IndexedDB/interfaces.any.js delete mode 100644 tests/wpt/web-platform-tests/IndexedDB/interfaces.html delete mode 100644 tests/wpt/web-platform-tests/IndexedDB/interfaces.worker.js create mode 100644 tests/wpt/web-platform-tests/css/css-scoping/shadow-disabled-sheet-001.html create mode 100644 tests/wpt/web-platform-tests/css/css-scoping/shadow-root-insert-into-document.html create mode 100644 tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/pointer-events.html create mode 100644 tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-abort.js create mode 100644 tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-abort.https.html create mode 100644 tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-abort.https.html create mode 100644 tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-abort.https.html create mode 100644 tests/wpt/web-platform-tests/xhr/xmlhttprequest-closing-worker.html diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 70ce52400766..90387ce6c8ad 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -125607,6 +125607,18 @@ {} ] ], + "css/css-scoping/shadow-disabled-sheet-001.html": [ + [ + "/css/css-scoping/shadow-disabled-sheet-001.html", + [ + [ + "/css/css-scoping/reference/green-box.html", + "==" + ] + ], + {} + ] + ], "css/css-scoping/shadow-fallback-dynamic-001.html": [ [ "/css/css-scoping/shadow-fallback-dynamic-001.html", @@ -125667,6 +125679,18 @@ {} ] ], + "css/css-scoping/shadow-root-insert-into-document.html": [ + [ + "/css/css-scoping/shadow-root-insert-into-document.html", + [ + [ + "/css/css-scoping/reference/green-box.html", + "==" + ] + ], + {} + ] + ], "css/css-scoping/slotted-with-pseudo-element.html": [ [ "/css/css-scoping/slotted-with-pseudo-element.html", @@ -291373,6 +291397,11 @@ {} ] ], + "service-workers/cache-storage/script-tests/cache-abort.js": [ + [ + {} + ] + ], "service-workers/cache-storage/script-tests/cache-add.js": [ [ {} @@ -305442,15 +305471,13 @@ {} ] ], - "IndexedDB/interfaces.html": [ + "IndexedDB/interfaces.any.js": [ [ - "/IndexedDB/interfaces.html", + "/IndexedDB/interfaces.any.html", {} - ] - ], - "IndexedDB/interfaces.worker.js": [ + ], [ - "/IndexedDB/interfaces.worker.html", + "/IndexedDB/interfaces.any.worker.html", {} ] ], @@ -317436,6 +317463,12 @@ {} ] ], + "css/css-typed-om/the-stylepropertymap/properties/pointer-events.html": [ + [ + "/css/css-typed-om/the-stylepropertymap/properties/pointer-events.html", + {} + ] + ], "css/css-typed-om/the-stylepropertymap/properties/position.html": [ [ "/css/css-typed-om/the-stylepropertymap/properties/position.html", @@ -359778,6 +359811,12 @@ } ] ], + "service-workers/cache-storage/serviceworker/cache-abort.https.html": [ + [ + "/service-workers/cache-storage/serviceworker/cache-abort.https.html", + {} + ] + ], "service-workers/cache-storage/serviceworker/cache-add.https.html": [ [ "/service-workers/cache-storage/serviceworker/cache-add.https.html", @@ -359856,6 +359895,12 @@ {} ] ], + "service-workers/cache-storage/window/cache-abort.https.html": [ + [ + "/service-workers/cache-storage/window/cache-abort.https.html", + {} + ] + ], "service-workers/cache-storage/window/cache-add.https.html": [ [ "/service-workers/cache-storage/window/cache-add.https.html", @@ -359936,6 +359981,12 @@ } ] ], + "service-workers/cache-storage/worker/cache-abort.https.html": [ + [ + "/service-workers/cache-storage/worker/cache-abort.https.html", + {} + ] + ], "service-workers/cache-storage/worker/cache-add.https.html": [ [ "/service-workers/cache-storage/worker/cache-add.https.html", @@ -371610,6 +371661,12 @@ {} ] ], + "xhr/xmlhttprequest-closing-worker.html": [ + [ + "/xhr/xmlhttprequest-closing-worker.html", + {} + ] + ], "xhr/xmlhttprequest-eventtarget.htm": [ [ "/xhr/xmlhttprequest-eventtarget.htm", @@ -391186,7 +391243,7 @@ "support" ], "./.travis.yml": [ - "db5838d29eefceadbb7f088f7de75d765dbaa58c", + "6aeadb7da2f5fa8d09762a07b3a874b306e1fc22", "support" ], "./CONTRIBUTING.md": [ @@ -391214,7 +391271,7 @@ "support" ], "./lint.whitelist": [ - "b35324fd499dcb7ba0a9deedc794bb13ee62e175", + "697da251dd64d990c1ec0603fd252ba6ea11ad26", "support" ], "./serve.py": [ @@ -396841,12 +396898,8 @@ "251a828d333bdd3face9d20a2a28ddf0c0ffeb49", "testharness" ], - "IndexedDB/interfaces.html": [ - "348a7350d749c4ea11d383d1f3e07e54a9d0d377", - "testharness" - ], - "IndexedDB/interfaces.worker.js": [ - "a74350d69819f73cf9f75ac636f8793f018ba2fd", + "IndexedDB/interfaces.any.js": [ + "df07f5da63c34969a24fe43bc4268418ab0a5132", "testharness" ], "IndexedDB/interleaved-cursors-common.js": [ @@ -507665,24 +507718,32 @@ "46913ea7e47811b11be898de5c3bd0a330ea6637", "testharness" ], + "css/css-scoping/shadow-disabled-sheet-001.html": [ + "3de2d23c1b3339b964ec2c009832a3207a3b9dc4", + "reftest" + ], "css/css-scoping/shadow-fallback-dynamic-001.html": [ - "062c99df18077a0205d0170d641b1d1e61199657", + "741cd9e29067a4634aa5beb6bd06afa540895d22", "reftest" ], "css/css-scoping/shadow-fallback-dynamic-002.html": [ - "2f66c8bca48c2ce5c9e82c5d67b152e2d143f4c6", + "e9a0d8178387901404030dde1b7ae7b2842f2eca", "reftest" ], "css/css-scoping/shadow-fallback-dynamic-003.html": [ - "f054b0974277fbee38a96a26559c9a15400266db", + "0b75fadbaee366349576e2d6f3ca8d6a49069f66", "reftest" ], "css/css-scoping/shadow-fallback-dynamic-004.html": [ - "fc33527eaaa7711ecb2c7cd9523e793bce2503f2", + "71dcc60c4ff59690927c1575fff2eecf85ee558f", "reftest" ], "css/css-scoping/shadow-fallback-dynamic-005.html": [ - "46d78b6d6931505bbc4bfc2f83e2bd0bac0d3472", + "ab3c3d205e59df800ba5b4217245b83685521c31", + "reftest" + ], + "css/css-scoping/shadow-root-insert-into-document.html": [ + "2cee9fff35c9222074f4ef78dcfcb8a3e02bbc98", "reftest" ], "css/css-scoping/slotted-invalidation.html": [ @@ -522585,6 +522646,10 @@ "70c2e29badef7528469bcf11e1cb7bbc6cd519ea", "testharness" ], + "css/css-typed-om/the-stylepropertymap/properties/pointer-events.html": [ + "71b42cb53d950eb62309b4567d3c7bc62dd1e28e", + "testharness" + ], "css/css-typed-om/the-stylepropertymap/properties/position.html": [ "4e3eccee58cec470febe4cd9a9149f4b4436487e", "testharness" @@ -522594,7 +522659,7 @@ "testharness" ], "css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js": [ - "6b7b909fe2cf5576ea5e483a0c0ee8a2977171f6", + "7e6c530cf36cce5d7b8d02abbbefbdd4370d1be1", "support" ], "css/css-typed-om/the-stylepropertymap/properties/right.html": [ @@ -533406,11 +533471,11 @@ "testharness" ], "css/filter-effects/parsing/filter-parsing-invalid.html": [ - "ed49a343fbf4ebffc7c98797b21bf6fed83d5f89", + "296e73b68ea36f9070c889728723bf877ad65e23", "testharness" ], "css/filter-effects/parsing/filter-parsing-valid.html": [ - "a53c5723d7f151f94b1ecbff1e4813beca40d546", + "7c17e0cd21b0a6859dd3a38a2cd7568037bca15c", "testharness" ], "css/filter-effects/parsing/lighting-color-parsing-invalid.html": [ @@ -572054,7 +572119,7 @@ "support" ], "interfaces/web-share.idl": [ - "d3ab33fa078f1b3bd4b29e174369073aab3963d5", + "21b54128664c5962c29fd708ebba3d8d90987f26", "support" ], "interfaces/webaudio.idl": [ @@ -591905,6 +591970,10 @@ "fc315489c4d337f7cf8395beb4005be9c12da9d6", "support" ], + "service-workers/cache-storage/script-tests/cache-abort.js": [ + "7c381e34a8e1444ad82645caf05ec8cbfe8360f8", + "support" + ], "service-workers/cache-storage/script-tests/cache-add.js": [ "5807ce231254f89d9e5f2fc43955a8dda5bd865d", "support" @@ -591941,6 +592010,10 @@ "43a44ad35e90ce759de7a855f75b149b756029b4", "support" ], + "service-workers/cache-storage/serviceworker/cache-abort.https.html": [ + "6b44436f3b2e1a463e64f3f5fc343086a295a975", + "testharness" + ], "service-workers/cache-storage/serviceworker/cache-add.https.html": [ "294e76cb7b067b17fc9a0850bdab1d6e169cc25a", "testharness" @@ -591981,6 +592054,10 @@ "ef598649e75e3c8736729d7e233982748e31eb79", "testharness" ], + "service-workers/cache-storage/window/cache-abort.https.html": [ + "2143ee1d78242bd2d055f6ea1b63a1becff657fe", + "testharness" + ], "service-workers/cache-storage/window/cache-add.https.html": [ "d2c83935c4f413fa6f9459843a9ba669deb0e8ce", "testharness" @@ -592021,6 +592098,10 @@ "dafb0d18e02c256a78188fdaf6997a1abd58b215", "testharness" ], + "service-workers/cache-storage/worker/cache-abort.https.html": [ + "d67a78e50008a587d0b349daaacafc25a18cfd5b", + "testharness" + ], "service-workers/cache-storage/worker/cache-add.https.html": [ "2cbea6be14f2f1852993be40744cac72a7fc62f6", "testharness" @@ -594958,7 +595039,7 @@ "testharness" ], "streams/readable-byte-streams/general.js": [ - "a7262a490c4a913811c8d0c489b06a567a448fc6", + "ce3c72f3a552a6b9a42b4f37be7e6a053cad10a1", "support" ], "streams/readable-byte-streams/general.serviceworker.https.html": [ @@ -609869,6 +609950,10 @@ "a67d1876d6245fb94d60a937b633c87c51a04d21", "testharness" ], + "xhr/xmlhttprequest-closing-worker.html": [ + "2e12b49aca2dc3908837b6b419c92cb890e60e3f", + "testharness" + ], "xhr/xmlhttprequest-eventtarget.htm": [ "40c886f79399108db3ded8a23848905dcf9e0862", "testharness" diff --git a/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini b/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini new file mode 100644 index 000000000000..26435e28b090 --- /dev/null +++ b/tests/wpt/metadata/css/css-values/vh_not_refreshing_on_chrome.html.ini @@ -0,0 +1,2 @@ +[vh_not_refreshing_on_chrome.html] + expected: FAIL diff --git a/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini b/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini index 13a7cbc55179..b8ca47ff7b3d 100644 --- a/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini +++ b/tests/wpt/metadata/css/filter-effects/parsing/filter-parsing-valid.html.ini @@ -47,3 +47,15 @@ [Serialization should round-trip after setting e.style['filter'\] = "blur(10px) url(\\"picture.svg#f\\") contrast(20) brightness(30)"] expected: FAIL + [e.style['filter'\] = "drop-shadow(rgb(4, 5, 6) 1px 2px)" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['filter'\] = "drop-shadow(rgb(4, 5, 6) 1px 2px)"] + expected: FAIL + + [e.style['filter'\] = "drop-shadow(rgba(4, 5, 6, 0.75) 1px 2px 3px)" should set the property value] + expected: FAIL + + [Serialization should round-trip after setting e.style['filter'\] = "drop-shadow(rgba(4, 5, 6, 0.75) 1px 2px 3px)"] + expected: FAIL + diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html.ini deleted file mode 100644 index 1e2567027d8a..000000000000 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[rapid-resizing.html] - expected: TIMEOUT - [Overall test] - expected: NOTRUN - diff --git a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html.ini b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html.ini index ad64e1afe0ba..c508ae3ae719 100644 --- a/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html.ini +++ b/tests/wpt/mozilla/meta/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html.ini @@ -1,6 +1,5 @@ [shader-with-non-reserved-words.html] type: testharness - expected: TIMEOUT [WebGL test #1696: shader with: 'dmat2' failed to compile] expected: FAIL @@ -145,6 +144,3 @@ [WebGL test #1862: shader with: 'dmat4x4' failed to compile] expected: FAIL - [Overall test] - expected: NOTRUN - diff --git a/tests/wpt/web-platform-tests/.travis.yml b/tests/wpt/web-platform-tests/.travis.yml index 125d50bc2db7..26df65e9827b 100644 --- a/tests/wpt/web-platform-tests/.travis.yml +++ b/tests/wpt/web-platform-tests/.travis.yml @@ -87,9 +87,6 @@ matrix: - env: # exclude empty env from the top-level above allow_failures: - env: JOB=build_css SCRIPT=css/build-css-testsuites.sh - - env: - - secure: "YTSXPwI0DyCA1GhYrLT9KMEV6b7QQKuEeaQgeFDP38OTzJ1+cIj3CC4SRNqbnJ/6SJwPGcdqSxLuV8m4e5HFFnyCcQnJe6h8EMsTehZ7W3j/fP9UYrJqYqvGpe3Vj3xblO5pwBYmq7sg3jAmmuCgAgOW6VGf7cRMucrsmFeo7VM=" - - JOB=stability SCRIPT=tools/ci/ci_stability.sh PRODUCT=chrome:dev script: - ./tools/ci/run.sh cache: diff --git a/tests/wpt/web-platform-tests/IndexedDB/interfaces.any.js b/tests/wpt/web-platform-tests/IndexedDB/interfaces.any.js new file mode 100644 index 000000000000..f142db45bcb9 --- /dev/null +++ b/tests/wpt/web-platform-tests/IndexedDB/interfaces.any.js @@ -0,0 +1,32 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +promise_test(async t => { + const [html, dom, indexeddb] = await Promise.all([ + '/interfaces/html.idl', + '/interfaces/dom.idl', + '/interfaces/IndexedDB.idl', + ].map(url => fetch(url).then(response => response.text()))); + + const idl_array = new IdlArray(); + idl_array.add_untested_idls('interface LinkStyle {};'); // Needed by html + idl_array.add_untested_idls(html); + idl_array.add_untested_idls(dom); + idl_array.add_idls(indexeddb); + idl_array.add_objects({ + IDBCursor: [], + IDBCursorWithValue: [], + IDBDatabase: [], + IDBFactory: [self.indexedDB], + IDBIndex: [], + IDBKeyRange: [IDBKeyRange.only(0)], + IDBObjectStore: [], + IDBOpenDBRequest: [], + IDBRequest: [], + IDBTransaction: [], + IDBVersionChangeEvent: [new IDBVersionChangeEvent('')], + DOMStringList: [], + }); + + idl_array.test(); +}, 'Test driver'); diff --git a/tests/wpt/web-platform-tests/IndexedDB/interfaces.html b/tests/wpt/web-platform-tests/IndexedDB/interfaces.html deleted file mode 100644 index 8bffa6227621..000000000000 --- a/tests/wpt/web-platform-tests/IndexedDB/interfaces.html +++ /dev/null @@ -1,61 +0,0 @@ - - -IndexedDB IDL tests - - - - - -

IndexedDB IDL tests

-
- - diff --git a/tests/wpt/web-platform-tests/IndexedDB/interfaces.worker.js b/tests/wpt/web-platform-tests/IndexedDB/interfaces.worker.js deleted file mode 100644 index 547b07b8f179..000000000000 --- a/tests/wpt/web-platform-tests/IndexedDB/interfaces.worker.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; - -importScripts("/resources/testharness.js"); -importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js"); - -async_test(function(t) { - var request = new XMLHttpRequest(); - request.open("GET", "/interfaces/IndexedDB.idl"); - request.send(); - request.onload = t.step_func(function() { - var idlArray = new IdlArray(); - var idls = request.responseText; - - // https://html.spec.whatwg.org/multipage/workers.html#workerglobalscope - idlArray.add_untested_idls("[Exposed=Worker] interface WorkerGlobalScope {};"); - - // https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin - idlArray.add_untested_idls(`[NoInterfaceObject, Exposed=(Window,Worker)] - interface WindowOrWorkerGlobalScope {};`); - idlArray.add_untested_idls("WorkerGlobalScope implements WindowOrWorkerGlobalScope;"); - - // https://dom.spec.whatwg.org/#interface-event - idlArray.add_untested_idls("[Exposed=(Window,Worker)] interface Event { };"); - - // https://dom.spec.whatwg.org/#interface-eventtarget - idlArray.add_untested_idls("[Exposed=(Window,Worker)] interface EventTarget { };"); - - // https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#domstringlist - idlArray.add_untested_idls("[Exposed=(Window,Worker)] interface DOMStringList { };"); - - // From Indexed DB: - idlArray.add_idls(idls); - - idlArray.add_objects({ - IDBCursor: [], - IDBCursorWithValue: [], - IDBDatabase: [], - IDBFactory: ["self.indexedDB"], - IDBIndex: [], - IDBKeyRange: ["IDBKeyRange.only(0)"], - IDBObjectStore: [], - IDBOpenDBRequest: [], - IDBRequest: [], - IDBTransaction: [], - IDBVersionChangeEvent: ["new IDBVersionChangeEvent('foo')"], - DOMStringList: [], - }); - idlArray.test(); - t.done(); - }); -}); - -done(); diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-disabled-sheet-001.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-disabled-sheet-001.html new file mode 100644 index 000000000000..275ac47a613a --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-disabled-sheet-001.html @@ -0,0 +1,21 @@ + +CSS Scoping Module Level 1 - Disabled stylesheet dynamically + + + +

Test passes if you see a single 100px by 100px green box below.

+
+ diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-001.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-001.html index 6bf12aa7ddb7..9a5672eb63a9 100644 --- a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-001.html +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-001.html @@ -1,6 +1,6 @@ CSS Scoping Module Level 1 - Dynamic fallback content - +

Test passes if you see a single 100px by 100px green box below.

diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-002.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-002.html index 7553049efb74..f65d0c7a2129 100644 --- a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-002.html +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-002.html @@ -1,6 +1,6 @@ CSS Scoping Module Level 1 - Dynamic fallback content - +

Test passes if you see a single 100px by 100px green box below.

diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-003.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-003.html index 59f8b5376b13..a30e8fed7d25 100644 --- a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-003.html +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-003.html @@ -1,6 +1,6 @@ CSS Scoping Module Level 1 - Dynamic fallback content - +

Test passes if you see a single 100px by 100px green box below.

diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-004.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-004.html index b301741da407..29e407573a31 100644 --- a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-004.html +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-004.html @@ -1,6 +1,6 @@ CSS Scoping Module Level 1 - Dynamic fallback content - +

Test passes if you see a single 100px by 100px green box below.

diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-005.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-005.html index ff030c0cde15..1d84907e5fc0 100644 --- a/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-005.html +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-fallback-dynamic-005.html @@ -1,6 +1,6 @@ CSS Scoping Module Level 1 - Dynamic fallback content - +

Test passes if you see a single 100px by 100px green box below.

diff --git a/tests/wpt/web-platform-tests/css/css-scoping/shadow-root-insert-into-document.html b/tests/wpt/web-platform-tests/css/css-scoping/shadow-root-insert-into-document.html new file mode 100644 index 000000000000..a3b89be389a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-scoping/shadow-root-insert-into-document.html @@ -0,0 +1,18 @@ + +CSS Scoping Module Level 1 - Dynamic insertion of shadow host + + + +

Test passes if you see a single 100px by 100px green box below.

+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/pointer-events.html b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/pointer-events.html new file mode 100644 index 000000000000..3e069e760456 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/pointer-events.html @@ -0,0 +1,29 @@ + + +'pointer-events' property + + + + + + + + +
+ diff --git a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js index 3145ac8911b9..2c20c05e7d0f 100644 --- a/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js +++ b/tests/wpt/web-platform-tests/css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js @@ -352,7 +352,7 @@ function runPropertyTests(propertyName, testCases) { // Retrieve test examples for this test case's syntax. If the syntax // looks like a keyword, then create an example on the fly. - const syntaxExamples = testCase.syntax.match(/^[a-z\-]+$/) ? + const syntaxExamples = testCase.syntax.toLowerCase().match(/^[a-z\-]+$/) ? createKeywordExample(testCase.syntax) : gTestSyntaxExamples[testCase.syntax]; diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html index add2875716d8..30ebf6764f56 100644 --- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html +++ b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-invalid.html @@ -34,8 +34,6 @@ test_invalid_value("filter", "drop-shadow(1px)"); test_invalid_value("filter", "drop-shadow(1px 2px 3px 4px)"); test_invalid_value("filter", "drop-shadow(rgb(4, 5, 6))"); -// https://github.com/w3c/fxtf-drafts/issues/231 -test_invalid_value("filter", "drop-shadow(rgb(4, 5, 6) 1px 2px)"); // Fails in Blink/WebKit "drop-shadow(rgb(4, 5, 6) 1px 2px)" and Firefox "drop-shadow(1px 2px rgb(4, 5, 6))". test_invalid_value("filter", "drop-shadow()"); test_invalid_value("filter", "grayscale(-20)"); diff --git a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html index d7e0af4a78a6..773b1101138c 100644 --- a/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html +++ b/tests/wpt/web-platform-tests/css/filter-effects/parsing/filter-parsing-valid.html @@ -26,9 +26,10 @@ test_valid_value("filter", "drop-shadow(1px 2px)"); test_valid_value("filter", "drop-shadow(1px 2px 3px)"); test_valid_value("filter", "drop-shadow(0 0 0)", "drop-shadow(0px 0px 0px)"); -// https://github.com/w3c/fxtf-drafts/issues/231 -test_valid_value("filter", "drop-shadow(1px 2px rgb(4, 5, 6))"); // Blink/WebKit serialize as "drop-shadow(rgb(4, 5, 6) 1px 2px)" -test_valid_value("filter", "drop-shadow(1px 2px 3px rgba(4, 5, 6, 0.75))"); // Blink/WebKit serialize as "drop-shadow(rgba(4, 5, 6, 0.75) 1px 2px 3px)" +// https://github.com/w3c/fxtf-drafts/issues/240 +test_valid_value("filter", "drop-shadow(rgb(4, 5, 6) 1px 2px)"); +test_valid_value("filter", "drop-shadow(1px 2px rgb(4, 5, 6))", "drop-shadow(rgb(4, 5, 6) 1px 2px)"); +test_valid_value("filter", "drop-shadow(rgba(4, 5, 6, 0.75) 1px 2px 3px)"); test_valid_value("filter", "grayscale(0)"); test_valid_value("filter", "grayscale(300%)", "grayscale(100%)"); diff --git a/tests/wpt/web-platform-tests/interfaces/web-share.idl b/tests/wpt/web-platform-tests/interfaces/web-share.idl index cf19b7e9e762..7403af3e2f7e 100644 --- a/tests/wpt/web-platform-tests/interfaces/web-share.idl +++ b/tests/wpt/web-platform-tests/interfaces/web-share.idl @@ -1,8 +1,9 @@ -// https://wicg.github.io/web-share/ +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the Web Share API spec. +// See https://wicg.github.io/web-share/ partial interface Navigator { - [SecureContext] - Promise share(optional ShareData data); + [SecureContext] Promise share(optional ShareData data); }; dictionary ShareData { diff --git a/tests/wpt/web-platform-tests/lint.whitelist b/tests/wpt/web-platform-tests/lint.whitelist index 42c7d48afc4f..958adb25ace1 100644 --- a/tests/wpt/web-platform-tests/lint.whitelist +++ b/tests/wpt/web-platform-tests/lint.whitelist @@ -197,6 +197,7 @@ SET TIMEOUT: screen-orientation/lock-bad-argument.html SET TIMEOUT: screen-orientation/onchange-event.html SET TIMEOUT: screen-orientation/resources/sandboxed-iframe-locking.html SET TIMEOUT: secure-contexts/basic-popup-and-iframe-tests.https.js +SET TIMEOUT: service-workers/cache-storage/script-tests/cache-abort.js SET TIMEOUT: service-workers/service-worker/activation.https.html SET TIMEOUT: service-workers/service-worker/fetch-frame-resource.https.html SET TIMEOUT: service-workers/service-worker/fetch-request-redirect.https.html diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-abort.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-abort.js new file mode 100644 index 000000000000..ec4130fded29 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/script-tests/cache-abort.js @@ -0,0 +1,81 @@ +if (self.importScripts) { + importScripts('/resources/testharness.js'); + importScripts('../resources/test-helpers.js'); + importScripts('/common/utils.js'); +} + +// We perform the same tests on put, add, addAll. Parameterise the tests to +// reduce repetition. +const methodsToTest = { + put: async (cache, request) => { + const response = await fetch(request); + return cache.put(request, response); + }, + add: async (cache, request) => cache.add(request), + addAll: async (cache, request) => cache.addAll([request]), +}; + +for (const method in methodsToTest) { + const perform = methodsToTest[method]; + + cache_test(async (cache, test) => { + const controller = new AbortController(); + const signal = controller.signal; + controller.abort(); + const request = new Request('../resources/simple.txt', { signal }); + return promise_rejects(test, 'AbortError', perform(cache, request), + `${method} should reject`); + }, `${method}() on an already-aborted request should reject with AbortError`); + + cache_test(async (cache, test) => { + const controller = new AbortController(); + const signal = controller.signal; + const request = new Request('../resources/simple.txt', { signal }); + const promise = perform(cache, request); + controller.abort(); + return promise_rejects(test, 'AbortError', promise, + `${method} should reject`); + }, `${method}() synchronously followed by abort should reject with ` + + `AbortError`); + + cache_test(async (cache, test) => { + const controller = new AbortController(); + const signal = controller.signal; + const stateKey = token(); + const abortKey = token(); + const request = new Request( + `../../../fetch/api/resources/infinite-slow-response.py?stateKey=${stateKey}&abortKey=${abortKey}`, + { signal }); + + const promise = perform(cache, request); + + // Wait for the server to start sending the response body. + let opened = false; + do { + // Normally only one fetch to 'stash-take' is needed, but the fetches + // will be served in reverse order sometimes + // (i.e., 'stash-take' gets served before 'infinite-slow-response'). + + const response = + await fetch(`../../../fetch/api/resources/stash-take.py?key=${stateKey}`); + const body = await response.json(); + if (body === 'open') opened = true; + } while (!opened); + + // Sadly the above loop cannot guarantee that the browser has started + // processing the response body. This delay is needed to make the test + // failures non-flaky in Chrome version 66. My deepest apologies. + await new Promise(resolve => setTimeout(resolve, 250)); + + controller.abort(); + + await promise_rejects(test, 'AbortError', promise, + `${method} should reject`); + + // infinite-slow-response.py doesn't know when to stop. + return fetch(`../../../fetch/api/resources/stash-put.py?key=${abortKey}`); + }, `${method}() followed by abort after headers received should reject ` + + `with AbortError`); +} + +done(); diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-abort.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-abort.https.html new file mode 100644 index 000000000000..b4f203b3333b --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/cache-abort.https.html @@ -0,0 +1,9 @@ + +Cache Storage: Abort + + + + + diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-abort.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-abort.https.html new file mode 100644 index 000000000000..935023dbe6e0 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/window/cache-abort.https.html @@ -0,0 +1,8 @@ + +Cache Storage: Abort + + + + + + diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-abort.https.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-abort.https.html new file mode 100644 index 000000000000..ccd71910dc5e --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/worker/cache-abort.https.html @@ -0,0 +1,8 @@ + +>Cache Storage: Abort + + + + diff --git a/tests/wpt/web-platform-tests/streams/readable-byte-streams/general.js b/tests/wpt/web-platform-tests/streams/readable-byte-streams/general.js index 4207277d1a59..39dd7080bc7a 100644 --- a/tests/wpt/web-platform-tests/streams/readable-byte-streams/general.js +++ b/tests/wpt/web-platform-tests/streams/readable-byte-streams/general.js @@ -300,22 +300,28 @@ function extractViewInfo(view) { promise_test(() => { let pullCount = 0; let controller; - let byobRequest; - let viewDefined = false; - let viewInfo; + const byobRequests = []; const stream = new ReadableStream({ start(c) { controller = c; }, pull() { - byobRequest = controller.byobRequest; + const byobRequest = controller.byobRequest; const view = byobRequest.view; - viewDefined = view !== undefined; - viewInfo = extractViewInfo(view); - - view[0] = 0x01; - byobRequest.respond(1); + byobRequests[pullCount] = { + defined: byobRequest !== undefined, + viewDefined: view !== undefined, + viewInfo: extractViewInfo(view) + }; + if (pullCount === 0) { + view[0] = 0x01; + byobRequest.respond(1); + } else if (pullCount === 1) { + view[0] = 0x02; + view[1] = 0x03; + byobRequest.respond(2); + } ++pullCount; }, @@ -326,28 +332,52 @@ promise_test(() => { }); const reader = stream.getReader(); - const readPromise = reader.read(); - const ignoredReadPromise = reader.read(); + const p0 = reader.read(); + const p1 = reader.read(); assert_equals(pullCount, 0, 'No pull() as start() just finished and is not yet reflected to the state of the stream'); return Promise.resolve().then(() => { assert_equals(pullCount, 1, 'pull() must have been invoked once'); - assert_not_equals(byobRequest, undefined, 'byobRequest must not be undefined'); - assert_true(viewDefined, 'byobRequest.view must not be undefined'); - assert_equals(viewInfo.constructor, Uint8Array, 'view.constructor should be Uint8Array'); - assert_equals(viewInfo.bufferByteLength, 16, 'view.buffer.byteLength should be 16'); - assert_equals(viewInfo.byteOffset, 0, 'view.byteOffset should be 0'); - assert_equals(viewInfo.byteLength, 16, 'view.byteLength should be 16'); - return readPromise; + const byobRequest = byobRequests[0]; + assert_true(byobRequest.defined, 'first byobRequest must not be undefined'); + assert_true(byobRequest.viewDefined, 'first byobRequest.view must not be undefined'); + const viewInfo = byobRequest.viewInfo; + assert_equals(viewInfo.constructor, Uint8Array, 'first view.constructor should be Uint8Array'); + assert_equals(viewInfo.bufferByteLength, 16, 'first view.buffer.byteLength should be 16'); + assert_equals(viewInfo.byteOffset, 0, 'first view.byteOffset should be 0'); + assert_equals(viewInfo.byteLength, 16, 'first view.byteLength should be 16'); + + return p0; + }).then(result => { + assert_equals(pullCount, 2, 'pull() must have been invoked twice'); + const value = result.value; + assert_not_equals(value, undefined, 'first read should have a value'); + assert_equals(value.constructor, Uint8Array, 'first value should be a Uint8Array'); + assert_equals(value.buffer.byteLength, 16, 'first value.buffer.byteLength should be 16'); + assert_equals(value.byteOffset, 0, 'first value.byteOffset should be 0'); + assert_equals(value.byteLength, 1, 'first value.byteLength should be 1'); + assert_equals(value[0], 0x01, 'first value[0] should be 0x01'); + const byobRequest = byobRequests[1]; + assert_true(byobRequest.defined, 'second byobRequest must not be undefined'); + assert_true(byobRequest.viewDefined, 'second byobRequest.view must not be undefined'); + const viewInfo = byobRequest.viewInfo; + assert_equals(viewInfo.constructor, Uint8Array, 'second view.constructor should be Uint8Array'); + assert_equals(viewInfo.bufferByteLength, 16, 'second view.buffer.byteLength should be 16'); + assert_equals(viewInfo.byteOffset, 0, 'second view.byteOffset should be 0'); + assert_equals(viewInfo.byteLength, 16, 'second view.byteLength should be 16'); + + return p1; }).then(result => { - assert_not_equals(result.value, undefined); - assert_equals(result.value.constructor, Uint8Array); - assert_equals(result.value.buffer.byteLength, 16); - assert_equals(result.value.byteOffset, 0); - assert_equals(result.value.byteLength, 1); - assert_equals(result.value[0], 0x01); - assert_equals(pullCount, 1, 'pull() should only be invoked once'); + assert_equals(pullCount, 2, 'pull() should only be invoked twice'); + const value = result.value; + assert_not_equals(value, undefined, 'second read should have a value'); + assert_equals(value.constructor, Uint8Array, 'second value should be a Uint8Array'); + assert_equals(value.buffer.byteLength, 16, 'second value.buffer.byteLength should be 16'); + assert_equals(value.byteOffset, 0, 'second value.byteOffset should be 0'); + assert_equals(value.byteLength, 2, 'second value.byteLength should be 2'); + assert_equals(value[0], 0x02, 'second value[0] should be 0x02'); + assert_equals(value[1], 0x03, 'second value[1] should be 0x03'); }); }, 'ReadableStream with byte source: autoAllocateChunkSize'); @@ -387,12 +417,13 @@ promise_test(() => { const reader = stream.getReader(); return reader.read().then(result => { - assert_not_equals(result.value, undefined); - assert_equals(result.value.constructor, Uint8Array); - assert_equals(result.value.buffer.byteLength, 16); - assert_equals(result.value.byteOffset, 0); - assert_equals(result.value.byteLength, 1); - assert_equals(result.value[0], 0x01); + const value = result.value; + assert_not_equals(value, undefined, 'first read should have a value'); + assert_equals(value.constructor, Uint8Array, 'first value should be a Uint8Array'); + assert_equals(value.buffer.byteLength, 16, 'first value.buffer.byteLength should be 16'); + assert_equals(value.byteOffset, 0, 'first value.byteOffset should be 0'); + assert_equals(value.byteLength, 1, 'first value.byteLength should be 1'); + assert_equals(value[0], 0x01, 'first value[0] should be 0x01'); const byobRequest = byobRequests[0]; assert_true(byobRequest.defined, 'first byobRequest must not be undefined'); assert_true(byobRequest.viewDefined, 'first byobRequest.view must not be undefined'); @@ -406,13 +437,14 @@ promise_test(() => { const byobReader = stream.getReader({ mode: 'byob' }); return byobReader.read(new Uint8Array(32)); }).then(result => { - assert_not_equals(result.value, undefined); - assert_equals(result.value.constructor, Uint8Array); - assert_equals(result.value.buffer.byteLength, 32); - assert_equals(result.value.byteOffset, 0); - assert_equals(result.value.byteLength, 2); - assert_equals(result.value[0], 0x02); - assert_equals(result.value[1], 0x03); + const value = result.value; + assert_not_equals(value, undefined, 'second read should have a value'); + assert_equals(value.constructor, Uint8Array, 'second value should be a Uint8Array'); + assert_equals(value.buffer.byteLength, 32, 'second value.buffer.byteLength should be 32'); + assert_equals(value.byteOffset, 0, 'second value.byteOffset should be 0'); + assert_equals(value.byteLength, 2, 'second value.byteLength should be 2'); + assert_equals(value[0], 0x02, 'second value[0] should be 0x02'); + assert_equals(value[1], 0x03, 'second value[1] should be 0x03'); const byobRequest = byobRequests[1]; assert_true(byobRequest.defined, 'second byobRequest must not be undefined'); assert_true(byobRequest.viewDefined, 'second byobRequest.view must not be undefined'); @@ -693,7 +725,7 @@ promise_test(() => { }, type: 'bytes' }, { - highWaterMark: 256 + highWaterMark: 0 }); const reader = stream.getReader(); @@ -710,6 +742,55 @@ promise_test(() => { return Promise.all([p0, p1, p2]).then(result => { assert_equals(pullCount, 1, 'pullCount after completion of all read()s'); + assert_equals(result[0].done, false, 'result[0].done'); + assert_equals(result[0].value.byteLength, 1, 'result[0].value.byteLength'); + assert_equals(result[1].done, false, 'result[1].done'); + assert_equals(result[1].value.byteLength, 1, 'result[1].value.byteLength'); + assert_equals(result[2].done, false, 'result[2].done'); + assert_equals(result[2].value.byteLength, 1, 'result[2].value.byteLength'); + assert_equals(byobRequest, undefined, 'byobRequest should be undefined'); + assert_equals(desiredSizes[0], 0, 'desiredSize on pull should be 0'); + assert_equals(desiredSizes[1], 0, 'desiredSize after 1st enqueue() should be 0'); + assert_equals(desiredSizes[2], 0, 'desiredSize after 2nd enqueue() should be 0'); + assert_equals(pullCount, 1, 'pull() should only be called once'); + }); +}, 'ReadableStream with byte source: Respond to pull() by enqueue() asynchronously'); + +promise_test(() => { + let pullCount = 0; + + let byobRequest; + const desiredSizes = []; + + const stream = new ReadableStream({ + pull(c) { + byobRequest = c.byobRequest; + desiredSizes.push(c.desiredSize); + + if (pullCount < 3) { + c.enqueue(new Uint8Array(1)); + } else { + c.close(); + } + + ++pullCount; + }, + type: 'bytes' + }, { + highWaterMark: 256 + }); + + const reader = stream.getReader(); + + const p0 = reader.read(); + const p1 = reader.read(); + const p2 = reader.read(); + + assert_equals(pullCount, 0, 'No pull as start() just finished and is not yet reflected to the state of the stream'); + + return Promise.all([p0, p1, p2]).then(result => { + assert_equals(pullCount, 4, 'pullCount after completion of all read()s'); + assert_equals(result[0].done, false, 'result[0].done'); assert_equals(result[0].value.byteLength, 1, 'result[0].value.byteLength'); assert_equals(result[1].done, false, 'result[1].done'); @@ -720,9 +801,9 @@ promise_test(() => { assert_equals(desiredSizes[0], 256, 'desiredSize on pull should be 256'); assert_equals(desiredSizes[1], 256, 'desiredSize after 1st enqueue() should be 256'); assert_equals(desiredSizes[2], 256, 'desiredSize after 2nd enqueue() should be 256'); - assert_equals(pullCount, 1, 'pull() should only be called once'); + assert_equals(desiredSizes[3], 256, 'desiredSize after 3rd enqueue() should be 256'); }); -}, 'ReadableStream with byte source: Respond to pull() by enqueue() asynchronously'); +}, 'ReadableStream with byte source: Respond to multiple pull() by separate enqueue()'); promise_test(() => { let controller; diff --git a/tests/wpt/web-platform-tests/tools/ci/check_stability.py b/tests/wpt/web-platform-tests/tools/ci/check_stability.py index fb9988dc96c9..b215e3c9e1df 100644 --- a/tests/wpt/web-platform-tests/tools/ci/check_stability.py +++ b/tests/wpt/web-platform-tests/tools/ci/check_stability.py @@ -22,7 +22,7 @@ from tools import localpaths logger = None -run, write_inconsistent, write_results = None, None, None +stability_run, write_inconsistent, write_results = None, None, None wptrunner = None def setup_logging(): @@ -37,8 +37,9 @@ def setup_logging(): def do_delayed_imports(): - global run, write_inconsistent, write_results, wptrunner - from tools.wpt.stability import run, write_inconsistent, write_results + global stability_run, write_inconsistent, write_results, wptrunner + from tools.wpt.stability import run as stability_run + from tools.wpt.stability import write_inconsistent, write_results from wptrunner import wptrunner @@ -254,12 +255,9 @@ def main(): def run(venv, wpt_args, **kwargs): - global logger - do_delayed_imports() retcode = 0 - parser = get_parser() wpt_args = create_parser().parse_args(wpt_args) @@ -335,7 +333,7 @@ def run(venv, wpt_args, **kwargs): wpt_logger = wptrunner.logger - iterations, results, inconsistent = run(venv, wpt_logger, **wpt_kwargs) + iterations, results, inconsistent = stability_run(venv, wpt_logger, **wpt_kwargs) if results: if inconsistent: @@ -353,16 +351,17 @@ def run(venv, wpt_args, **kwargs): status="failed" if inconsistent else "passed") else: logger.info("No tests run.") + # Be conservative and only return errors when we know for sure tests are changed. + if tests_changed: + retcode = 3 return retcode if __name__ == "__main__": try: - retcode = main() + sys.exit(main()) except Exception: import traceback traceback.print_exc() sys.exit(1) - else: - sys.exit(retcode) diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py index 4e7370333c9c..1c49ab2572c8 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py @@ -118,7 +118,7 @@ def setup(self): def load_runner(self, url_protocol): # Check if we previously had a test window open, and if we did make sure it's closed - self.marionette.execute_script("if (window.wrappedJSObject.win) {window.wrappedJSObject.win.close()}") + self.marionette.execute_script("if (window.win) {window.win.close()}") url = urlparse.urljoin(self.parent.executor.server_url(url_protocol), "/testharness_runner.html") self.logger.debug("Loading %s" % url) @@ -519,7 +519,7 @@ def do_test(self, test): return (test.result_cls(*data), []) def do_testharness(self, protocol, url, timeout): - protocol.base.execute_script("if (window.wrappedJSObject.win) {window.wrappedJSObject.win.close()}") + protocol.base.execute_script("if (window.win) {window.win.close()}") parent_window = protocol.testharness.close_old_windows(protocol) if timeout is not None: diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette.js index d1899ea69470..049caa4688c5 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette.js +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette.js @@ -1,24 +1,24 @@ -window.wrappedJSObject.timeout_multiplier = %(timeout_multiplier)d; -window.wrappedJSObject.explicit_timeout = %(explicit_timeout)d; +window.timeout_multiplier = %(timeout_multiplier)d; +window.explicit_timeout = %(explicit_timeout)d; -window.wrappedJSObject.message_queue = []; +window.message_queue = []; -window.wrappedJSObject.setMessageListener = function(func) { - window.wrappedJSObject.current_listener = func; - window.wrappedJSObject.addEventListener( +window.setMessageListener = function(func) { + window.current_listener = func; + window.addEventListener( "message", func, false ); }; -window.wrappedJSObject.setMessageListener(function(event) { - window.wrappedJSObject.message_queue.push(event); +window.setMessageListener(function(event) { + window.message_queue.push(event); }); -window.wrappedJSObject.win = window.wrappedJSObject.open("%(abs_url)s", "%(window_id)s"); +window.win = window.open("%(abs_url)s", "%(window_id)s"); -window.wrappedJSObject.timer = setTimeout(function() { - window.wrappedJSObject.win.timeout(); - window.wrappedJSObject.win.close(); +window.timer = setTimeout(function() { + window.win.timeout(); + window.win.close(); }, %(timeout)s); diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js index 749d19d0fc50..7a2df98ed4e7 100644 --- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js +++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette_resume.js @@ -17,12 +17,12 @@ function process_event(event) { status.message, status.stack, subtest_results]; - clearTimeout(window.wrappedJSObject.timer); + clearTimeout(window.timer); break; case "action": - window.wrappedJSObject.setMessageListener(function(event) { - window.wrappedJSObject.message_queue.push(event); + window.setMessageListener(function(event) { + window.message_queue.push(event); }); payload = data; break; @@ -33,14 +33,14 @@ function process_event(event) { callback(["%(url)s", data.type, payload]); } -window.wrappedJSObject.removeEventListener("message", window.wrappedJSObject.current_listener); -if (window.wrappedJSObject.message_queue.length) { - var next = window.wrappedJSObject.message_queue.shift(); +window.removeEventListener("message", window.current_listener); +if (window.message_queue.length) { + var next = window.message_queue.shift(); process_event(next); } else { - window.wrappedJSObject.addEventListener( + window.addEventListener( "message", function f(event) { - window.wrappedJSObject.removeEventListener("message", f); + window.removeEventListener("message", f); process_event(event); }, false); } diff --git a/tests/wpt/web-platform-tests/xhr/xmlhttprequest-closing-worker.html b/tests/wpt/web-platform-tests/xhr/xmlhttprequest-closing-worker.html new file mode 100644 index 000000000000..5c8142f23ae8 --- /dev/null +++ b/tests/wpt/web-platform-tests/xhr/xmlhttprequest-closing-worker.html @@ -0,0 +1,32 @@ + + + + + + XHR used when worker is closing itself + + + + +
+ + + +