mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Auto merge of #24986 - servo-wpt-sync:wpt_update_02-12-2019, r=servo-wpt-sync
Sync WPT with upstream (02-12-2019) Automated downstream sync of changes from upstream as of 02-12-2019. [no-wpt-sync] r? @servo-wpt-sync
This commit is contained in:
commit
ae0b086ea8
40 changed files with 624 additions and 465 deletions
|
@ -2,9 +2,6 @@
|
|||
[Revoke blob URL after creating Request, will fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[url-with-fetch.any.html]
|
||||
[Revoke blob URL after creating Request, will fetch]
|
||||
|
|
|
@ -230262,21 +230262,6 @@
|
|||
"cookie-store/serviceworker_cookieStore_cross_origin.js": [
|
||||
[]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions.js": [
|
||||
[]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_basic.js": [
|
||||
[]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_empty.js": [
|
||||
[]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js": [
|
||||
[]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js": [
|
||||
[]
|
||||
],
|
||||
"cookies/META.yml": [
|
||||
[]
|
||||
],
|
||||
|
@ -316377,6 +316362,126 @@
|
|||
}
|
||||
]
|
||||
],
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_empty.tentative.https.any.js": [
|
||||
[
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_empty.tentative.https.any.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: ServiceWorker without cookie change subscriptions"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker,window"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/service-workers/service-worker/resources/test-helpers.sub.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_empty.tentative.https.any.serviceworker.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: ServiceWorker without cookie change subscriptions"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker,window"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/service-workers/service-worker/resources/test-helpers.sub.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_multiple.tentative.https.any.js": [
|
||||
[
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_multiple.tentative.https.any.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: ServiceWorker with multiple cookie change subscriptions"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker,window"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/service-workers/service-worker/resources/test-helpers.sub.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_multiple.tentative.https.any.serviceworker.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: ServiceWorker with multiple cookie change subscriptions"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker,window"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/service-workers/service-worker/resources/test-helpers.sub.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_single.tentative.https.any.js": [
|
||||
[
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_single.tentative.https.any.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: ServiceWorker with one cookie change subscription"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker,window"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/service-workers/service-worker/resources/test-helpers.sub.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_single.tentative.https.any.serviceworker.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: ServiceWorker with one cookie change subscription"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker,window"
|
||||
],
|
||||
[
|
||||
"script",
|
||||
"/service-workers/service-worker/resources/test-helpers.sub.js"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"cookie-store/cookieStore_delete_arguments.tentative.https.any.js": [
|
||||
[
|
||||
"cookie-store/cookieStore_delete_arguments.tentative.https.any.html",
|
||||
|
@ -316933,42 +317038,97 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions.tentative.https.html": [
|
||||
[
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions.tentative.https.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_basic.tentative.https.html": [
|
||||
[
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_basic.tentative.https.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_empty.tentative.https.html": [
|
||||
[
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_empty.tentative.https.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.tentative.https.html": [
|
||||
[
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.tentative.https.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_mismatch.tentative.https.html": [
|
||||
[
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_mismatch.tentative.https.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_reset.tentative.https.html": [
|
||||
[
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_reset.tentative.https.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_mismatched_subscription.tentative.https.any.js": [
|
||||
[
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_mismatched_subscription.tentative.https.any.serviceworker.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: cookiechange event in ServiceWorker with mismatched subscription"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_multiple_subscriptions.tentative.https.any.js": [
|
||||
[
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_multiple_subscriptions.tentative.https.any.serviceworker.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: cookiechange event in ServiceWorker with multiple subscriptions"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_overlapping_subscriptions.tentative.https.any.js": [
|
||||
[
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_overlapping_subscriptions.tentative.https.any.serviceworker.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: cookiechange event in ServiceWorker with overlapping subscriptions"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_single_subscription.tentative.https.any.js": [
|
||||
[
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_single_subscription.tentative.https.any.serviceworker.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: cookiechange event in ServiceWorker with single subscription"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"cookie-store/serviceworker_oncookiechange_eventhandler_single_subscription.tentative.https.any.js": [
|
||||
[
|
||||
"cookie-store/serviceworker_oncookiechange_eventhandler_single_subscription.tentative.https.any.serviceworker.html",
|
||||
{
|
||||
"script_metadata": [
|
||||
[
|
||||
"title",
|
||||
"Cookie Store API: oncookiechange event in ServiceWorker with single subscription"
|
||||
],
|
||||
[
|
||||
"global",
|
||||
"!default,serviceworker"
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"cookies/cookie-enabled-noncookie-frame.html": [
|
||||
[
|
||||
"cookies/cookie-enabled-noncookie-frame.html",
|
||||
|
@ -492892,6 +493052,18 @@
|
|||
"1b1ae529767fdb2744f31fd860bb881d2b744735",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_empty.tentative.https.any.js": [
|
||||
"7df0b7002f3448df696435ba7cb0b12265978cac",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_multiple.tentative.https.any.js": [
|
||||
"625f521261507b0c82d5e059f40537f84dfee4c8",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/cookieStoreManager_getSubscriptions_single.tentative.https.any.js": [
|
||||
"04c21447c5d783232f4e882cbf7512df5b30ff03",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/cookieStore_delete_arguments.tentative.https.any.js": [
|
||||
"3a2b512bb1001864ea27a0fc66a267371976c501",
|
||||
"testharness"
|
||||
|
@ -493016,48 +493188,28 @@
|
|||
"6879c5da926384b2be6969b5585c8e2a75539f75",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions.js": [
|
||||
"107bb9576124a63ac9b68a3585acdde973a03f7a",
|
||||
"support"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions.tentative.https.html": [
|
||||
"375bce622c348d831c968ae63b90b44ae98de5c2",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_basic.js": [
|
||||
"a96eeeb116df3f6571bff5c74d39c4991b7fc31d",
|
||||
"support"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_basic.tentative.https.html": [
|
||||
"0353bc2c2096f72450ad6f7b6aad5439e9bd0b20",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_empty.js": [
|
||||
"7df77730553faf37bb17ff7e9fa42de91e7f6df3",
|
||||
"support"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_empty.tentative.https.html": [
|
||||
"38ec4048f1944c3f6bfe904592ee0646e28979f2",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.js": [
|
||||
"ed0cdcfcfca7e91109df45628999c51c5cbee236",
|
||||
"support"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.tentative.https.html": [
|
||||
"ee9713e933b8432c73c7e2e9ad523a453ddb4c60",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_mismatch.js": [
|
||||
"5414a664db6771f4c87614af9e3b9f7b597f4664",
|
||||
"support"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_mismatch.tentative.https.html": [
|
||||
"b8ad46a57101386bd84b391953e76228249eff29",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_cookieStore_subscriptions_reset.tentative.https.html": [
|
||||
"4e157840e988edd373a20e8041b90bd086dc83de",
|
||||
"bff1f04bad061c187b33b56e1760b97b784cb690",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_mismatched_subscription.tentative.https.any.js": [
|
||||
"bfbea7d3de386c18828bab90da20c97afd7b88f7",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_multiple_subscriptions.tentative.https.any.js": [
|
||||
"17baa7fcbeec00d92753708b1e816b50eea230c0",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_overlapping_subscriptions.tentative.https.any.js": [
|
||||
"b1cbeb9a12f31a2111ac6afe31a98a2b21433d52",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_cookiechange_eventhandler_single_subscription.tentative.https.any.js": [
|
||||
"4cfc47b39fb9a8c08c90e1cebf5150c5a455eef9",
|
||||
"testharness"
|
||||
],
|
||||
"cookie-store/serviceworker_oncookiechange_eventhandler_single_subscription.tentative.https.any.js": [
|
||||
"d3fe3281acad629ff6f4d4af8d28f9d13ccd5525",
|
||||
"testharness"
|
||||
],
|
||||
"cookies/META.yml": [
|
||||
|
@ -603689,7 +603841,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/css-transforms/parsing/scale-parsing-valid.html": [
|
||||
"bbd443a717ab3c4acf1c7be52df4d92b9b8a9d03",
|
||||
"9055e7dfd5f4b9ea03683ff546317198f7946c3a",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-transforms/parsing/transform-box-computed.html": [
|
||||
|
@ -603705,7 +603857,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/css-transforms/parsing/transform-invalid.html": [
|
||||
"25aeeae4e5df99febd541a61a5f0b0f9a8ff2471",
|
||||
"8985720622c692a93fda9d0277ca188f581f852a",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-transforms/parsing/transform-origin-computed.html": [
|
||||
|
@ -603721,7 +603873,7 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/css-transforms/parsing/transform-valid.html": [
|
||||
"8237a9a4a6882dd0ec3495464c8fbfb7f52e65d3",
|
||||
"ce32e2b44e6edb8c743035eba324db273d205cb2",
|
||||
"testharness"
|
||||
],
|
||||
"css/css-transforms/parsing/translate-parsing-invalid.html": [
|
||||
|
@ -605857,11 +606009,11 @@
|
|||
"testharness"
|
||||
],
|
||||
"css/css-transforms/transform-scale-percent-001.html": [
|
||||
"79d32b5c0453d7a219cb3d6e03a7653ed342f947",
|
||||
"09874988628c8cb10c3c5c9dcb59c3b2266f9326",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-transforms/transform-scale-percent-ref.html": [
|
||||
"be0bac656b650e6d3fa561df6e482118cbcc1b69",
|
||||
"f6bd014135369fb8ec641f8953ff224a84ce6275",
|
||||
"support"
|
||||
],
|
||||
"css/css-transforms/transform-scale-ref.html": [
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[transform-scale-percent-001.html]
|
||||
expected: FAIL
|
|
@ -309,18 +309,24 @@
|
|||
[<iframe>: separate response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html */*;charset=gbk]
|
||||
[<iframe>: combined response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -53,3 +53,6 @@
|
|||
[combined text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript;charset=windows-1252 error text/javascript]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,3 +11,6 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%0C]
|
||||
expected: FAIL
|
||||
|
||||
[Content-Type-Options%3A%20nosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -8,14 +8,8 @@
|
|||
expected: FAIL
|
||||
|
||||
[Embedded credentials are treated as network errors in new windows.]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Embedded credentials matching the top-level are not treated as network errors for relative URLs.]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Embedded credentials matching the top-level are not treated as network errors for same-origin URLs.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[navigation-unload-same-origin-fragment.html]
|
||||
[Tests that a fragment navigation in the unload handler will not block the initial navigation]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_2.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_3.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[traverse_the_history_4.html]
|
||||
[traverse_the_history_5.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,24 +1,5 @@
|
|||
[open-features-negative-top-left.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: negative values for `top`, `left`]
|
||||
expected: FAIL
|
||||
|
||||
[features "top=-204" should NOT set "top=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "top=-204.5" should NOT set "top=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "left=-204" should NOT set "left=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "top=-0" should NOT set "top=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "left=-204.5" should NOT set "left=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "left=-0" should NOT set "left=204"]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,24 +1,5 @@
|
|||
[open-features-negative-width-height.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: negative values for `width`, `height`]
|
||||
expected: FAIL
|
||||
|
||||
[features "height=-404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "height=-404e1" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "height=-404.5" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "width=-404" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "width=-404e1" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "width=-404.5" should NOT set "width=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,48 +1,32 @@
|
|||
[open-features-non-integer-height.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[HTML: window.open `features`: non-integer values for feature `height`]
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405*3" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405.32" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405e1" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405/5" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405^4" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405.5" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405e-1" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405 " should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[features "height=405LLl" should set "height=405"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "height=/404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[top=0,left=0,width=401,: absence of feature "height" should be treated same as "height=0"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[top=0,left=0: absence of feature "height" should be treated same as "height=0"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "height=_404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
|
||||
[features "height=L404" should NOT set "height=404"]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[embedded-opener-remove-frame.html]
|
||||
expected: CRASH
|
||||
[opener and "removed" embedded documents]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[WorkerGlobalScope-close.html]
|
||||
[Test sending a message after closing.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
[import-in-moduleworker.html]
|
||||
expected: ERROR
|
||||
[Base URL in module dedicated workers: import]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
// META: title=Cookie Store API: ServiceWorker without cookie change subscriptions
|
||||
// META: global=!default,serviceworker,window
|
||||
// META: script=/service-workers/service-worker/resources/test-helpers.sub.js
|
||||
|
||||
'use strict';
|
||||
|
||||
promise_test(async testCase => {
|
||||
if (self.GLOBAL.isWindow()) {
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
testCase, 'resources/empty_sw.js', 'resources/does/not/exist');
|
||||
testCase.add_cleanup(() => registration.unregister());
|
||||
|
||||
// Wait for this service worker to become active before snapshotting the
|
||||
// subscription state, for consistency with other tests.
|
||||
await wait_for_state(testCase, registration.installing, 'activated');
|
||||
|
||||
self.registration = registration;
|
||||
} else {
|
||||
// Wait for this service worker to become active before snapshotting the
|
||||
// subscription state, for consistency with other tests.
|
||||
await new Promise(resolve => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
}
|
||||
|
||||
const subscriptions = await registration.cookies.getSubscriptions();
|
||||
assert_equals(subscriptions.length, 0);
|
||||
}, 'getSubscriptions returns an empty array when there are no subscriptions');
|
|
@ -0,0 +1,70 @@
|
|||
// META: title=Cookie Store API: ServiceWorker with multiple cookie change subscriptions
|
||||
// META: global=!default,serviceworker,window
|
||||
// META: script=/service-workers/service-worker/resources/test-helpers.sub.js
|
||||
|
||||
'use strict';
|
||||
|
||||
// sort() comparator that uses the < operator.
|
||||
//
|
||||
// This is intended to be used for sorting strings. Using < is preferred to
|
||||
// localeCompare() because the latter has some implementation-dependent
|
||||
// behavior.
|
||||
function CompareStrings(a, b) {
|
||||
return a < b ? -1 : (b < a ? 1 : 0);
|
||||
}
|
||||
|
||||
promise_test(async testCase => {
|
||||
let scope;
|
||||
|
||||
if (self.GLOBAL.isWindow()) {
|
||||
scope = '/cookie-store/resources/does/not/exist';
|
||||
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
testCase, 'resources/empty_sw.js', scope);
|
||||
testCase.add_cleanup(() => registration.unregister());
|
||||
|
||||
// Must wait for the service worker to enter the 'activated' state before
|
||||
// subscribing to cookiechange events.
|
||||
await wait_for_state(testCase, registration.installing, 'activated');
|
||||
|
||||
self.registration = registration;
|
||||
} else {
|
||||
scope = '/cookie-store/does/not/exist';
|
||||
|
||||
// Must wait for the service worker to enter the 'activated' state before
|
||||
// subscribing to cookiechange events.
|
||||
await new Promise(resolve => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
const subscriptions = [
|
||||
{ name: 'cookie-name1', matchType: 'equals', url: `${scope}/path1` },
|
||||
];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
}
|
||||
{
|
||||
const subscriptions = [
|
||||
{ }, // Test the default values for subscription properties.
|
||||
{ name: 'cookie-prefix', matchType: 'starts-with' },
|
||||
];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
}
|
||||
|
||||
const subscriptions = await registration.cookies.getSubscriptions();
|
||||
assert_equals(subscriptions.length, 3);
|
||||
|
||||
subscriptions.sort((a, b) => CompareStrings(`${a.name}`, `${b.name}`));
|
||||
|
||||
assert_equals(subscriptions[0].name, 'cookie-name1');
|
||||
assert_equals('equals', subscriptions[0].matchType);
|
||||
|
||||
assert_equals(subscriptions[1].name, 'cookie-prefix');
|
||||
assert_equals('starts-with', subscriptions[1].matchType);
|
||||
|
||||
assert_false('name' in subscriptions[2]);
|
||||
assert_equals('starts-with', subscriptions[2].matchType);
|
||||
}, 'getSubscriptions returns a subscription passed to subscribe');
|
|
@ -0,0 +1,47 @@
|
|||
// META: title=Cookie Store API: ServiceWorker with one cookie change subscription
|
||||
// META: global=!default,serviceworker,window
|
||||
// META: script=/service-workers/service-worker/resources/test-helpers.sub.js
|
||||
|
||||
'use strict';
|
||||
|
||||
promise_test(async testCase => {
|
||||
let scope;
|
||||
|
||||
if (self.GLOBAL.isWindow()) {
|
||||
scope = '/cookie-store/resources/does/not/exist';
|
||||
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
testCase, 'resources/empty_sw.js', scope);
|
||||
testCase.add_cleanup(() => registration.unregister());
|
||||
|
||||
// Must wait for the service worker to enter the 'activated' state before
|
||||
// subscribing to cookiechange events.
|
||||
await wait_for_state(testCase, registration.installing, 'activated');
|
||||
|
||||
self.registration = registration;
|
||||
} else {
|
||||
scope = '/cookie-store/does/not/exist';
|
||||
|
||||
// Must wait for the service worker to enter the 'activated' state before
|
||||
// subscribing to cookiechange events.
|
||||
await new Promise(resolve => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
const subscriptions = [
|
||||
{ name: 'cookie-name', matchType: 'equals', url: `${scope}/path` }
|
||||
];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
}
|
||||
|
||||
const subscriptions = await registration.cookies.getSubscriptions();
|
||||
assert_equals(subscriptions.length, 1);
|
||||
|
||||
assert_equals(subscriptions[0].name, 'cookie-name');
|
||||
assert_equals(subscriptions[0].matchType, 'equals');
|
||||
assert_equals(subscriptions[0].url,
|
||||
(new URL(`${scope}/path`, self.location.href)).href);
|
||||
}, 'getSubscriptions returns a subscription passed to subscribe');
|
|
@ -1,23 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Async Cookies: cookie change events in ServiceWorker</title>
|
||||
<link rel="help" href="https://github.com/WICG/cookie-store">
|
||||
<link rel="author" href="pwnall@chromium.org" title="Victor Costan">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
(async () => {
|
||||
// Not using an explicit scope here in order for script URL to be in scope,
|
||||
// to cover implicit subscription URL construction.
|
||||
|
||||
const registration = await navigator.serviceWorker.register(
|
||||
'serviceworker_cookieStore_subscriptions.js');
|
||||
add_completion_callback(() => {
|
||||
registration.unregister();
|
||||
});
|
||||
|
||||
fetch_tests_from_worker(registration.installing);
|
||||
})();
|
||||
</script>
|
|
@ -1,61 +0,0 @@
|
|||
self.GLOBAL = {
|
||||
isWindow: function() { return false; },
|
||||
isWorker: function() { return true; },
|
||||
};
|
||||
importScripts("/resources/testharness.js");
|
||||
|
||||
// Resolves when the service worker receives the 'activate' event.
|
||||
const kServiceWorkerActivatedPromise = new Promise(resolve => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
|
||||
promise_test(async testCase => {
|
||||
await kServiceWorkerActivatedPromise;
|
||||
|
||||
{
|
||||
const subscriptions = [
|
||||
{ name: 'cookie-name', matchType: 'equals',
|
||||
url: '/cookie-store/scope/path' }];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
}
|
||||
|
||||
const subscriptions = await registration.cookies.getSubscriptions();
|
||||
assert_equals(subscriptions.length, 1);
|
||||
|
||||
assert_equals(subscriptions[0].name, 'cookie-name');
|
||||
assert_equals(subscriptions[0].matchType, 'equals');
|
||||
assert_equals(subscriptions[0].url,
|
||||
(new URL("/cookie-store/scope/path", self.location.href)).href);
|
||||
}, 'getSubscriptions returns a subscription passed to subscribe');
|
||||
|
||||
const kCookieChangeReceivedPromise = new Promise((resolve) => {
|
||||
self.addEventListener('cookiechange', event => { resolve(event); });
|
||||
});
|
||||
|
||||
promise_test(async testCase => {
|
||||
await kServiceWorkerActivatedPromise;
|
||||
|
||||
const subscriptions = [
|
||||
{ name: 'cookie-name', matchType: 'equals',
|
||||
url: '/cookie-store/scope/path' }];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
const event = await kCookieChangeReceivedPromise;
|
||||
assert_equals(event.type, 'cookiechange');
|
||||
assert_equals(event.changed.length, 1);
|
||||
assert_equals(event.changed[0].name, 'cookie-name');
|
||||
assert_equals(event.changed[0].value, 'cookie-value');
|
||||
assert_equals(event.deleted.length, 0);
|
||||
assert_true(event instanceof ExtendableCookieChangeEvent);
|
||||
assert_true(event instanceof ExtendableEvent);
|
||||
}, 'cookiechange dispatched with cookie change that matches subscription ' +
|
||||
'to event handler registered with addEventListener');
|
||||
|
||||
done();
|
|
@ -1,22 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Async Cookies: cookie change events in ServiceWorker</title>
|
||||
<link rel="help" href="https://github.com/WICG/cookie-store">
|
||||
<link rel="author" href="pwnall@chromium.org" title="Victor Costan">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
(async () => {
|
||||
const scope = 'scope';
|
||||
|
||||
const registration = await navigator.serviceWorker.register(
|
||||
'serviceworker_cookieStore_subscriptions_basic.js', {scope});
|
||||
add_completion_callback(() => {
|
||||
registration.unregister();
|
||||
});
|
||||
|
||||
fetch_tests_from_worker(registration.installing);
|
||||
})();
|
||||
</script>
|
|
@ -1,20 +0,0 @@
|
|||
self.GLOBAL = {
|
||||
isWindow: function() { return false; },
|
||||
isWorker: function() { return true; },
|
||||
};
|
||||
importScripts("/resources/testharness.js");
|
||||
|
||||
// Resolves when the service worker receives the 'activate' event.
|
||||
const kServiceWorkerActivatedPromise = new Promise(resolve => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
|
||||
promise_test(async testCase => {
|
||||
await kServiceWorkerActivatedPromise;
|
||||
|
||||
const subscriptions = await registration.cookies.getSubscriptions();
|
||||
assert_equals(subscriptions.length, 0);
|
||||
|
||||
}, 'getSubscriptions returns an empty array when there are no subscriptions');
|
||||
|
||||
done();
|
|
@ -1,21 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Async Cookies: ServiceWorker without cookie change subscriptions</title>
|
||||
<link rel="help" href="https://github.com/WICG/cookie-store">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
(async () => {
|
||||
const scope = 'scope';
|
||||
|
||||
const registration = await navigator.serviceWorker.register(
|
||||
'serviceworker_cookieStore_subscriptions_empty.js', {scope});
|
||||
add_completion_callback(() => {
|
||||
registration.unregister();
|
||||
});
|
||||
|
||||
fetch_tests_from_worker(registration.installing);
|
||||
})();
|
||||
</script>
|
|
@ -1,22 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Async Cookies: oncookiechange event handler attribute in ServiceWorker</title>
|
||||
<link rel="help" href="https://github.com/WICG/cookie-store">
|
||||
<link rel="author" href="pwnall@chromium.org" title="Victor Costan">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
(async () => {
|
||||
const scope = 'scope';
|
||||
|
||||
const registration = await navigator.serviceWorker.register(
|
||||
'serviceworker_cookieStore_subscriptions_eventhandler_attribute.js', {scope});
|
||||
add_completion_callback(() => {
|
||||
registration.unregister();
|
||||
});
|
||||
|
||||
fetch_tests_from_worker(registration.installing);
|
||||
})();
|
||||
</script>
|
|
@ -1,21 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Async Cookies: ServiceWorker cookiechange event filtering</title>
|
||||
<link rel="help" href="https://github.com/WICG/cookie-store">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
(async () => {
|
||||
const scope = 'scope';
|
||||
|
||||
const registration = await navigator.serviceWorker.register(
|
||||
'serviceworker_cookieStore_subscriptions_mismatch.js', {scope});
|
||||
add_completion_callback(() => {
|
||||
registration.unregister();
|
||||
});
|
||||
|
||||
fetch_tests_from_worker(registration.installing);
|
||||
})();
|
||||
</script>
|
|
@ -1,6 +1,6 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Async Cookies: reset cookie change subscription list</title>
|
||||
<title>Cookie Store API: reset cookie change subscription list</title>
|
||||
<link rel="help" href="https://github.com/WICG/cookie-store">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
self.GLOBAL = {
|
||||
isWindow: function() { return false; },
|
||||
isWorker: function() { return true; },
|
||||
};
|
||||
importScripts("/resources/testharness.js");
|
||||
// META: title=Cookie Store API: cookiechange event in ServiceWorker with mismatched subscription
|
||||
// META: global=!default,serviceworker
|
||||
|
||||
'use strict';
|
||||
|
||||
const kScope = '/cookie-store/does/not/exist';
|
||||
|
||||
// Resolves when the service worker receives the 'activate' event.
|
||||
const kServiceWorkerActivatedPromise = new Promise((resolve) => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
|
||||
// Resolves when a cookiechange event is received.
|
||||
const kCookieChangeReceivedPromise = new Promise((resolve) => {
|
||||
self.addEventListener('cookiechange', (event) => {
|
||||
resolve(event);
|
||||
|
@ -19,8 +21,8 @@ promise_test(async testCase => {
|
|||
await kServiceWorkerActivatedPromise;
|
||||
|
||||
const subscriptions = [
|
||||
{ name: 'cookie-name', matchType: 'equals',
|
||||
url: '/cookie-store/scope/path' }];
|
||||
{ name: 'cookie-name', matchType: 'equals', url: `${kScope}/path` },
|
||||
];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
|
||||
|
@ -38,6 +40,7 @@ promise_test(async testCase => {
|
|||
assert_equals(event.changed.length, 1);
|
||||
assert_equals(event.changed[0].name, 'cookie-name');
|
||||
assert_equals(event.changed[0].value, 'cookie-value');
|
||||
assert_equals(event.deleted.length, 0);
|
||||
assert_true(event instanceof ExtendableCookieChangeEvent);
|
||||
assert_true(event instanceof ExtendableEvent);
|
||||
}, 'cookiechange not dispatched for change that does not match subscription');
|
||||
|
||||
done();
|
|
@ -1,57 +1,15 @@
|
|||
self.GLOBAL = {
|
||||
isWindow: function() { return false; },
|
||||
isWorker: function() { return true; },
|
||||
};
|
||||
importScripts("/resources/testharness.js");
|
||||
// META: title=Cookie Store API: cookiechange event in ServiceWorker with multiple subscriptions
|
||||
// META: global=!default,serviceworker
|
||||
|
||||
'use strict';
|
||||
|
||||
const kScope = '/cookie-store/does/not/exist';
|
||||
|
||||
// Resolves when the service worker receives the 'activate' event.
|
||||
const kServiceWorkerActivatedPromise = new Promise(resolve => {
|
||||
const kServiceWorkerActivatedPromise = new Promise((resolve) => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
|
||||
// sort() comparator that uses the < operator.
|
||||
//
|
||||
// This is intended to be used for sorting strings. Using < is preferred to
|
||||
// localeCompare() because the latter has some implementation-dependent
|
||||
// behavior.
|
||||
function CompareStrings(a, b) {
|
||||
return a < b ? -1 : (b < a ? 1 : 0);
|
||||
}
|
||||
|
||||
promise_test(async testCase => {
|
||||
await kServiceWorkerActivatedPromise;
|
||||
|
||||
{
|
||||
const subscriptions = [
|
||||
{ name: 'cookie-name1', matchType: 'equals', url: '/cookie-store/path1' },
|
||||
];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
}
|
||||
{
|
||||
const subscriptions = [
|
||||
{ }, // Test the default values for subscription properties.
|
||||
{ name: 'cookie-prefix', matchType: 'starts-with' },
|
||||
];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
}
|
||||
|
||||
const subscriptions = await registration.cookies.getSubscriptions();
|
||||
assert_equals(subscriptions.length, 3);
|
||||
|
||||
subscriptions.sort((a, b) => CompareStrings(`${a.name}`, `${b.name}`));
|
||||
|
||||
assert_equals(subscriptions[0].name, 'cookie-name1');
|
||||
assert_equals('equals', subscriptions[0].matchType);
|
||||
|
||||
assert_equals(subscriptions[1].name, 'cookie-prefix');
|
||||
assert_equals('starts-with', subscriptions[1].matchType);
|
||||
|
||||
assert_false('name' in subscriptions[2]);
|
||||
assert_equals('starts-with', subscriptions[2].matchType);
|
||||
}, 'getSubscriptions returns subscriptions passed to subscribe');
|
||||
|
||||
// Accumulates cookiechange events dispatched to the service worker.
|
||||
let g_cookie_changes = [];
|
||||
|
||||
|
@ -61,8 +19,9 @@ let g_cookie_change_received_promise = null;
|
|||
let g_cookie_change_received_promise_resolver = null;
|
||||
self.addEventListener('cookiechange', (event) => {
|
||||
g_cookie_changes.push(event);
|
||||
if (g_cookie_change_received_promise_resolver)
|
||||
if (g_cookie_change_received_promise_resolver) {
|
||||
g_cookie_change_received_promise_resolver();
|
||||
}
|
||||
});
|
||||
function RearmCookieChangeReceivedPromise() {
|
||||
g_cookie_change_received_promise = new Promise((resolve) => {
|
||||
|
@ -76,7 +35,7 @@ promise_test(async testCase => {
|
|||
|
||||
{
|
||||
const subscriptions = [
|
||||
{ name: 'cookie-name1', matchType: 'equals', url: '/cookie-store/path1' },
|
||||
{ name: 'cookie-name1', matchType: 'equals', url: `${kScope}/path1` },
|
||||
];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
|
@ -100,7 +59,7 @@ promise_test(async testCase => {
|
|||
testCase.add_cleanup(() => RearmCookieChangeReceivedPromise());
|
||||
|
||||
assert_equals(g_cookie_changes.length, 1);
|
||||
const event = g_cookie_changes[0]
|
||||
const event = g_cookie_changes[0];
|
||||
assert_equals(event.type, 'cookiechange');
|
||||
assert_equals(event.changed.length, 1);
|
||||
assert_equals(event.changed[0].name, 'cookie-name');
|
||||
|
@ -109,5 +68,3 @@ promise_test(async testCase => {
|
|||
assert_true(event instanceof ExtendableCookieChangeEvent);
|
||||
assert_true(event instanceof ExtendableEvent);
|
||||
}, 'cookiechange dispatched with cookie change that matches subscription');
|
||||
|
||||
done();
|
|
@ -0,0 +1,87 @@
|
|||
// META: title=Cookie Store API: cookiechange event in ServiceWorker with overlapping subscriptions
|
||||
// META: global=!default,serviceworker
|
||||
|
||||
'use strict';
|
||||
|
||||
const kScope = '/cookie-store/does/not/exist';
|
||||
|
||||
// Resolves when the service worker receives the 'activate' event.
|
||||
const kServiceWorkerActivatedPromise = new Promise((resolve) => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
|
||||
// Accumulates cookiechange events dispatched to the service worker.
|
||||
let g_cookie_changes = [];
|
||||
|
||||
// Resolved when a cookiechange event is received. Rearmed by
|
||||
// RearmCookieChangeReceivedPromise().
|
||||
let g_cookie_change_received_promise = null;
|
||||
let g_cookie_change_received_promise_resolver = null;
|
||||
self.addEventListener('cookiechange', (event) => {
|
||||
g_cookie_changes.push(event);
|
||||
if (g_cookie_change_received_promise_resolver) {
|
||||
g_cookie_change_received_promise_resolver();
|
||||
RearmCookieChangeReceivedPromise();
|
||||
}
|
||||
});
|
||||
function RearmCookieChangeReceivedPromise() {
|
||||
g_cookie_change_received_promise = new Promise((resolve) => {
|
||||
g_cookie_change_received_promise_resolver = resolve;
|
||||
});
|
||||
}
|
||||
RearmCookieChangeReceivedPromise();
|
||||
|
||||
promise_test(async testCase => {
|
||||
await kServiceWorkerActivatedPromise;
|
||||
|
||||
const subscriptions = [
|
||||
{ name: 'coo', matchType: 'starts-with' },
|
||||
{ name: 'cookie', matchType: 'starts-with' },
|
||||
];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
testCase.add_cleanup(() => { g_cookie_changes = []; });
|
||||
|
||||
await g_cookie_change_received_promise;
|
||||
testCase.add_cleanup(() => RearmCookieChangeReceivedPromise());
|
||||
|
||||
// To ensure that we are accounting for all events dispatched by the first
|
||||
// cookie change, we initiate and listen for a final cookie change that we
|
||||
// know will dispatch a single event.
|
||||
await cookieStore.set('coo', 'coo-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('coo');
|
||||
});
|
||||
testCase.add_cleanup(() => { g_cookie_changes = []; });
|
||||
|
||||
await g_cookie_change_received_promise;
|
||||
testCase.add_cleanup(() => RearmCookieChangeReceivedPromise());
|
||||
|
||||
assert_equals(g_cookie_changes.length, 2);
|
||||
{
|
||||
const event = g_cookie_changes[0];
|
||||
assert_equals(event.type, 'cookiechange');
|
||||
assert_equals(event.changed.length, 1);
|
||||
assert_equals(event.changed[0].name, 'cookie-name');
|
||||
assert_equals(event.changed[0].value, 'cookie-value');
|
||||
assert_equals(event.deleted.length, 0);
|
||||
assert_true(event instanceof ExtendableCookieChangeEvent);
|
||||
assert_true(event instanceof ExtendableEvent);
|
||||
}
|
||||
{
|
||||
const event = g_cookie_changes[1];
|
||||
assert_equals(event.type, 'cookiechange');
|
||||
assert_equals(event.changed.length, 1);
|
||||
assert_equals(event.changed[0].name, 'coo');
|
||||
assert_equals(event.changed[0].value, 'coo-value');
|
||||
assert_equals(event.deleted.length, 0);
|
||||
assert_true(event instanceof ExtendableCookieChangeEvent);
|
||||
assert_true(event instanceof ExtendableEvent);
|
||||
}
|
||||
}, '1 cookiechange event dispatched with cookie change that matches multiple ' +
|
||||
'subscriptions');
|
|
@ -0,0 +1,41 @@
|
|||
// META: title=Cookie Store API: cookiechange event in ServiceWorker with single subscription
|
||||
// META: global=!default,serviceworker
|
||||
|
||||
'use strict';
|
||||
|
||||
const kScope = '/cookie-store/does/not/exist';
|
||||
|
||||
// Resolves when the service worker receives the 'activate' event.
|
||||
const kServiceWorkerActivatedPromise = new Promise((resolve) => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
|
||||
// Resolves when a cookiechange event is received.
|
||||
const kCookieChangeReceivedPromise = new Promise(resolve => {
|
||||
self.addEventListener('cookiechange', event => { resolve(event); });
|
||||
});
|
||||
|
||||
promise_test(async testCase => {
|
||||
await kServiceWorkerActivatedPromise;
|
||||
|
||||
const subscriptions = [
|
||||
{ name: 'cookie-name', matchType: 'equals', url: `${kScope}/path` },
|
||||
];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
|
||||
await cookieStore.set('cookie-name', 'cookie-value');
|
||||
testCase.add_cleanup(async () => {
|
||||
await cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
const event = await kCookieChangeReceivedPromise;
|
||||
assert_equals(event.type, 'cookiechange');
|
||||
assert_equals(event.changed.length, 1);
|
||||
assert_equals(event.changed[0].name, 'cookie-name');
|
||||
assert_equals(event.changed[0].value, 'cookie-value');
|
||||
assert_equals(event.deleted.length, 0);
|
||||
assert_true(event instanceof ExtendableCookieChangeEvent);
|
||||
assert_true(event instanceof ExtendableEvent);
|
||||
}, 'cookiechange dispatched with cookie change that matches subscription ' +
|
||||
'to cookiechange event handler registered with addEventListener');
|
|
@ -1,26 +1,26 @@
|
|||
self.GLOBAL = {
|
||||
isWindow: function() { return false; },
|
||||
isWorker: function() { return true; },
|
||||
};
|
||||
importScripts("/resources/testharness.js");
|
||||
// META: title=Cookie Store API: oncookiechange event in ServiceWorker with single subscription
|
||||
// META: global=!default,serviceworker
|
||||
|
||||
'use strict';
|
||||
|
||||
const kScope = '/cookie-store/does/not/exist';
|
||||
|
||||
// Resolves when the service worker receives the 'activate' event.
|
||||
const kServiceWorkerActivatedPromise = new Promise((resolve) => {
|
||||
self.addEventListener('activate', event => { resolve(); });
|
||||
});
|
||||
|
||||
const kCookieChangeReceivedPromise = new Promise((resolve) => {
|
||||
self.addEventListener('cookiechange', (event) => {
|
||||
resolve(event);
|
||||
});
|
||||
// Resolves when a cookiechange event is received.
|
||||
const kCookieChangeReceivedPromise = new Promise(resolve => {
|
||||
self.oncookiechange = event => { resolve(event); };
|
||||
});
|
||||
|
||||
promise_test(async testCase => {
|
||||
await kServiceWorkerActivatedPromise;
|
||||
|
||||
const subscriptions = [
|
||||
{ name: 'cookie-name', matchType: 'equals',
|
||||
url: '/cookie-store/scope/path' }];
|
||||
{ name: 'cookie-name', matchType: 'equals', url: `${kScope}/path` }
|
||||
];
|
||||
await registration.cookies.subscribe(subscriptions);
|
||||
testCase.add_cleanup(() => registration.cookies.unsubscribe(subscriptions));
|
||||
|
||||
|
@ -38,6 +38,4 @@ promise_test(async testCase => {
|
|||
assert_true(event instanceof ExtendableCookieChangeEvent);
|
||||
assert_true(event instanceof ExtendableEvent);
|
||||
}, 'cookiechange dispatched with cookie change that matches subscription ' +
|
||||
'to event handler registered with oncookiechange');
|
||||
|
||||
done();
|
||||
'to cookiechange event handler registered with addEventListener');
|
|
@ -14,14 +14,28 @@
|
|||
test_valid_value("scale", "none");
|
||||
|
||||
test_valid_value("scale", "1");
|
||||
test_valid_value("scale", "1%", "0.01");
|
||||
|
||||
test_valid_value("scale", "100");
|
||||
test_valid_value("scale", "100%", "1");
|
||||
test_valid_value("scale", "100 100", "100");
|
||||
test_valid_value("scale", "100% 100%", "1");
|
||||
test_valid_value("scale", "100 100 1", "100");
|
||||
test_valid_value("scale", "100% 100% 1", "1");
|
||||
|
||||
test_valid_value("scale", "-100");
|
||||
test_valid_value("scale", "-100%", "-1");
|
||||
test_valid_value("scale", "-100 -100", "-100");
|
||||
test_valid_value("scale", "-100% -100%", "-1");
|
||||
test_valid_value("scale", "-100 -100 1", "-100");
|
||||
test_valid_value("scale", "-100% -100% 1", "-1");
|
||||
|
||||
test_valid_value("scale", "100 200");
|
||||
test_valid_value("scale", "100% 200%", "1 2");
|
||||
test_valid_value("scale", "100 200 1", "100 200");
|
||||
test_valid_value("scale", "100% 200% 1", "1 2");
|
||||
test_valid_value("scale", "100 200 300");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -23,10 +23,13 @@ test_invalid_value("transform", "translateX(-4px, 5px)");
|
|||
test_invalid_value("transform", "translateY(4%, 5%)");
|
||||
|
||||
test_invalid_value("transform", "scale(6, 7, 8)");
|
||||
test_invalid_value("transform", "scale(6%, 7%, 8%)");
|
||||
|
||||
test_invalid_value("transform", "scaleX(1, 2)");
|
||||
test_invalid_value("transform", "scaleX(1%, 2%)");
|
||||
|
||||
test_invalid_value("transform", "scaleY(3, 4)");
|
||||
test_invalid_value("transform", "scaleY(3%, 4%)");
|
||||
|
||||
test_invalid_value("transform", "rotate(0, 0)");
|
||||
test_invalid_value("transform", "rotate(0, 0, 0)");
|
||||
|
|
|
@ -26,11 +26,27 @@ test_valid_value("transform", "translateY(5%)");
|
|||
|
||||
test_valid_value("transform", "scale(2)");
|
||||
test_valid_value("transform", "scale(3, 4)");
|
||||
|
||||
test_valid_value("transform", "scale(-2)");
|
||||
test_valid_value("transform", "scale(-5, -6)");
|
||||
|
||||
test_valid_value("transform", "scale(250%)", "scale(2.5)");
|
||||
test_valid_value("transform", "scale(325%, 475%)", "scale(3.25, 4.75)");
|
||||
|
||||
test_valid_value("transform", "scale(-250%)", "scale(-2.5)");
|
||||
test_valid_value("transform", "scale(-500%, -620%)", "scale(-5, -6.2)");
|
||||
|
||||
test_valid_value("transform", "scaleX(7)");
|
||||
test_valid_value("transform", "scaleX(720%)", "scaleX(7.2)");
|
||||
|
||||
test_valid_value("transform", "scaleY(-8)");
|
||||
test_valid_value("transform", "scaleY(-85%)", "scaleY(-0.85)");
|
||||
|
||||
test_valid_value("transform", "scale3d(0.5, 2.5, 3)");
|
||||
test_valid_value("transform", "scale3d(50%, 250%, 300%)", "scale3d(0.5, 2.5, 3)");
|
||||
|
||||
test_valid_value("transform", "scale3d(-0.5, 2.5, -3)");
|
||||
test_valid_value("transform", "scale3d(-50%, 250%, -300%)", "scale3d(-0.5, 2.5, -3)");
|
||||
|
||||
test_valid_value("transform", "rotate(0)", "rotate(0deg)");
|
||||
test_valid_value("transform", "rotate(90deg)");
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
<link rel="author" title="Aryeh Gregor" href="mailto:ayg@aryeh.name">
|
||||
<link rel="help" href="http://www.w3.org/TR/css-transforms-1/#two-d-transform-functions">
|
||||
<link rel="help" href="http://www.w3.org/TR/css-transforms-1/#funcdef-scale">
|
||||
<meta name="assert" content='This tests that scale(50%, 50%) does nothing,
|
||||
because scale() is defined to take numbers and not percentages.'>
|
||||
<meta name="assert" content='This tests that scale(50%, 75%) is equivalent to scale(0.5, 0.75),
|
||||
because scale() is defined to accept both numbers and percentages.'>
|
||||
<link rel="match" href="transform-scale-percent-ref.html">
|
||||
<style>
|
||||
div {
|
||||
background: green;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
transform: scale(50%, 50%);
|
||||
transform: scale(50%, 75%);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
background: green;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
transform: scale(0.5, 0.75)
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue