Update web-platform-tests to revision 3840f46213d9a991acc9288e3863530f7502c05e

This commit is contained in:
WPT Sync Bot 2019-06-06 12:17:06 +00:00
parent 347d8bdf72
commit 141ba90a6d
58 changed files with 1507 additions and 883 deletions

View file

@ -14,9 +14,6 @@
[Revoke blob URL after creating Request, will fetch]
expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL
[url-with-fetch.any.html]
[Untitled]

View file

@ -87593,6 +87593,18 @@
{}
]
],
"css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order.html": [
[
"css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order.html",
[
[
"/css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order-ref.html",
"=="
]
],
{}
]
],
"css/CSS2/stacking-context/opacity-change-parent-stacking-context.html": [
[
"css/CSS2/stacking-context/opacity-change-parent-stacking-context.html",
@ -113745,6 +113757,18 @@
{}
]
],
"css/css-contain/contain-size-select-002.html": [
[
"css/css-contain/contain-size-select-002.html",
[
[
"/css/css-contain/reference/contain-size-select-001-ref.html",
"=="
]
],
{}
]
],
"css/css-contain/contain-strict-001.html": [
[
"css/css-contain/contain-strict-001.html",
@ -140243,6 +140267,30 @@
{}
]
],
"css/css-sizing/clone-nowrap-intrinsic-size-bidi.html": [
[
"css/css-sizing/clone-nowrap-intrinsic-size-bidi.html",
[
[
"/css/css-sizing/clone-nowrap-intrinsic-size-bidi-ref.html",
"=="
]
],
{}
]
],
"css/css-sizing/clone-nowrap-intrinsic-size.html": [
[
"css/css-sizing/clone-nowrap-intrinsic-size.html",
[
[
"/css/css-sizing/clone-nowrap-intrinsic-size-ref.html",
"=="
]
],
{}
]
],
"css/css-sizing/dynamic-available-size-iframe.html": [
[
"css/css-sizing/dynamic-available-size-iframe.html",
@ -140543,6 +140591,30 @@
{}
]
],
"css/css-sizing/slice-nowrap-intrinsic-size-bidi.html": [
[
"css/css-sizing/slice-nowrap-intrinsic-size-bidi.html",
[
[
"/css/css-sizing/slice-nowrap-intrinsic-size-bidi-ref.html",
"=="
]
],
{}
]
],
"css/css-sizing/slice-nowrap-intrinsic-size.html": [
[
"css/css-sizing/slice-nowrap-intrinsic-size.html",
[
[
"/css/css-sizing/slice-nowrap-intrinsic-size-ref.html",
"=="
]
],
{}
]
],
"css/css-sizing/whitespace-and-break.html": [
[
"css/css-sizing/whitespace-and-break.html",
@ -235627,6 +235699,9 @@
"css/CSS2/selectors/universal-selector-005-ref.xht": [
[]
],
"css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order-ref.html": [
[]
],
"css/CSS2/stacking-context/opacity-change-parent-stacking-context-ref.html": [
[]
],
@ -250195,6 +250270,12 @@
"css/css-sizing/clone-intrinsic-size-ref.html": [
[]
],
"css/css-sizing/clone-nowrap-intrinsic-size-bidi-ref.html": [
[]
],
"css/css-sizing/clone-nowrap-intrinsic-size-ref.html": [
[]
],
"css/css-sizing/image-min-max-content-intrinsic-size-change-001-ref.html": [
[]
],
@ -250231,6 +250312,12 @@
"css/css-sizing/slice-intrinsic-size-ref.html": [
[]
],
"css/css-sizing/slice-nowrap-intrinsic-size-bidi-ref.html": [
[]
],
"css/css-sizing/slice-nowrap-intrinsic-size-ref.html": [
[]
],
"css/css-sizing/support/dynamic-available-size-iframe.html": [
[]
],
@ -307125,9 +307212,9 @@
{}
]
],
"css/css-backgrounds/inheritance.html": [
"css/css-backgrounds/inheritance.sub.html": [
[
"css/css-backgrounds/inheritance.html",
"css/css-backgrounds/inheritance.sub.html",
{}
]
],
@ -314943,6 +315030,30 @@
{}
]
],
"css/css-text-decor/text-underline-offset-computed.html": [
[
"css/css-text-decor/text-underline-offset-computed.html",
{}
]
],
"css/css-text-decor/text-underline-offset-initial.html": [
[
"css/css-text-decor/text-underline-offset-initial.html",
{}
]
],
"css/css-text-decor/text-underline-offset-invalid.html": [
[
"css/css-text-decor/text-underline-offset-invalid.html",
{}
]
],
"css/css-text-decor/text-underline-offset-valid.html": [
[
"css/css-text-decor/text-underline-offset-valid.html",
{}
]
],
"css/css-text/i18n/css3-text-line-break-baspglwj-001.html": [
[
"css/css-text/i18n/css3-text-line-break-baspglwj-001.html",
@ -325880,6 +325991,12 @@
{}
]
],
"element-timing/observe-text.html": [
[
"element-timing/observe-text.html",
{}
]
],
"element-timing/observe-video-poster.html": [
[
"element-timing/observe-video-poster.html",
@ -359884,32 +360001,6 @@
}
]
],
"native-file-system/FileSystemBaseHandle-copyTo.tentative.window.js": [
[
"native-file-system/FileSystemBaseHandle-copyTo.tentative.window.html",
{
"script_metadata": [
[
"script",
"resources/test-helpers.js"
]
]
}
]
],
"native-file-system/FileSystemBaseHandle-moveTo.tentative.window.js": [
[
"native-file-system/FileSystemBaseHandle-moveTo.tentative.window.html",
{
"script_metadata": [
[
"script",
"resources/test-helpers.js"
]
]
}
]
],
"native-file-system/FileSystemBaseHandle-remove.tentative.window.js": [
[
"native-file-system/FileSystemBaseHandle-remove.tentative.window.html",
@ -508648,6 +508739,14 @@
"1946e4f25e483b384e55e75cae4a1cd2da2c4cfa",
"reftest"
],
"css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order-ref.html": [
"9bf223c3b567c086faa1d941bf96c778ee0c3568",
"support"
],
"css/CSS2/stacking-context/composite-change-after-scroll-preserves-stacking-order.html": [
"1abf6f292ea654f28cf9082d0d89623304a12a74",
"reftest"
],
"css/CSS2/stacking-context/opacity-change-parent-stacking-context-ref.html": [
"0e38f92ae4743552c86ac4a65cd8b054ea03a880",
"support"
@ -529249,7 +529348,7 @@
"visual"
],
"css/css-backgrounds/border-radius-dynamic-from-no-radius-ref.html": [
"72ada88416255c18c4e6606bee4b6cf8dc353698",
"e0ab6ce4414b107b4ca6a3fce8d6f5976d9bd7db",
"support"
],
"css/css-backgrounds/border-radius-dynamic-from-no-radius.html": [
@ -529568,8 +529667,8 @@
"842832c01bac0c0643395ed3387d7263ec4dbf0f",
"reftest"
],
"css/css-backgrounds/inheritance.html": [
"fb8a69b46798762f435dc222954f1b7115e7cf9a",
"css/css-backgrounds/inheritance.sub.html": [
"01bb8422991ee48da525087d5462c380c5eb8b84",
"testharness"
],
"css/css-backgrounds/justfortest.html": [
@ -532384,6 +532483,10 @@
"071db67831fd7951b8568ca1b7e4dcc5dbc119a1",
"reftest"
],
"css/css-contain/contain-size-select-002.html": [
"88d37323e1baffed92d431f9b951c4fef2b43e1c",
"reftest"
],
"css/css-contain/contain-strict-001.html": [
"142730c5cd3a0048027e5bf41cca397e3facad60",
"reftest"
@ -548421,7 +548524,7 @@
"reftest"
],
"css/css-grid/grid-layout-properties.html": [
"b1b0bd87d494e0045c9a56501011428ac1af3ab8",
"0debe91f9246f67753cdb89c62ef818cbba73063",
"testharness"
],
"css/css-grid/grid-model/display-grid.html": [
@ -559680,6 +559783,22 @@
"35c6bd1dadbf16d191b1c3dcb039bbe5a7123ca0",
"reftest"
],
"css/css-sizing/clone-nowrap-intrinsic-size-bidi-ref.html": [
"1c12148d9fb61e58f08d69ec9bda273be6ebf5d2",
"support"
],
"css/css-sizing/clone-nowrap-intrinsic-size-bidi.html": [
"32601bb911e5fd50ceaa97fa191d114cb38e398c",
"reftest"
],
"css/css-sizing/clone-nowrap-intrinsic-size-ref.html": [
"04dacc62b85520fc714d2f50991ddb12d103ab94",
"support"
],
"css/css-sizing/clone-nowrap-intrinsic-size.html": [
"c7bdd08a40aa4b39206a63111a42d34993a08686",
"reftest"
],
"css/css-sizing/dynamic-available-size-iframe.html": [
"fc265d4d933a85280e4ebb26990163a1805d0634",
"reftest"
@ -559912,6 +560031,22 @@
"2ef2a6ee6b1546b6e000c33688273a12790b16f5",
"reftest"
],
"css/css-sizing/slice-nowrap-intrinsic-size-bidi-ref.html": [
"dae4bc71b094f4de1f6e24b26b8d7786a5e53321",
"support"
],
"css/css-sizing/slice-nowrap-intrinsic-size-bidi.html": [
"1167912fbdb336b49608392a7f6414dc87b1fb3b",
"reftest"
],
"css/css-sizing/slice-nowrap-intrinsic-size-ref.html": [
"34c04e8e306f19f7c7d2048f6b9ec3ffa507019a",
"support"
],
"css/css-sizing/slice-nowrap-intrinsic-size.html": [
"724a9086672ec52c7d2a8bea38a2a5cc7fb7dc50",
"reftest"
],
"css/css-sizing/support/dynamic-available-size-iframe.html": [
"8b61c876389e1fbd0792dd58763e3e2a3d4ef133",
"support"
@ -561660,6 +561795,22 @@
"1c108faabd33fbbd4827bb1fca9a3d4834037deb",
"testharness"
],
"css/css-text-decor/text-underline-offset-computed.html": [
"32dfd24fbaa5633c60d9307d78847f9cae3e9b97",
"testharness"
],
"css/css-text-decor/text-underline-offset-initial.html": [
"630aa95eca042839dc4944a90dc5aecef536b8f8",
"testharness"
],
"css/css-text-decor/text-underline-offset-invalid.html": [
"62f770497cbde626e28988583a28f90544ac39b5",
"testharness"
],
"css/css-text-decor/text-underline-offset-valid.html": [
"46b4c9e18fdbbe18657de60d424975f17fbbb558",
"testharness"
],
"css/css-text-decor/text-underline-position-019-manual.html": [
"0308fbc8c9ed4b54865a5b382741c148c6853981",
"manual"
@ -577817,7 +577968,7 @@
"reftest"
],
"css/css-ui/text-overflow-023.html": [
"a8122185dae1232201bd47953e70d6820d439633",
"b9c21ed8f22e5380773a6ebdf620913be7aa77e1",
"testharness"
],
"css/css-ui/text-overflow-024-ref.html": [
@ -603225,7 +603376,7 @@
"testharness"
],
"element-timing/background-image-multiple-elements.html": [
"a4ad83dbae069f241224219487a31f3abb67ce75",
"24f72a67c34d0cc5323c6d4a0acb2e25085ec87a",
"testharness"
],
"element-timing/background-image-stretched.html": [
@ -603324,6 +603475,10 @@
"29fec392a993b793fe824e8a6f6c1a9867740f6c",
"testharness"
],
"element-timing/observe-text.html": [
"a9a0e30adf353f342ad8bb6a2300ea90beb5d9fa",
"testharness"
],
"element-timing/observe-video-poster.html": [
"9f82478ea27779d7bb52dd9bc4966d5e5c09f6a3",
"testharness"
@ -603345,7 +603500,7 @@
"support"
],
"element-timing/resources/element-timing-helpers.js": [
"3ab4859fb2f8b736c02399dd0fb85b4541f9fd2f",
"6c0aec80960ebab60979986434272a96ecc6c674",
"support"
],
"element-timing/resources/iframe-with-square-sends-entry.html": [
@ -635376,14 +635531,6 @@
"0d9137dc6fb91b1499d922e01d6ad96049f5757b",
"testharness"
],
"native-file-system/FileSystemBaseHandle-copyTo.tentative.window.js": [
"972d1dadf1967a122673c29d05e81e7cf8f70889",
"testharness"
],
"native-file-system/FileSystemBaseHandle-moveTo.tentative.window.js": [
"872891870c36d3d7141c39564ecb652fd4dbb2c9",
"testharness"
],
"native-file-system/FileSystemBaseHandle-remove.tentative.window.js": [
"5a8e67b8478caa022dccb10c14f64103e329e5c9",
"testharness"
@ -657265,7 +657412,7 @@
"testharness"
],
"service-workers/service-worker/getregistration.https.html": [
"72a2c25379cd0c04d605a8d42bebfd7cb4e5d44e",
"634c2efa12461a811d8e46345ece0298086f64b2",
"testharness"
],
"service-workers/service-worker/getregistrations.https.html": [
@ -658941,11 +659088,11 @@
"testharness"
],
"service-workers/service-worker/unregister-then-register-new-script.https.html": [
"582132a742fc9bb0fba62ee025356f983938da1b",
"a07da7d398fa686952e9b7e00df62a07d07fde7b",
"testharness"
],
"service-workers/service-worker/unregister-then-register.https.html": [
"303b2be2b7d1dca0d69d84ae561a582421061622",
"ddbbcfd9934f75c050a5212c1e823a8105ca44f4",
"testharness"
],
"service-workers/service-worker/unregister.https.html": [

View file

@ -0,0 +1,2 @@
[composite-change-after-scroll-preserves-stacking-order.html]
expected: TIMEOUT

View file

@ -0,0 +1,4 @@
[inheritance.sub.html]
[Inheritance of CSS Backgrounds and Borders properties]
expected: FAIL

View file

@ -0,0 +1,10 @@
[text-underline-offset-computed.html]
[Property text-underline-offset value 'auto' computes to 'auto']
expected: FAIL
[Property text-underline-offset value 'calc(10px - 8px)' computes to '2px']
expected: FAIL
[Property text-underline-offset value 'from-font' computes to 'from-font']
expected: FAIL

View file

@ -0,0 +1,4 @@
[text-underline-offset-initial.html]
[Initial value of text-underline-offset]
expected: FAIL

View file

@ -0,0 +1,25 @@
[text-underline-offset-valid.html]
[e.style['text-underline-offset'\] = "53px" should set the property value]
expected: FAIL
[e.style['text-underline-offset'\] = "calc(-13em + 50px)" should set the property value]
expected: FAIL
[e.style['text-underline-offset'\] = "2001em" should set the property value]
expected: FAIL
[e.style['text-underline-offset'\] = "auto" should set the property value]
expected: FAIL
[e.style['text-underline-offset'\] = "-10px" should set the property value]
expected: FAIL
[e.style['text-underline-offset'\] = "calc(40em - 10px)" should set the property value]
expected: FAIL
[e.style['text-underline-offset'\] = "from-font" should set the property value]
expected: FAIL
[e.style['text-underline-offset'\] = "-49em" should set the property value]
expected: FAIL

View file

@ -56,6 +56,3 @@
[background-position length(px) / events]
expected: FAIL
[font-size length(em) / events]
expected: FAIL

View file

@ -74,6 +74,3 @@
[opacity end]
expected: FAIL
[outline-width end]
expected: FAIL

View file

@ -2,3 +2,6 @@
[Checks hit testing on the ellipsis]
expected: FAIL
[CSS Basic User Interface Test: interacting with the ellipsis]
expected: FAIL

View file

@ -1,3 +1,3 @@
[vh_not_refreshing_on_chrome.html]
bug: https://github.com/servo/servo/issues/8984
expected: TIMEOUT
expected: CRASH

View file

@ -0,0 +1,2 @@
[matchMedia-display-none-iframe.html]
expected: ERROR

View file

@ -318,9 +318,21 @@
[<iframe>: combined response Content-Type: */* text/html]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
expected: FAIL
[<iframe>: combined response Content-Type: text/html */*]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*]
expected: FAIL
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL

View file

@ -11,6 +11,3 @@
[X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL
[Content-Type-Options%3A%20nosniff]
expected: FAIL

View file

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

View file

@ -1,24 +1,5 @@
[open-features-negative-innerwidth-innerheight.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: negative values for legacy `innerwidth`, `innerheight`]
expected: FAIL
[features "innerheight=-404.5" should NOT set "height=404"]
expected: TIMEOUT
[features "innerwidth=-404.5" should NOT set "width=404"]
expected: TIMEOUT
[features "innerwidth=-404" should NOT set "width=404"]
expected: TIMEOUT
[features "innerheight=-404e1" should NOT set "height=404"]
expected: TIMEOUT
[features "innerheight=-404" should NOT set "height=404"]
expected: TIMEOUT
[features "innerwidth=-404e1" should NOT set "width=404"]
expected: TIMEOUT

View file

@ -1,24 +1,5 @@
[open-features-negative-screenx-screeny.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: negative values for legacy `screenx`, `screeny`]
expected: FAIL
[features "screenx=-204" should NOT set "left=204"]
expected: TIMEOUT
[features "screeny=-204" should NOT set "top=204"]
expected: TIMEOUT
[features "screeny=-204.5" should NOT set "top=204"]
expected: TIMEOUT
[features "screeny=-0" should NOT set "top=204"]
expected: TIMEOUT
[features "screenx=-0" should NOT set "left=204"]
expected: TIMEOUT
[features "screenx=-204.5" should NOT set "left=204"]
expected: TIMEOUT

View file

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

View file

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

View file

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

View file

@ -1,42 +1,32 @@
[open-features-non-integer-innerheight.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `innerheight`]
expected: FAIL
[features "innerheight=405e-1" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405LLl" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405^4" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405e1" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405 " should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405/5" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405.32" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405.5" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "innerheight=405*3" should set "height=405"]
expected: TIMEOUT
[features "innerheight=_404" should NOT set "height=404"]
expected: TIMEOUT
[features "innerheight=L404" should NOT set "height=404"]
expected: TIMEOUT
[features "innerheight=/404" should NOT set "height=404"]
expected: TIMEOUT
expected: FAIL

View file

@ -1,42 +1,32 @@
[open-features-non-integer-innerwidth.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `innerwidth`]
expected: FAIL
[features "innerwidth=405e-1" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405*3" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405.5" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405e1" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405.32" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405 " should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405LLl" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405/5" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "innerwidth=405^4" should set "width=405"]
expected: TIMEOUT
[features "innerwidth=/404" should NOT set "width=404"]
expected: TIMEOUT
[features "innerwidth=_404" should NOT set "width=404"]
expected: TIMEOUT
[features "innerwidth=L404" should NOT set "width=404"]
expected: TIMEOUT
expected: FAIL

View file

@ -1,42 +1,32 @@
[open-features-non-integer-left.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `left`]
expected: FAIL
[features "left=105e1" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "left=105 " should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "left=105/5" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "left=105e-1" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "left=105^4" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "left=105LLl" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "left=105.32" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "left=105*3" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "left=105.5" should set "left=105"]
expected: TIMEOUT
[features "left=L104" should NOT set "left=104"]
expected: TIMEOUT
[features "left=/104" should NOT set "left=104"]
expected: TIMEOUT
[features "left=_104" should NOT set "left=104"]
expected: TIMEOUT
expected: FAIL

View file

@ -1,42 +1,32 @@
[open-features-non-integer-screenx.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `screenx`]
expected: FAIL
[features "screenx=105.5" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105e1" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105 " should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105*3" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105e-1" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105^4" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105LLl" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105/5" should set "left=105"]
expected: TIMEOUT
expected: FAIL
[features "screenx=105.32" should set "left=105"]
expected: TIMEOUT
[features "screenx=_104" should NOT set "left=104"]
expected: TIMEOUT
[features "screenx=L104" should NOT set "left=104"]
expected: TIMEOUT
[features "screenx=/104" should NOT set "left=104"]
expected: TIMEOUT
expected: FAIL

View file

@ -1,42 +1,32 @@
[open-features-non-integer-screeny.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for legacy feature `screeny`]
expected: FAIL
[features "screeny=405^4" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405e-1" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405LLl" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405e1" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405 " should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405/5" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405*3" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405.32" should set "height=405"]
expected: TIMEOUT
expected: FAIL
[features "screeny=405.5" should set "height=405"]
expected: TIMEOUT
[features "screeny=_404" should NOT set "height=404"]
expected: TIMEOUT
[features "screeny=L404" should NOT set "height=404"]
expected: TIMEOUT
[features "screeny=/404" should NOT set "height=404"]
expected: TIMEOUT
expected: FAIL

View file

@ -1,42 +1,32 @@
[open-features-non-integer-top.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `top`]
expected: FAIL
[features "top=105/5" should set "top=105"]
expected: TIMEOUT
expected: FAIL
[features "top=105*3" should set "top=105"]
expected: TIMEOUT
expected: FAIL
[features "top=105LLl" should set "top=105"]
expected: TIMEOUT
expected: FAIL
[features "top=105e-1" should set "top=105"]
expected: TIMEOUT
expected: FAIL
[features "top=105.32" should set "top=105"]
expected: TIMEOUT
expected: FAIL
[features "top=105e1" should set "top=105"]
expected: TIMEOUT
expected: FAIL
[features "top=105 " should set "top=105"]
expected: TIMEOUT
expected: FAIL
[features "top=105^4" should set "top=105"]
expected: TIMEOUT
expected: FAIL
[features "top=105.5" should set "top=105"]
expected: TIMEOUT
[features "top=/104" should NOT set "top=104"]
expected: TIMEOUT
[features "top=_104" should NOT set "top=104"]
expected: TIMEOUT
[features "top=L104" should NOT set "top=104"]
expected: TIMEOUT
expected: FAIL

View file

@ -1,48 +1,32 @@
[open-features-non-integer-width.html]
type: testharness
expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `width`]
expected: FAIL
[features "width=405^4" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405.5" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405e1" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405 " should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405.32" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405LLl" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405*3" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405e-1" should set "width=405"]
expected: TIMEOUT
expected: FAIL
[features "width=405/5" should set "width=405"]
expected: TIMEOUT
[top=0,left=0: absence of feature "width" should be treated same as "width=0"]
expected: TIMEOUT
[features "width=_404" should NOT set "width=404"]
expected: TIMEOUT
[top=0,left=0,height=401,: absence of feature "width" should be treated same as "width=0"]
expected: TIMEOUT
[features "width=/404" should NOT set "width=404"]
expected: TIMEOUT
[features "width=L404" should NOT set "width=404"]
expected: TIMEOUT
expected: FAIL

View file

@ -1,5 +1,4 @@
[realtimeanalyser-fft-scaling.html]
expected: TIMEOUT
[X 2048-point FFT peak position is not equal to 64. Got 0.]
expected: FAIL

View file

@ -1,4 +1,5 @@
[import-in-moduleworker.html]
expected: ERROR
[Base URL in module dedicated workers: import]
expected: FAIL

View file

@ -1,2 +0,0 @@
[Worker-constructor.html]
expected: ERROR

View file

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

View file

@ -0,0 +1,19 @@
<!doctype HTML>
<link rel="author" title="Chris Harrelson" href="chrishtr@chromium.org">
<style>
#one, #two {
width: 200px; height: 200px; background: lightblue; position: relative
}
#one {
background: lightblue
}
#two {
background: lightgray;
margin-top: -200px;
}
</style>
<div id=scroller style="overflow: scroll; width: 300px; height: 300px; will-change: transform">
<div id=one></div>
<div id=two></div>
<div id=spacer style="width: 50px; height: 5000px"></div>
</div>

View file

@ -0,0 +1,39 @@
<!doctype HTML>
<link rel="author" title="Chris Harrelson" href="chrishtr@chromium.org">
<link rel="match" href="composite-change-after-scroll-preserves-stacking-order-ref.html">
<link rel="help" href="https://www.w3.org/TR/CSS2/zindex.html"/>
<script src="/common/reftest-wait.js"></script>
<script src="/web-animations/testcommon.js"></script>
<style>
#one, #two {
width: 200px; height: 200px; background: lightblue; position: relative
}
#one {
background: lightblue
}
#two {
background: lightgray;
margin-top: -200px;
}
</style>
<html class=reftest-wait>
<div id=scroller style="overflow: scroll; width: 300px; height: 300px; will-change: transform">
<div id=one></div>
<div id=two></div>
<div id=spacer style="width: 50px; height: 5000px"></div>
</div>
</html>
<script>
onload = () => {
waitForAnimationFrames(2).then(() => {
scroller.scrollBy(0, 1000);
waitForAnimationFrames(2).then(() => {
one.style = 'will-change: transform';
waitForAnimationFrames(2).then(() => {
scroller.scrollBy(0, -1000);
takeScreenshot();
});
});
});
};
</script>

View file

@ -11,7 +11,7 @@
width: 100%;
height: 100%;
background: green;
border-radius: 50px;
border-radius: 99px;
}
</style>
<p>Should be a green circle below</p>

