mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Update web-platform-tests to revision 3a8328470d53c4501e31cec2775c4d33821c2275
This commit is contained in:
parent
f92f0809f8
commit
40c0b971f1
32 changed files with 530 additions and 238 deletions
|
@ -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": [
|
||||||
[
|
[
|
||||||
"/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": [
|
||||||
[
|
[
|
||||||
"/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": [
|
"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": [
|
||||||
[
|
[
|
||||||
"/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": [
|
||||||
[
|
[
|
||||||
"/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": [
|
||||||
[
|
[
|
||||||
"/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": [
|
||||||
[
|
[
|
||||||
"/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": [
|
||||||
[
|
[
|
||||||
"/xhr/xmlhttprequest-eventtarget.htm",
|
"/xhr/xmlhttprequest-eventtarget.htm",
|
||||||
|
@ -391186,7 +391243,7 @@
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"./.travis.yml": [
|
"./.travis.yml": [
|
||||||
"db5838d29eefceadbb7f088f7de75d765dbaa58c",
|
"6aeadb7da2f5fa8d09762a07b3a874b306e1fc22",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"./CONTRIBUTING.md": [
|
"./CONTRIBUTING.md": [
|
||||||
|
@ -391214,7 +391271,7 @@
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"./lint.whitelist": [
|
"./lint.whitelist": [
|
||||||
"b35324fd499dcb7ba0a9deedc794bb13ee62e175",
|
"697da251dd64d990c1ec0603fd252ba6ea11ad26",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"./serve.py": [
|
"./serve.py": [
|
||||||
|
@ -396841,12 +396898,8 @@
|
||||||
"251a828d333bdd3face9d20a2a28ddf0c0ffeb49",
|
"251a828d333bdd3face9d20a2a28ddf0c0ffeb49",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"IndexedDB/interfaces.html": [
|
"IndexedDB/interfaces.any.js": [
|
||||||
"348a7350d749c4ea11d383d1f3e07e54a9d0d377",
|
"df07f5da63c34969a24fe43bc4268418ab0a5132",
|
||||||
"testharness"
|
|
||||||
],
|
|
||||||
"IndexedDB/interfaces.worker.js": [
|
|
||||||
"a74350d69819f73cf9f75ac636f8793f018ba2fd",
|
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"IndexedDB/interleaved-cursors-common.js": [
|
"IndexedDB/interleaved-cursors-common.js": [
|
||||||
|
@ -507665,24 +507718,32 @@
|
||||||
"46913ea7e47811b11be898de5c3bd0a330ea6637",
|
"46913ea7e47811b11be898de5c3bd0a330ea6637",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
|
"css/css-scoping/shadow-disabled-sheet-001.html": [
|
||||||
|
"3de2d23c1b3339b964ec2c009832a3207a3b9dc4",
|
||||||
|
"reftest"
|
||||||
|
],
|
||||||
"css/css-scoping/shadow-fallback-dynamic-001.html": [
|
"css/css-scoping/shadow-fallback-dynamic-001.html": [
|
||||||
"062c99df18077a0205d0170d641b1d1e61199657",
|
"741cd9e29067a4634aa5beb6bd06afa540895d22",
|
||||||
"reftest"
|
"reftest"
|
||||||
],
|
],
|
||||||
"css/css-scoping/shadow-fallback-dynamic-002.html": [
|
"css/css-scoping/shadow-fallback-dynamic-002.html": [
|
||||||
"2f66c8bca48c2ce5c9e82c5d67b152e2d143f4c6",
|
"e9a0d8178387901404030dde1b7ae7b2842f2eca",
|
||||||
"reftest"
|
"reftest"
|
||||||
],
|
],
|
||||||
"css/css-scoping/shadow-fallback-dynamic-003.html": [
|
"css/css-scoping/shadow-fallback-dynamic-003.html": [
|
||||||
"f054b0974277fbee38a96a26559c9a15400266db",
|
"0b75fadbaee366349576e2d6f3ca8d6a49069f66",
|
||||||
"reftest"
|
"reftest"
|
||||||
],
|
],
|
||||||
"css/css-scoping/shadow-fallback-dynamic-004.html": [
|
"css/css-scoping/shadow-fallback-dynamic-004.html": [
|
||||||
"fc33527eaaa7711ecb2c7cd9523e793bce2503f2",
|
"71dcc60c4ff59690927c1575fff2eecf85ee558f",
|
||||||
"reftest"
|
"reftest"
|
||||||
],
|
],
|
||||||
"css/css-scoping/shadow-fallback-dynamic-005.html": [
|
"css/css-scoping/shadow-fallback-dynamic-005.html": [
|
||||||
"46d78b6d6931505bbc4bfc2f83e2bd0bac0d3472",
|
"ab3c3d205e59df800ba5b4217245b83685521c31",
|
||||||
|
"reftest"
|
||||||
|
],
|
||||||
|
"css/css-scoping/shadow-root-insert-into-document.html": [
|
||||||
|
"2cee9fff35c9222074f4ef78dcfcb8a3e02bbc98",
|
||||||
"reftest"
|
"reftest"
|
||||||
],
|
],
|
||||||
"css/css-scoping/slotted-invalidation.html": [
|
"css/css-scoping/slotted-invalidation.html": [
|
||||||
|
@ -522585,6 +522646,10 @@
|
||||||
"70c2e29badef7528469bcf11e1cb7bbc6cd519ea",
|
"70c2e29badef7528469bcf11e1cb7bbc6cd519ea",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
|
"css/css-typed-om/the-stylepropertymap/properties/pointer-events.html": [
|
||||||
|
"71b42cb53d950eb62309b4567d3c7bc62dd1e28e",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"css/css-typed-om/the-stylepropertymap/properties/position.html": [
|
"css/css-typed-om/the-stylepropertymap/properties/position.html": [
|
||||||
"4e3eccee58cec470febe4cd9a9149f4b4436487e",
|
"4e3eccee58cec470febe4cd9a9149f4b4436487e",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
@ -522594,7 +522659,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js": [
|
"css/css-typed-om/the-stylepropertymap/properties/resources/testsuite.js": [
|
||||||
"6b7b909fe2cf5576ea5e483a0c0ee8a2977171f6",
|
"7e6c530cf36cce5d7b8d02abbbefbdd4370d1be1",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"css/css-typed-om/the-stylepropertymap/properties/right.html": [
|
"css/css-typed-om/the-stylepropertymap/properties/right.html": [
|
||||||
|
@ -533406,11 +533471,11 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"css/filter-effects/parsing/filter-parsing-invalid.html": [
|
"css/filter-effects/parsing/filter-parsing-invalid.html": [
|
||||||
"ed49a343fbf4ebffc7c98797b21bf6fed83d5f89",
|
"296e73b68ea36f9070c889728723bf877ad65e23",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"css/filter-effects/parsing/filter-parsing-valid.html": [
|
"css/filter-effects/parsing/filter-parsing-valid.html": [
|
||||||
"a53c5723d7f151f94b1ecbff1e4813beca40d546",
|
"7c17e0cd21b0a6859dd3a38a2cd7568037bca15c",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"css/filter-effects/parsing/lighting-color-parsing-invalid.html": [
|
"css/filter-effects/parsing/lighting-color-parsing-invalid.html": [
|
||||||
|
@ -572054,7 +572119,7 @@
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"interfaces/web-share.idl": [
|
"interfaces/web-share.idl": [
|
||||||
"d3ab33fa078f1b3bd4b29e174369073aab3963d5",
|
"21b54128664c5962c29fd708ebba3d8d90987f26",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"interfaces/webaudio.idl": [
|
"interfaces/webaudio.idl": [
|
||||||
|
@ -591905,6 +591970,10 @@
|
||||||
"fc315489c4d337f7cf8395beb4005be9c12da9d6",
|
"fc315489c4d337f7cf8395beb4005be9c12da9d6",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
|
"service-workers/cache-storage/script-tests/cache-abort.js": [
|
||||||
|
"7c381e34a8e1444ad82645caf05ec8cbfe8360f8",
|
||||||
|
"support"
|
||||||
|
],
|
||||||
"service-workers/cache-storage/script-tests/cache-add.js": [
|
"service-workers/cache-storage/script-tests/cache-add.js": [
|
||||||
"5807ce231254f89d9e5f2fc43955a8dda5bd865d",
|
"5807ce231254f89d9e5f2fc43955a8dda5bd865d",
|
||||||
"support"
|
"support"
|
||||||
|
@ -591941,6 +592010,10 @@
|
||||||
"43a44ad35e90ce759de7a855f75b149b756029b4",
|
"43a44ad35e90ce759de7a855f75b149b756029b4",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
|
"service-workers/cache-storage/serviceworker/cache-abort.https.html": [
|
||||||
|
"6b44436f3b2e1a463e64f3f5fc343086a295a975",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"service-workers/cache-storage/serviceworker/cache-add.https.html": [
|
"service-workers/cache-storage/serviceworker/cache-add.https.html": [
|
||||||
"294e76cb7b067b17fc9a0850bdab1d6e169cc25a",
|
"294e76cb7b067b17fc9a0850bdab1d6e169cc25a",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
@ -591981,6 +592054,10 @@
|
||||||
"ef598649e75e3c8736729d7e233982748e31eb79",
|
"ef598649e75e3c8736729d7e233982748e31eb79",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
|
"service-workers/cache-storage/window/cache-abort.https.html": [
|
||||||
|
"2143ee1d78242bd2d055f6ea1b63a1becff657fe",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"service-workers/cache-storage/window/cache-add.https.html": [
|
"service-workers/cache-storage/window/cache-add.https.html": [
|
||||||
"d2c83935c4f413fa6f9459843a9ba669deb0e8ce",
|
"d2c83935c4f413fa6f9459843a9ba669deb0e8ce",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
@ -592021,6 +592098,10 @@
|
||||||
"dafb0d18e02c256a78188fdaf6997a1abd58b215",
|
"dafb0d18e02c256a78188fdaf6997a1abd58b215",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
|
"service-workers/cache-storage/worker/cache-abort.https.html": [
|
||||||
|
"d67a78e50008a587d0b349daaacafc25a18cfd5b",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"service-workers/cache-storage/worker/cache-add.https.html": [
|
"service-workers/cache-storage/worker/cache-add.https.html": [
|
||||||
"2cbea6be14f2f1852993be40744cac72a7fc62f6",
|
"2cbea6be14f2f1852993be40744cac72a7fc62f6",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
@ -594958,7 +595039,7 @@
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
"streams/readable-byte-streams/general.js": [
|
"streams/readable-byte-streams/general.js": [
|
||||||
"a7262a490c4a913811c8d0c489b06a567a448fc6",
|
"ce3c72f3a552a6b9a42b4f37be7e6a053cad10a1",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
"streams/readable-byte-streams/general.serviceworker.https.html": [
|
"streams/readable-byte-streams/general.serviceworker.https.html": [
|
||||||
|
@ -609869,6 +609950,10 @@
|
||||||
"a67d1876d6245fb94d60a937b633c87c51a04d21",
|
"a67d1876d6245fb94d60a937b633c87c51a04d21",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
|
"xhr/xmlhttprequest-closing-worker.html": [
|
||||||
|
"2e12b49aca2dc3908837b6b419c92cb890e60e3f",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"xhr/xmlhttprequest-eventtarget.htm": [
|
"xhr/xmlhttprequest-eventtarget.htm": [
|
||||||
"40c886f79399108db3ded8a23848905dcf9e0862",
|
"40c886f79399108db3ded8a23848905dcf9e0862",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[vh_not_refreshing_on_chrome.html]
|
||||||
|
expected: FAIL
|
|
@ -47,3 +47,15 @@
|
||||||
[Serialization should round-trip after setting e.style['filter'\] = "blur(10px) url(\\"picture.svg#f\\") contrast(20) brightness(30)"]
|
[Serialization should round-trip after setting e.style['filter'\] = "blur(10px) url(\\"picture.svg#f\\") contrast(20) brightness(30)"]
|
||||||
expected: FAIL
|
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
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[rapid-resizing.html]
|
|
||||||
expected: TIMEOUT
|
|
||||||
[Overall test]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
[shader-with-non-reserved-words.html]
|
[shader-with-non-reserved-words.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[WebGL test #1696: shader with: 'dmat2' failed to compile]
|
[WebGL test #1696: shader with: 'dmat2' failed to compile]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -145,6 +144,3 @@
|
||||||
[WebGL test #1862: shader with: 'dmat4x4' failed to compile]
|
[WebGL test #1862: shader with: 'dmat4x4' failed to compile]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Overall test]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
||||||
|
|
|
@ -87,9 +87,6 @@ matrix:
|
||||||
- env: # exclude empty env from the top-level above
|
- env: # exclude empty env from the top-level above
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- env: JOB=build_css SCRIPT=css/build-css-testsuites.sh
|
- 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:
|
script:
|
||||||
- ./tools/ci/run.sh
|
- ./tools/ci/run.sh
|
||||||
cache:
|
cache:
|
||||||
|
|
32
tests/wpt/web-platform-tests/IndexedDB/interfaces.any.js
Normal file
32
tests/wpt/web-platform-tests/IndexedDB/interfaces.any.js
Normal file
|
@ -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');
|
|
@ -1,61 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<meta charset=utf-8>
|
|
||||||
<title>IndexedDB IDL tests</title>
|
|
||||||
<script src=/resources/testharness.js></script>
|
|
||||||
<script src=/resources/testharnessreport.js></script>
|
|
||||||
<script src=/resources/WebIDLParser.js></script>
|
|
||||||
<script src=/resources/idlharness.js></script>
|
|
||||||
|
|
||||||
<h1>IndexedDB IDL tests</h1>
|
|
||||||
<div id=log></div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
"use strict";
|
|
||||||
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/browsers.html#window
|
|
||||||
idlArray.add_untested_idls("[Global=Window, Exposed=Window] interface Window { };");
|
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope-mixin
|
|
||||||
idlArray.add_untested_idls(`[NoInterfaceObject, Exposed=(Window,Worker)]
|
|
||||||
interface WindowOrWorkerGlobalScope {};`);
|
|
||||||
idlArray.add_untested_idls("Window 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: ["window.indexedDB"],
|
|
||||||
IDBIndex: [],
|
|
||||||
IDBKeyRange: ["IDBKeyRange.only(0)"],
|
|
||||||
IDBObjectStore: [],
|
|
||||||
IDBOpenDBRequest: [],
|
|
||||||
IDBRequest: [],
|
|
||||||
IDBTransaction: [],
|
|
||||||
IDBVersionChangeEvent: ["new IDBVersionChangeEvent('foo')"],
|
|
||||||
DOMStringList: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
idlArray.test();
|
|
||||||
t.done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
|
@ -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();
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!doctype html>
|
||||||
|
<title>CSS Scoping Module Level 1 - Disabled stylesheet dynamically</title>
|
||||||
|
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||||
|
<link rel="match" href="reference/green-box.html"/>
|
||||||
|
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||||
|
<div id="host"></div>
|
||||||
|
<script>
|
||||||
|
let root = host.attachShadow({ mode: 'open' });
|
||||||
|
root.innerHTML = `
|
||||||
|
<style>
|
||||||
|
div { background: green; width: 100px; height: 100px; }
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
div { background: red; }
|
||||||
|
</style>
|
||||||
|
<div></div>
|
||||||
|
`;
|
||||||
|
document.body.offsetTop;
|
||||||
|
root.styleSheets[1].disabled = true;
|
||||||
|
</script>
|
|
@ -1,6 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
||||||
<link rel="author" href="mailto:emilio@crisal.io">
|
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||||
<link rel="match" href="reference/green-box.html"/>
|
<link rel="match" href="reference/green-box.html"/>
|
||||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
||||||
<link rel="author" href="mailto:emilio@crisal.io">
|
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||||
<link rel="match" href="reference/green-box.html"/>
|
<link rel="match" href="reference/green-box.html"/>
|
||||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
||||||
<link rel="author" href="mailto:emilio@crisal.io">
|
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||||
<link rel="match" href="reference/green-box.html"/>
|
<link rel="match" href="reference/green-box.html"/>
|
||||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
||||||
<link rel="author" href="mailto:emilio@crisal.io">
|
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||||
<link rel="match" href="reference/green-box.html"/>
|
<link rel="match" href="reference/green-box.html"/>
|
||||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
<title>CSS Scoping Module Level 1 - Dynamic fallback content</title>
|
||||||
<link rel="author" href="mailto:emilio@crisal.io">
|
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||||
<link rel="match" href="reference/green-box.html"/>
|
<link rel="match" href="reference/green-box.html"/>
|
||||||
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
<!doctype html>
|
||||||
|
<title>CSS Scoping Module Level 1 - Dynamic insertion of shadow host</title>
|
||||||
|
<link rel="author" href="mailto:emilio@crisal.io">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
|
||||||
|
<link rel="match" href="reference/green-box.html"/>
|
||||||
|
<p>Test passes if you see a single 100px by 100px green box below.</p>
|
||||||
|
<script>
|
||||||
|
let host = document.createElement('div');
|
||||||
|
let root = host.attachShadow({ mode: 'open' });
|
||||||
|
root.innerHTML = `
|
||||||
|
<style>
|
||||||
|
div { background: green; width: 100px; height: 100px; }
|
||||||
|
</style>
|
||||||
|
<div></div>
|
||||||
|
`;
|
||||||
|
document.body.offsetTop;
|
||||||
|
document.body.appendChild(host);
|
||||||
|
</script>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>'pointer-events' property</title>
|
||||||
|
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-get">
|
||||||
|
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#dom-stylepropertymap-set">
|
||||||
|
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#property-stle-value-normalization">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="../../resources/testhelper.js"></script>
|
||||||
|
<script src="resources/testsuite.js"></script>
|
||||||
|
<body>
|
||||||
|
<div id="log"></div>
|
||||||
|
<script>
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
runPropertyTests('pointer-events', [
|
||||||
|
{ syntax: 'bounding-box' },
|
||||||
|
{ syntax: 'visiblePainted' },
|
||||||
|
{ syntax: 'visibleFill' },
|
||||||
|
{ syntax: 'visibleStroke' },
|
||||||
|
{ syntax: 'visible' },
|
||||||
|
{ syntax: 'painted' },
|
||||||
|
{ syntax: 'fill' },
|
||||||
|
{ syntax: 'stroke' },
|
||||||
|
{ syntax: 'all' },
|
||||||
|
{ syntax: 'none' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
</script>
|
|
@ -352,7 +352,7 @@ function runPropertyTests(propertyName, testCases) {
|
||||||
|
|
||||||
// Retrieve test examples for this test case's syntax. If the syntax
|
// Retrieve test examples for this test case's syntax. If the syntax
|
||||||
// looks like a keyword, then create an example on the fly.
|
// 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) :
|
createKeywordExample(testCase.syntax) :
|
||||||
gTestSyntaxExamples[testCase.syntax];
|
gTestSyntaxExamples[testCase.syntax];
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,6 @@ test_invalid_value("filter", "drop-shadow(10% 20%)");
|
||||||
test_invalid_value("filter", "drop-shadow(1px)");
|
test_invalid_value("filter", "drop-shadow(1px)");
|
||||||
test_invalid_value("filter", "drop-shadow(1px 2px 3px 4px)");
|
test_invalid_value("filter", "drop-shadow(1px 2px 3px 4px)");
|
||||||
test_invalid_value("filter", "drop-shadow(rgb(4, 5, 6))");
|
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", "drop-shadow()");
|
||||||
|
|
||||||
test_invalid_value("filter", "grayscale(-20)");
|
test_invalid_value("filter", "grayscale(-20)");
|
||||||
|
|
|
@ -26,9 +26,10 @@ test_valid_value("filter", "contrast(300%)");
|
||||||
test_valid_value("filter", "drop-shadow(1px 2px)");
|
test_valid_value("filter", "drop-shadow(1px 2px)");
|
||||||
test_valid_value("filter", "drop-shadow(1px 2px 3px)");
|
test_valid_value("filter", "drop-shadow(1px 2px 3px)");
|
||||||
test_valid_value("filter", "drop-shadow(0 0 0)", "drop-shadow(0px 0px 0px)");
|
test_valid_value("filter", "drop-shadow(0 0 0)", "drop-shadow(0px 0px 0px)");
|
||||||
// https://github.com/w3c/fxtf-drafts/issues/231
|
// https://github.com/w3c/fxtf-drafts/issues/240
|
||||||
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(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)"
|
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(0)");
|
||||||
test_valid_value("filter", "grayscale(300%)", "grayscale(100%)");
|
test_valid_value("filter", "grayscale(300%)", "grayscale(100%)");
|
||||||
|
|
|
@ -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 {
|
partial interface Navigator {
|
||||||
[SecureContext]
|
[SecureContext] Promise<void> share(optional ShareData data);
|
||||||
Promise<void> share(optional ShareData data);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary ShareData {
|
dictionary ShareData {
|
||||||
|
|
|
@ -197,6 +197,7 @@ SET TIMEOUT: screen-orientation/lock-bad-argument.html
|
||||||
SET TIMEOUT: screen-orientation/onchange-event.html
|
SET TIMEOUT: screen-orientation/onchange-event.html
|
||||||
SET TIMEOUT: screen-orientation/resources/sandboxed-iframe-locking.html
|
SET TIMEOUT: screen-orientation/resources/sandboxed-iframe-locking.html
|
||||||
SET TIMEOUT: secure-contexts/basic-popup-and-iframe-tests.https.js
|
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/activation.https.html
|
||||||
SET TIMEOUT: service-workers/service-worker/fetch-frame-resource.https.html
|
SET TIMEOUT: service-workers/service-worker/fetch-frame-resource.https.html
|
||||||
SET TIMEOUT: service-workers/service-worker/fetch-request-redirect.https.html
|
SET TIMEOUT: service-workers/service-worker/fetch-request-redirect.https.html
|
||||||
|
|
|
@ -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();
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>Cache Storage: Abort</title>
|
||||||
|
<link rel="help" href="https://fetch.spec.whatwg.org/#request-signal">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="../../service-worker/resources/test-helpers.sub.js"></script>
|
||||||
|
<script>
|
||||||
|
service_worker_test('../script-tests/cache-abort.js');
|
||||||
|
</script>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>Cache Storage: Abort</title>
|
||||||
|
<link rel="help" href="https://fetch.spec.whatwg.org/#request-signal">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="../resources/test-helpers.js"></script>
|
||||||
|
<script src="/common/utils.js"></script>
|
||||||
|
<script src="../script-tests/cache-abort.js"></script>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<title>>Cache Storage: Abort</title>
|
||||||
|
<link rel="help" href="https://fetch.spec.whatwg.org/#request-signal">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
fetch_tests_from_worker(new Worker('../script-tests/cache-abort.js'));
|
||||||
|
</script>
|
|
@ -300,22 +300,28 @@ function extractViewInfo(view) {
|
||||||
promise_test(() => {
|
promise_test(() => {
|
||||||
let pullCount = 0;
|
let pullCount = 0;
|
||||||
let controller;
|
let controller;
|
||||||
let byobRequest;
|
const byobRequests = [];
|
||||||
let viewDefined = false;
|
|
||||||
let viewInfo;
|
|
||||||
|
|
||||||
const stream = new ReadableStream({
|
const stream = new ReadableStream({
|
||||||
start(c) {
|
start(c) {
|
||||||
controller = c;
|
controller = c;
|
||||||
},
|
},
|
||||||
pull() {
|
pull() {
|
||||||
byobRequest = controller.byobRequest;
|
const byobRequest = controller.byobRequest;
|
||||||
const view = byobRequest.view;
|
const view = byobRequest.view;
|
||||||
viewDefined = view !== undefined;
|
byobRequests[pullCount] = {
|
||||||
viewInfo = extractViewInfo(view);
|
defined: byobRequest !== undefined,
|
||||||
|
viewDefined: view !== undefined,
|
||||||
view[0] = 0x01;
|
viewInfo: extractViewInfo(view)
|
||||||
byobRequest.respond(1);
|
};
|
||||||
|
if (pullCount === 0) {
|
||||||
|
view[0] = 0x01;
|
||||||
|
byobRequest.respond(1);
|
||||||
|
} else if (pullCount === 1) {
|
||||||
|
view[0] = 0x02;
|
||||||
|
view[1] = 0x03;
|
||||||
|
byobRequest.respond(2);
|
||||||
|
}
|
||||||
|
|
||||||
++pullCount;
|
++pullCount;
|
||||||
},
|
},
|
||||||
|
@ -326,28 +332,52 @@ promise_test(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const reader = stream.getReader();
|
const reader = stream.getReader();
|
||||||
const readPromise = reader.read();
|
const p0 = reader.read();
|
||||||
const ignoredReadPromise = 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');
|
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(() => {
|
return Promise.resolve().then(() => {
|
||||||
assert_equals(pullCount, 1, 'pull() must have been invoked once');
|
assert_equals(pullCount, 1, 'pull() must have been invoked once');
|
||||||
assert_not_equals(byobRequest, undefined, 'byobRequest must not be undefined');
|
const byobRequest = byobRequests[0];
|
||||||
assert_true(viewDefined, 'byobRequest.view must not be undefined');
|
assert_true(byobRequest.defined, 'first byobRequest must not be undefined');
|
||||||
assert_equals(viewInfo.constructor, Uint8Array, 'view.constructor should be Uint8Array');
|
assert_true(byobRequest.viewDefined, 'first byobRequest.view must not be undefined');
|
||||||
assert_equals(viewInfo.bufferByteLength, 16, 'view.buffer.byteLength should be 16');
|
const viewInfo = byobRequest.viewInfo;
|
||||||
assert_equals(viewInfo.byteOffset, 0, 'view.byteOffset should be 0');
|
assert_equals(viewInfo.constructor, Uint8Array, 'first view.constructor should be Uint8Array');
|
||||||
assert_equals(viewInfo.byteLength, 16, 'view.byteLength should be 16');
|
assert_equals(viewInfo.bufferByteLength, 16, 'first view.buffer.byteLength should be 16');
|
||||||
return readPromise;
|
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 => {
|
}).then(result => {
|
||||||
assert_not_equals(result.value, undefined);
|
assert_equals(pullCount, 2, 'pull() must have been invoked twice');
|
||||||
assert_equals(result.value.constructor, Uint8Array);
|
const value = result.value;
|
||||||
assert_equals(result.value.buffer.byteLength, 16);
|
assert_not_equals(value, undefined, 'first read should have a value');
|
||||||
assert_equals(result.value.byteOffset, 0);
|
assert_equals(value.constructor, Uint8Array, 'first value should be a Uint8Array');
|
||||||
assert_equals(result.value.byteLength, 1);
|
assert_equals(value.buffer.byteLength, 16, 'first value.buffer.byteLength should be 16');
|
||||||
assert_equals(result.value[0], 0x01);
|
assert_equals(value.byteOffset, 0, 'first value.byteOffset should be 0');
|
||||||
assert_equals(pullCount, 1, 'pull() should only be invoked once');
|
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_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');
|
}, 'ReadableStream with byte source: autoAllocateChunkSize');
|
||||||
|
|
||||||
|
@ -387,12 +417,13 @@ promise_test(() => {
|
||||||
|
|
||||||
const reader = stream.getReader();
|
const reader = stream.getReader();
|
||||||
return reader.read().then(result => {
|
return reader.read().then(result => {
|
||||||
assert_not_equals(result.value, undefined);
|
const value = result.value;
|
||||||
assert_equals(result.value.constructor, Uint8Array);
|
assert_not_equals(value, undefined, 'first read should have a value');
|
||||||
assert_equals(result.value.buffer.byteLength, 16);
|
assert_equals(value.constructor, Uint8Array, 'first value should be a Uint8Array');
|
||||||
assert_equals(result.value.byteOffset, 0);
|
assert_equals(value.buffer.byteLength, 16, 'first value.buffer.byteLength should be 16');
|
||||||
assert_equals(result.value.byteLength, 1);
|
assert_equals(value.byteOffset, 0, 'first value.byteOffset should be 0');
|
||||||
assert_equals(result.value[0], 0x01);
|
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];
|
const byobRequest = byobRequests[0];
|
||||||
assert_true(byobRequest.defined, 'first byobRequest must not be undefined');
|
assert_true(byobRequest.defined, 'first byobRequest must not be undefined');
|
||||||
assert_true(byobRequest.viewDefined, 'first byobRequest.view 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' });
|
const byobReader = stream.getReader({ mode: 'byob' });
|
||||||
return byobReader.read(new Uint8Array(32));
|
return byobReader.read(new Uint8Array(32));
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
assert_not_equals(result.value, undefined);
|
const value = result.value;
|
||||||
assert_equals(result.value.constructor, Uint8Array);
|
assert_not_equals(value, undefined, 'second read should have a value');
|
||||||
assert_equals(result.value.buffer.byteLength, 32);
|
assert_equals(value.constructor, Uint8Array, 'second value should be a Uint8Array');
|
||||||
assert_equals(result.value.byteOffset, 0);
|
assert_equals(value.buffer.byteLength, 32, 'second value.buffer.byteLength should be 32');
|
||||||
assert_equals(result.value.byteLength, 2);
|
assert_equals(value.byteOffset, 0, 'second value.byteOffset should be 0');
|
||||||
assert_equals(result.value[0], 0x02);
|
assert_equals(value.byteLength, 2, 'second value.byteLength should be 2');
|
||||||
assert_equals(result.value[1], 0x03);
|
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];
|
const byobRequest = byobRequests[1];
|
||||||
assert_true(byobRequest.defined, 'second byobRequest must not be undefined');
|
assert_true(byobRequest.defined, 'second byobRequest must not be undefined');
|
||||||
assert_true(byobRequest.viewDefined, 'second byobRequest.view must not be undefined');
|
assert_true(byobRequest.viewDefined, 'second byobRequest.view must not be undefined');
|
||||||
|
@ -693,7 +725,7 @@ promise_test(() => {
|
||||||
},
|
},
|
||||||
type: 'bytes'
|
type: 'bytes'
|
||||||
}, {
|
}, {
|
||||||
highWaterMark: 256
|
highWaterMark: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
const reader = stream.getReader();
|
const reader = stream.getReader();
|
||||||
|
@ -717,13 +749,62 @@ promise_test(() => {
|
||||||
assert_equals(result[2].done, false, 'result[2].done');
|
assert_equals(result[2].done, false, 'result[2].done');
|
||||||
assert_equals(result[2].value.byteLength, 1, 'result[2].value.byteLength');
|
assert_equals(result[2].value.byteLength, 1, 'result[2].value.byteLength');
|
||||||
assert_equals(byobRequest, undefined, 'byobRequest should be undefined');
|
assert_equals(byobRequest, undefined, 'byobRequest should be undefined');
|
||||||
assert_equals(desiredSizes[0], 256, 'desiredSize on pull should be 256');
|
assert_equals(desiredSizes[0], 0, 'desiredSize on pull should be 0');
|
||||||
assert_equals(desiredSizes[1], 256, 'desiredSize after 1st enqueue() should be 256');
|
assert_equals(desiredSizes[1], 0, 'desiredSize after 1st enqueue() should be 0');
|
||||||
assert_equals(desiredSizes[2], 256, 'desiredSize after 2nd enqueue() should be 256');
|
assert_equals(desiredSizes[2], 0, 'desiredSize after 2nd enqueue() should be 0');
|
||||||
assert_equals(pullCount, 1, 'pull() should only be called once');
|
assert_equals(pullCount, 1, 'pull() should only be called once');
|
||||||
});
|
});
|
||||||
}, 'ReadableStream with byte source: Respond to pull() by enqueue() asynchronously');
|
}, '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');
|
||||||
|
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], 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(desiredSizes[3], 256, 'desiredSize after 3rd enqueue() should be 256');
|
||||||
|
});
|
||||||
|
}, 'ReadableStream with byte source: Respond to multiple pull() by separate enqueue()');
|
||||||
|
|
||||||
promise_test(() => {
|
promise_test(() => {
|
||||||
let controller;
|
let controller;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ from tools.wpt import markdown
|
||||||
from tools import localpaths
|
from tools import localpaths
|
||||||
|
|
||||||
logger = None
|
logger = None
|
||||||
run, write_inconsistent, write_results = None, None, None
|
stability_run, write_inconsistent, write_results = None, None, None
|
||||||
wptrunner = None
|
wptrunner = None
|
||||||
|
|
||||||
def setup_logging():
|
def setup_logging():
|
||||||
|
@ -37,8 +37,9 @@ def setup_logging():
|
||||||
|
|
||||||
|
|
||||||
def do_delayed_imports():
|
def do_delayed_imports():
|
||||||
global run, write_inconsistent, write_results, wptrunner
|
global stability_run, write_inconsistent, write_results, wptrunner
|
||||||
from tools.wpt.stability import run, write_inconsistent, write_results
|
from tools.wpt.stability import run as stability_run
|
||||||
|
from tools.wpt.stability import write_inconsistent, write_results
|
||||||
from wptrunner import wptrunner
|
from wptrunner import wptrunner
|
||||||
|
|
||||||
|
|
||||||
|
@ -254,12 +255,9 @@ def main():
|
||||||
|
|
||||||
|
|
||||||
def run(venv, wpt_args, **kwargs):
|
def run(venv, wpt_args, **kwargs):
|
||||||
global logger
|
|
||||||
|
|
||||||
do_delayed_imports()
|
do_delayed_imports()
|
||||||
|
|
||||||
retcode = 0
|
retcode = 0
|
||||||
parser = get_parser()
|
|
||||||
|
|
||||||
wpt_args = create_parser().parse_args(wpt_args)
|
wpt_args = create_parser().parse_args(wpt_args)
|
||||||
|
|
||||||
|
@ -335,7 +333,7 @@ def run(venv, wpt_args, **kwargs):
|
||||||
|
|
||||||
|
|
||||||
wpt_logger = wptrunner.logger
|
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 results:
|
||||||
if inconsistent:
|
if inconsistent:
|
||||||
|
@ -353,16 +351,17 @@ def run(venv, wpt_args, **kwargs):
|
||||||
status="failed" if inconsistent else "passed")
|
status="failed" if inconsistent else "passed")
|
||||||
else:
|
else:
|
||||||
logger.info("No tests run.")
|
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
|
return retcode
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
retcode = main()
|
sys.exit(main())
|
||||||
except Exception:
|
except Exception:
|
||||||
import traceback
|
import traceback
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
|
||||||
sys.exit(retcode)
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ class MarionetteTestharnessProtocolPart(TestharnessProtocolPart):
|
||||||
|
|
||||||
def load_runner(self, url_protocol):
|
def load_runner(self, url_protocol):
|
||||||
# Check if we previously had a test window open, and if we did make sure it's closed
|
# 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),
|
url = urlparse.urljoin(self.parent.executor.server_url(url_protocol),
|
||||||
"/testharness_runner.html")
|
"/testharness_runner.html")
|
||||||
self.logger.debug("Loading %s" % url)
|
self.logger.debug("Loading %s" % url)
|
||||||
|
@ -519,7 +519,7 @@ class MarionetteTestharnessExecutor(TestharnessExecutor):
|
||||||
return (test.result_cls(*data), [])
|
return (test.result_cls(*data), [])
|
||||||
|
|
||||||
def do_testharness(self, protocol, url, timeout):
|
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)
|
parent_window = protocol.testharness.close_old_windows(protocol)
|
||||||
|
|
||||||
if timeout is not None:
|
if timeout is not None:
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
window.wrappedJSObject.timeout_multiplier = %(timeout_multiplier)d;
|
window.timeout_multiplier = %(timeout_multiplier)d;
|
||||||
window.wrappedJSObject.explicit_timeout = %(explicit_timeout)d;
|
window.explicit_timeout = %(explicit_timeout)d;
|
||||||
|
|
||||||
window.wrappedJSObject.message_queue = [];
|
window.message_queue = [];
|
||||||
|
|
||||||
window.wrappedJSObject.setMessageListener = function(func) {
|
window.setMessageListener = function(func) {
|
||||||
window.wrappedJSObject.current_listener = func;
|
window.current_listener = func;
|
||||||
window.wrappedJSObject.addEventListener(
|
window.addEventListener(
|
||||||
"message",
|
"message",
|
||||||
func,
|
func,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
window.wrappedJSObject.setMessageListener(function(event) {
|
window.setMessageListener(function(event) {
|
||||||
window.wrappedJSObject.message_queue.push(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.timer = setTimeout(function() {
|
||||||
window.wrappedJSObject.win.timeout();
|
window.win.timeout();
|
||||||
window.wrappedJSObject.win.close();
|
window.win.close();
|
||||||
}, %(timeout)s);
|
}, %(timeout)s);
|
||||||
|
|
|
@ -17,12 +17,12 @@ function process_event(event) {
|
||||||
status.message,
|
status.message,
|
||||||
status.stack,
|
status.stack,
|
||||||
subtest_results];
|
subtest_results];
|
||||||
clearTimeout(window.wrappedJSObject.timer);
|
clearTimeout(window.timer);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "action":
|
case "action":
|
||||||
window.wrappedJSObject.setMessageListener(function(event) {
|
window.setMessageListener(function(event) {
|
||||||
window.wrappedJSObject.message_queue.push(event);
|
window.message_queue.push(event);
|
||||||
});
|
});
|
||||||
payload = data;
|
payload = data;
|
||||||
break;
|
break;
|
||||||
|
@ -33,14 +33,14 @@ function process_event(event) {
|
||||||
callback(["%(url)s", data.type, payload]);
|
callback(["%(url)s", data.type, payload]);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.wrappedJSObject.removeEventListener("message", window.wrappedJSObject.current_listener);
|
window.removeEventListener("message", window.current_listener);
|
||||||
if (window.wrappedJSObject.message_queue.length) {
|
if (window.message_queue.length) {
|
||||||
var next = window.wrappedJSObject.message_queue.shift();
|
var next = window.message_queue.shift();
|
||||||
process_event(next);
|
process_event(next);
|
||||||
} else {
|
} else {
|
||||||
window.wrappedJSObject.addEventListener(
|
window.addEventListener(
|
||||||
"message", function f(event) {
|
"message", function f(event) {
|
||||||
window.wrappedJSObject.removeEventListener("message", f);
|
window.removeEventListener("message", f);
|
||||||
process_event(event);
|
process_event(event);
|
||||||
}, false);
|
}, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
<!--
|
||||||
|
self.close()
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
xhr.open("GET", "/resources/testharness.js");
|
||||||
|
xhr.send(42);
|
||||||
|
postMessage(xhr.readyState)
|
||||||
|
/*-->
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>XHR used when worker is closing itself</title>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="log"></div>
|
||||||
|
<script>
|
||||||
|
var test = async_test();
|
||||||
|
test.step(function() {
|
||||||
|
var worker = new Worker('#')
|
||||||
|
worker.onmessage = function(e) {
|
||||||
|
test.step(function() {
|
||||||
|
assert_equals(e.data, XMLHttpRequest.OPENED, 'XHR.readyState')
|
||||||
|
})
|
||||||
|
test.done()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<!--*/ //-->
|
Loading…
Add table
Add a link
Reference in a new issue