View file

@ -40,7 +40,7 @@ container.style.color = currentColor;
assert_not_inherited('background-attachment', 'scroll', 'fixed');
assert_not_inherited('background-clip', 'border-box', 'padding-box');
assert_not_inherited('background-color', transparentColor, 'rgb(42, 53, 64)');
assert_not_inherited('background-image', 'none', 'url("https://example.com/")');
assert_not_inherited('background-image', 'none', 'url("https://{{host}}/")');
assert_not_inherited('background-origin', 'padding-box', 'content-box');
assert_not_inherited('background-position', '0% 0%', '10px 20px');
assert_not_inherited('background-position-x', '0%', '10px');
@ -57,7 +57,7 @@ assert_not_inherited('border-bottom-width', mediumWidth, '10px');
assert_not_inherited('border-image-outset', '0', '1px 2px 3px 4px');
assert_not_inherited('border-image-repeat', 'stretch', 'repeat round');
assert_not_inherited('border-image-slice', '100%', '1% 2% 3% 4% fill');
assert_not_inherited('border-image-source', 'none', 'url("https://example.com/")');
assert_not_inherited('border-image-source', 'none', 'url("https://{{host}}/")');
assert_not_inherited('border-image-width', '1', '1px 2px 3px 4px');
assert_not_inherited('border-left-color', currentColor, 'rgb(42, 53, 64)');

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Containment Test: Size containment on select</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-size">
<link rel="match" href="reference/contain-size-select-001-ref.html">
<meta name=assert content="Check that setting 'contain: size' on a <select> elements causes it to be sized as having no contents.">
<style>
select {
color: white;
background: white;
}
</style>
<p>Test passes if it has the same output than the reference.</p>
<select id="target">
<option>AVeryLongOption</option>
<option>Another Option</option>
</select>
<script>
window.requestAnimationFrame( () => {
target.style.contain = "size";
});
</script>

View file

@ -11,6 +11,7 @@
<meta name="assert" content="Test checks that css properties of grid layout exist.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
#container {
width: 800px;
@ -34,6 +35,8 @@
</div>
<script>
setup({explicit_done: true});
document.fonts.ready.then(()=> {
var myDiv = document.getElementById('myDiv')
test(function(){
@ -228,6 +231,8 @@
'reset': ['auto', 'auto'],
},
})
done();
});
</script>
</body>
</html>

View file

@ -0,0 +1,79 @@
<!DOCTYPE html>
<head>
<title>CSS Reference: min/max-content size on box-decoration-break:clone inline box with bidi text and white-space:nowrap</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
div {
border: 5px solid blue;
white-space: pre;
}
.max > div {
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
span {
border: 2px solid gray;
padding: 0 10px 0 6px;
border-width: 0 8px 0 5px;
margin: 0 4px 0 3px;
background: yellow;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
f { margin-right: 30px; float: left; }
</style>
<body>
<f class="max">
<div><span>&#x202e;a&#x202d;bc</span><span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc </span><span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span><span> d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc </span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa<span> d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa</div>
</f>
<f class="max">
<div><span>&#x202e;a&#x202d;bc</span><span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc </span><span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span><span> d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc </span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa<span> d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa</div>
</f>

View file

@ -0,0 +1,110 @@
<!DOCTYPE html>
<head>
<title>CSS Test: min/max-content size on box-decoration-break:clone inline box with bidi text and white-space:nowrap</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content">
<link rel="help" href="https://drafts.csswg.org/css-break-3/#break-decoration">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1556709">
<link rel="match" href="clone-nowrap-intrinsic-size-bidi-ref.html">
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
div {
border: 5px solid blue;
white-space: nowrap;
}
.max > div {
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
.min > div {
width: -moz-min-content;
width: -webkit-min-content;
width: min-content;
}
span {
border: 2px solid gray;
padding: 0 10px 0 6px;
border-width: 0 8px 0 5px;
margin: 0 4px 0 3px;
background: yellow;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
f { margin-right: 30px; float: left; }
</style>
<body>
<f class="max">
<div>
<span>&#x202e;a&#x202d;bc</span><span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc </span><span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span><span> d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc </span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa<span> d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa </div>
</f>
<f class="min">
<div>
<span>&#x202e;a&#x202d;bc</span><span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc </span><span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span><span> d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc </span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa<span> d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa </div>
</f>

View file

@ -0,0 +1,79 @@
<!DOCTYPE html>
<head>
<title>CSS Reference: min/max-content size on box-decoration-break:clone inline box w. white-space:nowrap</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
div {
border: 5px solid blue;
white-space: pre;
}
.max > div {
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
span {
border: 2px solid gray;
padding: 0 10px 0 6px;
border-width: 0 8px 0 5px;
margin: 0 4px 0 3px;
background: yellow;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
f { margin-right: 30px; float: left; }
</style>
<body>
<f class="max">
<div><span>aaa</span><span>aaa</span>
</div>
<div><span>aaa</span>aa<span>aaa</span>
</div>
<div><span>aaa</span> <span>aaa</span>
</div>
<div><span>aaa </span><span>aaa</span>
</div>
<div><span>aaa</span><span> aaa</span>
</div>
<div><span>aaa</span> aa<span>aaa</span>
</div>
<div><span>aaa </span>aa<span>aaa</span>
</div>
<div><span>aaa</span>aa<span> aaa</span>
</div>
<div><span>aaa</span> aa <span>aaa</span>
</div>
<div><span>aaa</span>aa <span>aaa</span>
</div>
<div><span>aaa</span>aa</div>
</f>
<f class="max">
<div><span>aaa</span><span>aaa</span>
</div>
<div><span>aaa</span>aa<span>aaa</span>
</div>
<div><span>aaa</span> <span>aaa</span>
</div>
<div><span>aaa </span><span>aaa</span>
</div>
<div><span>aaa</span><span> aaa</span>
</div>
<div><span>aaa</span> aa<span>aaa</span>
</div>
<div><span>aaa </span>aa<span>aaa</span>
</div>
<div><span>aaa</span>aa<span> aaa</span>
</div>
<div><span>aaa</span> aa <span>aaa</span>
</div>
<div><span>aaa</span>aa <span>aaa</span>
</div>
<div><span>aaa</span>aa</div>
</f>

View file

@ -0,0 +1,110 @@
<!DOCTYPE html>
<head>
<title>CSS Test: min/max-content size on box-decoration-break:clone inline box w. white-space:nowrap</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content">
<link rel="help" href="https://drafts.csswg.org/css-break-3/#break-decoration">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1556709">
<link rel="match" href="clone-nowrap-intrinsic-size-ref.html">
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
div {
border: 5px solid blue;
white-space: nowrap;
}
.max > div {
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
.min > div {
width: -moz-min-content;
width: -webkit-min-content;
width: min-content;
}
span {
border: 2px solid gray;
padding: 0 10px 0 6px;
border-width: 0 8px 0 5px;
margin: 0 4px 0 3px;
background: yellow;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
f { margin-right: 30px; float: left; }
</style>
<body>
<f class="max">
<div>
<span>aaa</span><span>aaa</span>
</div>
<div>
<span>aaa</span>aa<span>aaa</span>
</div>
<div>
<span>aaa</span> <span>aaa</span>
</div>
<div>
<span>aaa </span><span>aaa</span>
</div>
<div>
<span>aaa</span><span> aaa</span>
</div>
<div>
<span>aaa</span> aa<span>aaa</span>
</div>
<div>
<span>aaa </span>aa<span>aaa</span>
</div>
<div>
<span>aaa</span>aa<span> aaa</span>
</div>
<div>
<span>aaa</span> aa <span>aaa</span>
</div>
<div>
<span>aaa</span>aa <span>aaa</span>
</div>
<div>
<span>aaa</span>aa </div>
</f>
<f class="min">
<div>
<span>aaa</span><span>aaa</span>
</div>
<div>
<span>aaa</span>aa<span>aaa</span>
</div>
<div>
<span>aaa</span> <span>aaa</span>
</div>
<div>
<span>aaa </span><span>aaa</span>
</div>
<div>
<span>aaa</span><span> aaa</span>
</div>
<div>
<span>aaa</span> aa<span>aaa</span>
</div>
<div>
<span>aaa </span>aa<span>aaa</span>
</div>
<div>
<span>aaa</span>aa<span> aaa</span>
</div>
<div>
<span>aaa</span> aa <span>aaa</span>
</div>
<div>
<span>aaa</span>aa <span>aaa</span>
</div>
<div>
<span>aaa</span>aa </div>
</f>

View file

@ -0,0 +1,79 @@
<!DOCTYPE html>
<head>
<title>CSS Reference: min/max-content size on box-decoration-break:slice inline box with bidi text and white-space:nowrap</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
div {
border: 5px solid blue;
white-space: pre;
}
.max > div {
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
span {
border: 2px solid gray;
padding: 0 10px 0 6px;
border-width: 0 8px 0 5px;
margin: 0 4px 0 3px;
background: yellow;
}
f { margin-right: 30px; float: left; }
.l { margin-right:0; border-right-width:0; padding-right:0 }
.r { margin-left:0; border-left-width:0; padding-left:0 }
</style>
<body>
<f class="max">
<div><span>&#x202e;a&#x202d;bc</span><span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc </span><span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span><span> d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc </span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa<span> d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa</div>
</f>
<f class="max">
<div><span>&#x202e;a&#x202d;bc</span><span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc </span><span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span><span> d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc </span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa<span> d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span> aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div><span>&#x202e;a&#x202d;bc</span>aa</div>
</f>

View file

@ -0,0 +1,108 @@
<!DOCTYPE html>
<head>
<title>CSS Test: min/max-content size on box-decoration-break:slice inline box with bidi text and white-space:nowrap</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content">
<link rel="help" href="https://drafts.csswg.org/css-break-3/#break-decoration">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1556709">
<link rel="match" href="slice-nowrap-intrinsic-size-bidi-ref.html">
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
div {
border: 5px solid blue;
white-space: nowrap;
}
.max > div {
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
.min > div {
width: -moz-min-content;
width: -webkit-min-content;
width: min-content;
}
span {
border: 2px solid gray;
padding: 0 10px 0 6px;
border-width: 0 8px 0 5px;
margin: 0 4px 0 3px;
background: yellow;
}
f { margin-right: 30px; float: left; }
</style>
<body>
<f class="max">
<div>
<span>&#x202e;a&#x202d;bc</span><span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc </span><span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span><span> d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc </span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa<span> d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa </div>
</f>
<f class="min">
<div>
<span>&#x202e;a&#x202d;bc</span><span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc </span><span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span><span> d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc </span>aa<span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa<span> d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span> aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa <span>d&#x202e;e&#x202d;f</span>
</div>
<div>
<span>&#x202e;a&#x202d;bc</span>aa </div>
</f>

View file

@ -0,0 +1,57 @@
<!DOCTYPE html>
<head>
<title>CSS Reference: min/max-content size on box-decoration-break:slice inline box w. white-space:nowrap</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
div {
border: 5px solid blue;
white-space: pre;
}
.max > div {
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
span {
border: 2px solid gray;
padding: 0 10px 0 6px;
border-width: 0 8px 0 5px;
margin: 0 4px 0 3px;
background: yellow;
}
f { margin-right: 30px; float: left; }
</style>
<body>
<f class="max">
<div><span>aaa</span><span>aaa</span></div>
<div><span>aaa</span>aa<span>aaa</span></div>
<div><span>aaa</span> <span>aaa</span></div>
<div><span>aaa </span><span>aaa</span></div>
<div><span>aaa</span><span> aaa</span></div>
<div><span>aaa</span> aa<span>aaa</span></div>
<div><span>aaa </span>aa<span>aaa</span></div>
<div><span>aaa</span>aa<span> aaa</span></div>
<div><span>aaa</span> aa <span>aaa</span></div>
<div><span>aaa</span>aa <span>aaa</span></div>
<div><span>aaa</span>aa</div>
</f>
<f class="max">
<div><span>aaa</span><span>aaa</span></div>
<div><span>aaa</span>aa<span>aaa</span></div>
<div><span>aaa</span> <span>aaa</span></div>
<div><span>aaa </span><span>aaa</span></div>
<div><span>aaa</span><span> aaa</span></div>
<div><span>aaa</span> aa<span>aaa</span></div>
<div><span>aaa </span>aa<span>aaa</span></div>
<div><span>aaa</span>aa<span> aaa</span></div>
<div><span>aaa</span> aa <span>aaa</span></div>
<div><span>aaa</span>aa <span>aaa</span></div>
<div><span>aaa</span>aa</div>
</f>

View file

@ -0,0 +1,111 @@
<!DOCTYPE html>
<head>
<title>CSS Test: min/max-content size on box-decoration-break:slice inline box w. white-space:nowrap</title>
<link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#valdef-width-min-content">
<link rel="help" href="https://drafts.csswg.org/css-break-3/#break-decoration">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1556709">
<link rel="match" href="slice-nowrap-intrinsic-size-ref.html">
<style>
html,body {
color:black; background-color:white; font:10px/1 monospace; padding:0; margin:0;
}
div {
border: 5px solid blue;
white-space: nowrap;
}
.max > div {
width: -moz-max-content;
width: -webkit-max-content;
width: max-content;
}
.min > div {
width: -moz-min-content;
width: -webkit-min-content;
width: min-content;
}
span {
border: 2px solid gray;
padding: 0 10px 0 6px;
border-width: 0 8px 0 5px;
margin: 0 4px 0 3px;
background: yellow;
/* for clarity: */
-webkit-box-decoration-break: slice;
box-decoration-break: slice;
}
f { margin-right: 30px; float: left; }
</style>
<body>
<f class="max">
<div>
<span>aaa</span><span>aaa</span>
</div>
<div>
<span>aaa</span>aa<span>aaa</span>
</div>
<div>
<span>aaa</span> <span>aaa</span>
</div>
<div>
<span>aaa </span><span>aaa</span>
</div>
<div>
<span>aaa</span><span> aaa</span>
</div>
<div>
<span>aaa</span> aa<span>aaa</span>
</div>
<div>
<span>aaa </span>aa<span>aaa</span>
</div>
<div>
<span>aaa</span>aa<span> aaa</span>
</div>
<div>
<span>aaa</span> aa <span>aaa</span>
</div>
<div>
<span>aaa</span>aa <span>aaa</span>
</div>
<div>
<span>aaa</span>aa </div>
</f>
<f class="min">
<div>
<span>aaa</span><span>aaa</span>
</div>
<div>
<span>aaa</span>aa<span>aaa</span>
</div>
<div>
<span>aaa</span> <span>aaa</span>
</div>
<div>
<span>aaa </span><span>aaa</span>
</div>
<div>
<span>aaa</span><span> aaa</span>
</div>
<div>
<span>aaa</span> aa<span>aaa</span>
</div>
<div>
<span>aaa </span>aa<span>aaa</span>
</div>
<div>
<span>aaa</span>aa<span> aaa</span>
</div>
<div>
<span>aaa</span> aa <span>aaa</span>
</div>
<div>
<span>aaa</span>aa <span>aaa</span>
</div>
<div>
<span>aaa</span>aa </div>
</f>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Text Decoration Test: parsing text-underline-offset computed values</title>
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#underline-offset">
<meta name="assert" content="text-underline-offset computed value is as specified.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("text-underline-offset", "auto");
test_computed_value("text-underline-offset", "from-font");
test_computed_value("text-underline-offset", "calc(10px - 8px)", "2px");
</script>
</body>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" title="2.4 Text Underline Offset: the 'text-underline-offset' property"
href="https://drafts.csswg.org/css-text-decor-4/#underline-offset" />
</head>
<body>
<script>
test(function() {
assert_equals(getComputedStyle(document.body)["text-underline-offset"], "auto", "Must be set to value auto as initial value.");
}, "Initial value of text-underline-offset");
</script>
</body>
</html>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Text Decoration Test: parsing text-underline-offset with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#underline-offset">
<meta name="assert" content="text-underline-offset supports the following values: auto | from-font| <length>">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("text-underline-offset", "otto");
test_invalid_value("text-underline-offset", "asdlflj");
test_invalid_value("text-underline-offset", "-10");
test_invalid_value("text-underline-offset", "60002020");
test_invalid_value("text-underline-offset", "!@#$%^&");
test_invalid_value("text-underline-offset", "10e2");
test_invalid_value("text-underline-offset", "from font");
test_invalid_value("text-underline-offset", "10%");
test_invalid_value("text-underline-offset", "-27%");
test_invalid_value("text-underline-offset", "calc(40% - 20px)");
test_invalid_value("text-underline-offset", "calc(100% - 40em)");
</script>
</body>
</html>

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Text Decoration Test: parsing text-underline-offset with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#underline-offset">
<meta name="assert" content="text-underline-offset supports the following values: auto | from-font| <length>">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("text-underline-offset", "auto");
test_valid_value("text-underline-offset", "from-font");
test_valid_value("text-underline-offset", "-10px");
test_valid_value("text-underline-offset", "2001em");
test_valid_value("text-underline-offset", "-49em");
test_valid_value("text-underline-offset", "53px");
test_valid_value("text-underline-offset", "calc(40em - 10px)");
test_valid_value("text-underline-offset", "calc(-13em + 50px)");
</script>
</body>
</html>

View file

@ -15,6 +15,7 @@
-->
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
#parent {
position: absolute;
@ -27,9 +28,13 @@
</style>
<div id=parent>&nbsp;&nbsp;<span id=target>&nbsp;&nbsp;</span></div>
<script>
setup({explicit_done: true});
document.fonts.ready.then(()=> {
test(
function() {
var e = document.elementFromPoint(125,25);
assert_equals(e.id,"target", "the element targeted by a hit on the ellipsis is the elided inline.");
}, "Checks hit testing on the ellipsis");
done();
});
</script>

View file

@ -29,7 +29,8 @@ body {
let beforeRender = performance.now();
let numObservedElements = 0;
let observedDiv1 = false;
let observedDiv2 = false;
let observedDiv2Img = false;
let observedDiv2Txt = false;
const index = window.location.href.lastIndexOf('/');
const pathname = window.location.href.substring(0, index) +
'/resources/square100.png';
@ -46,19 +47,29 @@ body {
checkNaturalSize(entry, 100, 100);
}
else if (entry.id == 'div2') {
observedDiv2 = true;
// Check image entry.
if (entry.name !== 'text-paint') {
observedDiv2Img = true;
checkElement(entry, pathname, 'et2', 'div2', beforeRender,
document.getElementById('div2'));
// Div is below div1, on the left.
checkRect(entry, [0, 200, 100, 200]);
checkNaturalSize(entry, 100, 100);
}
// Check the text entry.
else {
observedDiv2Txt = true;
checkTextElement(entry, 'et2', 'div2', beforeRender,
document.getElementById('div2'));
}
}
else {
assert_unreached("Should not observe other elements!");
}
if (numObservedElements === 2) {
if (numObservedElements === 3) {
assert_true(observedDiv1);
assert_true(observedDiv2);
assert_true(observedDiv2Img);
assert_true(observedDiv2Txt);
t.done();
}
});

View file

@ -0,0 +1,35 @@
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Element Timing: observe text</title>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/element-timing-helpers.js"></script>
<script>
async_test((t) => {
if (!window.PerformanceElementTiming) {
assert_unreached("PerformanceElementTiming is not implemented");
}
let paragraph;
let beforeRender;
const observer = new PerformanceObserver(
t.step_func_done((entryList) => {
assert_equals(entryList.getEntries().length, 1);
checkTextElement(entryList.getEntries()[0], 'my_text', 'text_id', beforeRender, paragraph);
})
);
observer.observe({entryTypes: ['element']});
// We add the iframe during onload to be sure that the observer is registered
// in time for it to observe the element timing.
window.onload = () => {
paragraph = document.createElement('p');
paragraph.innerHTML = 'This is text I care about';
paragraph.setAttribute('elementtiming', 'my_text');
paragraph.setAttribute('id', 'text_id');
document.body.appendChild(paragraph);
beforeRender = performance.now();
};
}, 'Paragraph with elementtiming attribute is observed.');
</script>
</body>

View file

@ -2,7 +2,6 @@
function checkElementInternal(entry, expectedUrl, expectedIdentifier, expectedID, beforeRender,
expectedElement) {
assert_equals(entry.entryType, 'element');
assert_equals(entry.name, 'image-paint');
assert_equals(entry.url, expectedUrl);
assert_equals(entry.identifier, expectedIdentifier);
assert_equals(entry.duration, 0);
@ -19,6 +18,7 @@ function checkElement(entry, expectedUrl, expectedIdentifier, expectedID, before
expectedElement) {
checkElementInternal(entry, expectedUrl, expectedIdentifier, expectedID, beforeRender,
expectedElement);
assert_equals(entry.name, 'image-paint');
const rt_entries = performance.getEntriesByName(expectedUrl, 'resource');
assert_equals(rt_entries.length, 1);
assert_equals(rt_entries[0].responseEnd, entry.responseEnd);
@ -28,6 +28,7 @@ function checkElementWithoutResourceTiming(entry, expectedUrl, expectedIdentifie
expectedID, beforeRender, expectedElement) {
checkElementInternal(entry, expectedUrl, expectedIdentifier, expectedID, beforeRender,
expectedElement);
assert_equals(entry.name, 'image-paint');
// No associated resource from ResourceTiming, so the responseEnd should be 0.
assert_equals(entry.responseEnd, 0);
}
@ -49,3 +50,11 @@ function checkNaturalSize(entry, width, height) {
assert_equals(entry.naturalWidth, width);
assert_equals(entry.naturalHeight, height);
}
function checkTextElement(entry, expectedIdentifier, expectedID, beforeRender,
expectedElement) {
checkElementInternal(entry, '', expectedIdentifier, expectedID, beforeRender,
expectedElement);
assert_equals(entry.name, 'text-paint');
assert_equals(entry.responseEnd, 0);
}

View file

@ -1,132 +0,0 @@
// META: script=resources/test-helpers.js
promise_test(async t => cleanupSandboxedFileSystem(),
'Cleanup to setup test environment');
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const old_handle = await createFileWithContents(t, 'old-file', '12345', dir);
const new_handle = await old_handle.copyTo(dir, 'new-name');
t.add_cleanup(() => new_handle.remove());
// Verify new file.
assert_true(new_handle.isFile);
assert_false(new_handle.isDirectory);
assert_equals(new_handle.name, 'new-name');
assert_equals(await getFileContents(new_handle), '12345');
// And verify old file is still around as well.
assert_equals(await getFileContents(old_handle), '12345');
// Verify directory entries.
assert_array_equals(await getSortedDirectoryEntries(dir), ['new-name', 'old-file']);
}, 'copyTo() into the same parent directory');
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const old_handle = await createFileWithContents(t, 'old-file', '12345');
const target_dir = await dir.getDirectory('dir-name', { create: true });
t.add_cleanup(() => target_dir.removeRecursively());
const new_handle = await old_handle.copyTo(target_dir);
// Verify new file.
assert_true(new_handle.isFile);
assert_false(new_handle.isDirectory);
assert_equals(new_handle.name, 'old-file');
assert_equals(await getFileContents(new_handle), '12345');
// And verify old file is still around as well.
assert_equals(await getFileContents(old_handle), '12345');
// Verify directory entries.
assert_array_equals(await getSortedDirectoryEntries(dir), ['dir-name/', 'old-file']);
assert_array_equals(await getSortedDirectoryEntries(target_dir), ['old-file']);
}, 'copyTo() to copy a file into a sub-directory');
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const handle = await createFileWithContents(t, 'old-file', '12345', dir);
await promise_rejects(t, 'InvalidModificationError', handle.copyTo(dir));
await promise_rejects(t, 'InvalidModificationError', handle.copyTo(dir, handle.name));
// Verify file still exists.
assert_equals(await getFileContents(handle), '12345');
assert_array_equals(await getSortedDirectoryEntries(dir), ['old-file']);
}, 'copyTo() with existing name and parent should fail');
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const handle = await createFileWithContents(t, 'old-file', '12345', dir);
const target_handle = await createFileWithContents(t, 'target', 'abc', dir);
await handle.copyTo(dir, target_handle.name);
// Verify state of files.
assert_equals(await getFileContents(handle), '12345');
assert_equals(await getFileContents(target_handle), '12345');
assert_array_equals(await getSortedDirectoryEntries(dir), ['old-file', 'target']);
}, 'copyTo() when target file already exists should overwrite target');
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const subdir_name = 'subdir-name';
const subdir = await createDirectory(t, subdir_name, /*parent=*/dir);
const file_name = 'file-name';
const file = await createEmptyFile(t, file_name, /*parent=*/subdir);
// An empty name indicates that the filename should remain unchanged.
await file.copyTo(dir, /*name=*/"");
await dir.getFile(file_name);
}, `copyTo() when target is empty`);
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const subdir_name = 'subdir-name';
const subdir = await createDirectory(t, subdir_name, /*parent=*/dir);
const file_name = 'file-name';
const file = await createEmptyFile(t, file_name, /*parent=*/subdir);
await promise_rejects(t, 'SecurityError', file.copyTo(dir, /*name=*/kCurrentDirectory));
}, `copyTo() when target is ${kCurrentDirectory}`);
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const first_subdir_name = 'first-subdir-name';
const first_subdir = await createDirectory(t, first_subdir_name, /*parent=*/dir);
const second_subdir_name = 'second-subdir-name';
const second_subdir = await createDirectory(t, second_subdir_name, /*parent=*/first_subdir);
const file_name = 'file-name';
const file = await createEmptyFile(t, file_name, /*parent=*/second_subdir);
await promise_rejects(t, 'SecurityError', file.copyTo(first_subdir, /*name=*/kParentDirectory));
}, `copyTo() when target is ${kParentDirectory}`);
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const file_name = 'file-name';
const file = await createEmptyFile(t, file_name, /*parent=*/dir);
const first_subdir_name = 'first-subdir-name';
const first_subdir = await createDirectory(t, first_subdir_name, /*parent=*/dir);
const second_subdir_name = 'second-subdir-name';
const second_subdir = await createDirectory(t, second_subdir_name, /*parent=*/first_subdir);
for (let i = 0; i < kPathSeparators.length; ++i) {
const path_with_separator = `${second_subdir_name}${kPathSeparators[i]}${file_name}`;
await promise_rejects(t, 'SecurityError', file.copyTo(first_subdir, path_with_separator),
`copyTo() must reject names containing "${kPathSeparators[i]}"`);
}
}, 'copyTo() when target contains path separator');
// TODO(mek): Tests to copy directories.

View file

@ -1,131 +0,0 @@
// META: script=resources/test-helpers.js
promise_test(async t => cleanupSandboxedFileSystem(),
'Cleanup to setup test environment');
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const old_handle = await createFileWithContents(t, 'old-file', '12345', dir);
const new_handle = await old_handle.moveTo(dir, 'new-name');
t.add_cleanup(() => new_handle.remove());
// Verify new file.
assert_true(new_handle.isFile);
assert_false(new_handle.isDirectory);
assert_equals(new_handle.name, 'new-name');
assert_equals(await getFileContents(new_handle), '12345');
// And verify old file is gone.
await promise_rejects(t, 'NotFoundError', getFileContents(old_handle));
// Verify directory entries.
assert_array_equals(await getSortedDirectoryEntries(dir), ['new-name']);
}, 'moveTo() to rename a file');
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const old_handle = await createFileWithContents(t, 'old-file', '12345');
const target_dir = await dir.getDirectory('dir-name', { create: true });
t.add_cleanup(() => target_dir.removeRecursively());
const new_handle = await old_handle.moveTo(target_dir);
// Verify new file.
assert_true(new_handle.isFile);
assert_false(new_handle.isDirectory);
assert_equals(new_handle.name, 'old-file');
assert_equals(await getFileContents(new_handle), '12345');
// And verify old file is gone.
await promise_rejects(t, 'NotFoundError', getFileContents(old_handle));
// Verify directory entries.
assert_array_equals(await getSortedDirectoryEntries(dir), ['dir-name/']);
assert_array_equals(await getSortedDirectoryEntries(target_dir), ['old-file']);
}, 'moveTo() to move a file into a sub-directory');
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const handle = await createFileWithContents(t, 'old-file', '12345', dir);
await promise_rejects(t, 'InvalidModificationError', handle.moveTo(dir));
await promise_rejects(t, 'InvalidModificationError', handle.moveTo(dir, handle.name));
// Verify file still exists.
assert_equals(await getFileContents(handle), '12345');
assert_array_equals(await getSortedDirectoryEntries(dir), ['old-file']);
}, 'moveTo() with existing name and parent should fail');
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const handle = await createFileWithContents(t, 'old-file', '12345', dir);
const target_handle = await createFileWithContents(t, 'target', 'abc', dir);
await handle.moveTo(dir, target_handle.name);
// Verify state of files.
await promise_rejects(t, 'NotFoundError', getFileContents(handle));
assert_equals(await getFileContents(target_handle), '12345');
assert_array_equals(await getSortedDirectoryEntries(dir), ['target']);
}, 'moveTo() when target file already exists should overwrite target');
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const subdir_name = 'subdir-name';
const subdir = await createDirectory(t, subdir_name, /*parent=*/dir);
const file_name = 'file-name';
const file = await createEmptyFile(t, file_name, /*parent=*/subdir);
// An empty name indicates that the filename should remain unchanged.
await file.moveTo(dir, /*name=*/"");
await dir.getFile(file_name);
}, `moveTo() when target is empty`);
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const subdir_name = 'subdir-name';
const subdir = await createDirectory(t, subdir_name, /*parent=*/dir);
const file_name = 'file-name';
const file = await createEmptyFile(t, file_name, /*parent=*/subdir);
await promise_rejects(t, 'SecurityError', file.moveTo(dir, /*name=*/kCurrentDirectory));
}, `moveTo() when target is ${kCurrentDirectory}`);
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const first_subdir_name = 'first-subdir-name';
const first_subdir = await createDirectory(t, first_subdir_name, /*parent=*/dir);
const second_subdir_name = 'second-subdir-name';
const second_subdir = await createDirectory(t, second_subdir_name, /*parent=*/first_subdir);
const file_name = 'file-name';
const file = await createEmptyFile(t, file_name, /*parent=*/second_subdir);
await promise_rejects(t, 'SecurityError', file.moveTo(first_subdir, /*name=*/kParentDirectory));
}, `moveTo() when target is ${kParentDirectory}`);
promise_test(async t => {
const dir = await FileSystemDirectoryHandle.getSystemDirectory({ type: 'sandbox' });
const file_name = 'file-name';
const file = await createEmptyFile(t, file_name, /*parent=*/dir);
const first_subdir_name = 'first-subdir-name';
const first_subdir = await createDirectory(t, first_subdir_name, /*parent=*/dir);
const second_subdir_name = 'second-subdir-name';
const second_subdir = await createDirectory(t, second_subdir_name, /*parent=*/first_subdir);
for (let i = 0; i < kPathSeparators.length; ++i) {
const path_with_separator = `${second_subdir_name}${kPathSeparators[i]}${file_name}`;
await promise_rejects(t, 'SecurityError', file.moveTo(first_subdir, path_with_separator),
`moveTo() must reject names containing "${kPathSeparators[i]}"`);
}
}, 'moveTo() when target contains path separator');
// TODO(mek): Tests to move directories.

View file

@ -88,4 +88,21 @@ async_test(function(t) {
.catch(unreached_rejection(t));
}, 'Register then Unregister then getRegistration');
promise_test(async function(t) {
const scope = 'resources/scope/getregistration/register-unregister';
const registration = await service_worker_unregister_and_register(
t, 'resources/empty-worker.js', scope
);
const frame = await with_iframe(scope);
t.add_cleanup(() => frame.remove());
const frameNav = frame.contentWindow.navigator;
await registration.unregister();
const value = await frameNav.serviceWorker.getRegistration(scope);
assert_equals(value, undefined, 'getRegistration should resolve with undefined');
}, 'Register then Unregister then getRegistration in controlled iframe');
</script>

View file

@ -5,180 +5,131 @@
<script>
var worker_url = 'resources/empty-worker.js';
async_test(function(t) {
var scope = 'resources/scope/unregister-then-register-new-script-that-exists';
var new_worker_url = worker_url + '?new';
var iframe;
var registration;
var new_registration;
promise_test(async function(t) {
const scope = 'resources/scope/unregister-then-register-new-script-that-exists';
const registration = await service_worker_unregister_and_register(t, worker_url, scope);
t.add_cleanup(() => registration.unregister());
const newWorkerURL = worker_url + '?new';
await wait_for_state(t, registration.installing, 'activated');
const iframe = await with_iframe(scope);
t.add_cleanup(() => iframe.remove());
await registration.unregister();
const newRegistration = await navigator.serviceWorker.register(newWorkerURL, { scope });
t.add_cleanup(() => newRegistration.unregister());
service_worker_unregister_and_register(t, worker_url, scope)
.then(function(r) {
registration = r;
return wait_for_state(t, r.installing, 'activated');
})
.then(function() {
return with_iframe(scope);
})
.then(function(frame) {
iframe = frame;
return registration.unregister();
})
.then(function() {
return navigator.serviceWorker.register(new_worker_url,
{ scope: scope });
})
.then(function(r) {
new_registration = r;
assert_equals(registration.installing.scriptURL,
normalizeURL(new_worker_url),
'before activated registration.installing');
assert_equals(registration.waiting, null,
'before activated registration.waiting');
assert_equals(registration.active.scriptURL, normalizeURL(worker_url),
'before activated registration.active');
assert_equals(new_registration.installing.scriptURL,
normalizeURL(new_worker_url),
'before activated new_registration.installing');
assert_equals(new_registration.waiting, null,
'before activated new_registration.waiting');
assert_equals(new_registration.active.scriptURL,
normalizeURL(worker_url),
'before activated new_registration.active');
iframe.remove();
return wait_for_state(t, registration.installing, 'activated');
})
.then(function() {
assert_equals(new_registration.installing, null,
'after activated new_registration.installing');
assert_equals(new_registration.waiting, null,
'after activated new_registration.waiting');
assert_equals(new_registration.active.scriptURL,
normalizeURL(new_worker_url),
'after activated new_registration.active');
return with_iframe(scope);
})
.then(function(frame) {
assert_equals(
frame.contentWindow.navigator.serviceWorker.controller.scriptURL,
normalizeURL(new_worker_url),
'the new worker should control a new document');
frame.remove();
return registration.unregister();
})
.then(function() {
t.done();
})
.catch(unreached_rejection(t));
registration.installing.scriptURL,
normalizeURL(newWorkerURL),
'before activated registration.installing'
);
assert_equals(
registration.waiting,
null,
'before activated registration.waiting'
);
assert_equals(
registration.active.scriptURL,
normalizeURL(worker_url),
'before activated registration.active'
);
assert_equals(
newRegistration.installing.scriptURL,
normalizeURL(newWorkerURL),
'before activated newRegistration.installing'
);
assert_equals(
newRegistration.waiting,
null,
'before activated newRegistration.waiting'
);
assert_equals(
newRegistration.active.scriptURL,
normalizeURL(worker_url),
'before activated newRegistration.active'
);
iframe.remove();
await wait_for_state(t, registration.installing, 'activated');
assert_equals(
newRegistration.installing,
null,
'after activated newRegistration.installing'
);
assert_equals(
newRegistration.waiting,
null,
'after activated newRegistration.waiting'
);
assert_equals(
newRegistration.active.scriptURL,
normalizeURL(newWorkerURL),
'after activated newRegistration.active'
);
const newIframe = await with_iframe(scope);
t.add_cleanup(() => newIframe.remove());
assert_equals(
newIframe.contentWindow.navigator.serviceWorker.controller.scriptURL,
normalizeURL(newWorkerURL),
'the new worker should control a new document'
);
}, 'Registering a new script URL while an unregistered registration is in use');
async_test(function(t) {
var scope = 'resources/scope/unregister-then-register-new-script-that-404s';
var iframe;
var registration;
promise_test(async function(t) {
const scope = 'resources/scope/unregister-then-register-new-script-that-404s';
const registration = await service_worker_unregister_and_register(t, worker_url, scope);
t.add_cleanup(() => registration.unregister());
service_worker_unregister_and_register(t, worker_url, scope)
.then(function(r) {
registration = r;
return wait_for_state(t, r.installing, 'activated');
})
.then(function() {
return with_iframe(scope);
})
.then(function(frame) {
iframe = frame;
return registration.unregister();
})
.then(function() {
// Step 5.1 of Register clears the uninstall flag before fetching
// the script:
//
// https://w3c.github.io/ServiceWorker/#register-algorithm
var promise = navigator.serviceWorker.register('this-will-404',
{ scope: scope });
return promise;
})
.then(
function() {
assert_unreached('register should reject the promise');
},
function() {
assert_equals(registration.installing, null,
'registration.installing');
assert_equals(registration.waiting, null,
'registration.waiting');
assert_equals(registration.active.scriptURL, normalizeURL(worker_url),
'registration.active');
iframe.remove();
return with_iframe(scope);
})
.then(function(frame) {
assert_equals(
frame.contentWindow.navigator.serviceWorker.controller.scriptURL,
normalizeURL(worker_url),
'the original worker should control a new document');
frame.remove();
return registration.unregister();
})
.then(function() {
t.done();
})
.catch(unreached_rejection(t));
}, 'Registering a new script URL that 404s does resurrect an ' +
'unregistered registration');
await wait_for_state(t, registration.installing, 'activated');
async_test(function(t) {
var scope = 'resources/scope/unregister-then-register-reject-install-worker';
var iframe;
var registration;
const iframe = await with_iframe(scope);
t.add_cleanup(() => iframe.remove());
service_worker_unregister_and_register(t, worker_url, scope)
.then(function(r) {
registration = r;
return wait_for_state(t, r.installing, 'activated');
})
.then(function() {
return with_iframe(scope);
})
.then(function(frame) {
iframe = frame;
return registration.unregister();
})
.then(function() {
// Step 5.1 of Register clears the uninstall flag before firing
// the install event:
//
// https://w3c.github.io/ServiceWorker/#register-algorithm
var promise = navigator.serviceWorker.register(
'resources/reject-install-worker.js', { scope: scope });
return promise;
})
.then(function(r) {
registration = r;
return wait_for_state(t, r.installing, 'redundant');
})
.then(function() {
assert_equals(registration.installing, null,
'registration.installing');
assert_equals(registration.waiting, null,
'registration.waiting');
assert_equals(registration.active.scriptURL, normalizeURL(worker_url),
'registration.active');
iframe.remove();
return with_iframe(scope);
})
.then(function(frame) {
assert_equals(
frame.contentWindow.navigator.serviceWorker.controller.scriptURL,
normalizeURL(worker_url),
'the original worker should control a new document');
frame.remove();
return registration.unregister();
})
.then(function() {
t.done();
})
.catch(unreached_rejection(t));
}, 'Registering a new script URL that fails to install does resurrect ' +
'an unregistered registration');
await registration.unregister();
await promise_rejects(
t, new TypeError(),
navigator.serviceWorker.register('this-will-404', { scope })
);
assert_equals(registration.installing, null, 'registration.installing');
assert_equals(registration.waiting, null, 'registration.waiting');
assert_equals(registration.active.scriptURL, normalizeURL(worker_url), 'registration.active');
const newIframe = await with_iframe(scope);
t.add_cleanup(() => newIframe.remove());
assert_equals(newIframe.contentWindow.navigator.serviceWorker.controller, null, 'Document should not be controlled');
}, 'Registering a new script URL that 404s does not resurrect unregistered registration');
promise_test(async function(t) {
const scope = 'resources/scope/unregister-then-register-reject-install-worker';
const registration = await service_worker_unregister_and_register(t, worker_url, scope);
t.add_cleanup(() => registration.unregister());
await wait_for_state(t, registration.installing, 'activated');
const iframe = await with_iframe(scope);
t.add_cleanup(() => iframe.remove());
await registration.unregister();
const newRegistration = await navigator.serviceWorker.register(
'resources/reject-install-worker.js', { scope }
);
t.add_cleanup(() => newRegistration.unregister());
await wait_for_state(t, newRegistration.installing, 'redundant');
assert_equals(registration.installing, null, 'registration.installing');
assert_equals(registration.waiting, null, 'registration.waiting');
assert_equals(registration.active, null, 'registration.active');
assert_not_equals(registration, newRegistration, 'New registration is different');
}, 'Registering a new script URL that fails to install does not resurrect unregistered registration');
</script>

View file

@ -5,100 +5,40 @@
<script>
var worker_url = 'resources/empty-worker.js';
promise_test(function(t) {
var scope = 'resources/scope/re-register-resolves-to-new-value';
var registration;
promise_test(async function(t) {
const scope = 'resources/scope/re-register-resolves-to-new-value';
const registration = await service_worker_unregister_and_register(t, worker_url, scope);
t.add_cleanup(() => registration.unregister());
return service_worker_unregister_and_register(t, worker_url, scope)
.then(function(r) {
t.add_cleanup(function() {
return service_worker_unregister(t, scope);
});
await wait_for_state(t, r.installing, 'activated');
await registration.unregister();
const newRegistration = await navigator.serviceWorker.register(worker_url, { scope });
t.add_cleanup(() => newRegistration.unregister());
registration = r;
return wait_for_state(t, r.installing, 'activated');
})
.then(function() {
return registration.unregister();
})
.then(function() {
return navigator.serviceWorker.register(worker_url, { scope: scope });
})
.then(function(new_registration) {
assert_not_equals(registration, new_registration,
'register should resolve to a new value');
});
assert_not_equals(
registration, newRegistration,
'register should resolve to a new value'
);
}, 'Unregister then register resolves to a new value');
promise_test(function(t) {
var scope = 'resources/scope/re-register-while-old-registration-in-use';
var registration;
promise_test(async function(t) {
const scope = 'resources/scope/re-register-while-old-registration-in-use';
const registration = await service_worker_unregister_and_register(t, worker_url, scope);
t.add_cleanup(() => registration.unregister());
return service_worker_unregister_and_register(t, worker_url, scope)
.then(function(r) {
t.add_cleanup(function() {
return service_worker_unregister(t, scope);
});
await wait_for_state(t, registration.installing, 'activated');
const frame = await with_iframe(scope);
t.add_cleanup(() => frame.remove());
registration = r;
return wait_for_state(t, r.installing, 'activated');
})
.then(function() {
return with_iframe(scope);
})
.then(function(frame) {
return registration.unregister();
})
.then(function() {
return navigator.serviceWorker.register(worker_url, { scope: scope });
})
.then(function(new_registration) {
assert_equals(registration, new_registration,
'new registration should resolve to the same registration');
});
}, 'Unregister then register resolves to the original value if the ' +
'registration is in use.');
await registration.unregister();
const newRegistration = await navigator.serviceWorker.register(worker_url, { scope });
t.add_cleanup(() => newRegistration.unregister());
promise_test(function(t) {
var scope = 'resources/scope/complete-unregistration-followed-by-' +
'reloading-controllee-iframe';
var registration;
var frame;
var service_worker;
return service_worker_unregister_and_register(t, worker_url, scope)
.then(function(r) {
t.add_cleanup(function() {
return service_worker_unregister(t, scope);
});
registration = r;
return wait_for_state(t, r.installing, 'activated');
})
.then(function() {
return with_iframe(scope);
})
.then(function(f) {
frame = f;
return registration.unregister();
})
.then(function() {
return new Promise(function(resolve) {
frame.onload = resolve;
frame.contentWindow.location.reload();
});
})
.then(function() {
var c = frame.contentWindow.navigator.serviceWorker.controller;
assert_equals(c, null, 'a page after unregistration should not be ' +
'controlled by service worker');
return navigator.serviceWorker.getRegistration(scope);
})
.then(function(r) {
assert_equals(r, undefined, 'getRegistration should return ' +
'undefined after unregistration');
});
}, 'Reloading the last controlled iframe after unregistration should ensure ' +
'the deletion of the registration');
assert_not_equals(
registration, newRegistration,
'Unregister and register should always create a new registration'
);
}, 'Unregister then register does not resolve to the original value even if the registration is in use.');
promise_test(function(t) {
var scope = 'resources/scope/re-register-does-not-affect-existing-controllee';
@ -138,39 +78,30 @@ promise_test(function(t) {
});
}, 'Unregister then register does not affect existing controllee');
promise_test(function(t) {
var scope = 'resources/scope/resurrection';
var iframe;
var registration;
promise_test(async function(t) {
const scope = 'resources/scope/resurrection';
const altWorkerURL = worker_url + '?alt';
const registration = await service_worker_unregister_and_register(t, worker_url, scope);
t.add_cleanup(() => registration.unregister());
return service_worker_unregister_and_register(t, worker_url, scope)
.then(function(r) {
t.add_cleanup(function() {
return service_worker_unregister(t, scope);
});
await wait_for_state(t, registration.installing, 'activating');
const iframe = await with_iframe(scope);
t.add_cleanup(() => iframe.remove());
registration = r;
return wait_for_state(t, r.installing, 'activated');
})
.then(function() {
return with_iframe(scope);
})
.then(function(frame) {
iframe = frame;
return registration.unregister();
})
.then(function() {
return navigator.serviceWorker.register(worker_url, { scope: scope });
})
.then(function() {
iframe.remove();
return with_iframe(scope);
})
.then(function(frame) {
assert_not_equals(
frame.contentWindow.navigator.serviceWorker.controller, null,
'document should have a controller');
frame.remove();
});
}, 'Unregister then register resurrects the registration');
await registration.unregister();
const newRegistration = await navigator.serviceWorker.register(altWorkerURL, { scope });
t.add_cleanup(() => newRegistration.unregister());
assert_equals(newRegistration.active, null, 'Registration is new');
await wait_for_state(t, newRegistration.installing, 'activating');
const newIframe = await with_iframe(scope);
t.add_cleanup(() => newIframe.remove());
const iframeController = iframe.contentWindow.navigator.serviceWorker.controller;
const newIframeController = newIframe.contentWindow.navigator.serviceWorker.controller;
assert_not_equals(iframeController, newIframeController, 'iframes have different controllers');
}, 'Unregister then register does not resurrect the registration');
</script>