mirror of
https://github.com/servo/servo.git
synced 2025-06-28 11:03:39 +01:00
Update web-platform-tests to revision b'2d1ad05908ee5447fdfa70eed9757273aa5da367'
This commit is contained in:
parent
7809bb7cba
commit
84de92ecaf
83 changed files with 1324 additions and 779 deletions
|
@ -935,6 +935,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"cell-large-bottom-padding-crash.html": [
|
||||
"e87df1fe7a229ab2339377bb0904a7e607cc6605",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"dynamic-caption-child-change-002-crash.html": [
|
||||
"983f8bb95bb1f2ff157c2e81da9f6e4cbc9ab2cd",
|
||||
[
|
||||
|
@ -216659,6 +216666,47 @@
|
|||
]
|
||||
]
|
||||
},
|
||||
"css-rhythm": {
|
||||
"block-step-size-establishes-independent-formatting-context-list-item.html": [
|
||||
"301ae3e9a2ff58084ba942edbcaf862521cf51f0",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square-only.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"block-step-size-establishes-independent-formatting-context.html": [
|
||||
"f87e22d3193a8b53d0f9e280e3bd84700d3cfb25",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square-only.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"block-step-size-none-does-not-establish-indepdendent-formatting-context.html": [
|
||||
"678428e381be5cd2cdb05054cf67ed416d655d44",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"css-ruby": {
|
||||
"abs-in-ruby-base-container.html": [
|
||||
"0a4ad8a24cc7c7dcda673f243153e446e21aa475",
|
||||
|
@ -241859,6 +241907,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"text-wrap-balance-align-001.html": [
|
||||
"b4659613c8552a90bb210292774fab7271a2b6c8",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-text/white-space/reference/text-wrap-balance-align-001-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"textarea-break-spaces-001.html": [
|
||||
"ad81e99768f9816c6e8a659c13aed81c4f22d940",
|
||||
[
|
||||
|
@ -252430,7 +252491,7 @@
|
|||
]
|
||||
],
|
||||
"perspective-transforms-equivalence.html": [
|
||||
"c286837969d879c836d0bfd8646b6256cd3100a5",
|
||||
"8f59d51ada8884c570d98a6d8762d7ea4a971a84",
|
||||
[
|
||||
null,
|
||||
[
|
||||
|
@ -252446,11 +252507,11 @@
|
|||
[
|
||||
[
|
||||
0,
|
||||
29
|
||||
94
|
||||
],
|
||||
[
|
||||
0,
|
||||
235
|
||||
538
|
||||
]
|
||||
]
|
||||
]
|
||||
|
@ -255315,7 +255376,7 @@
|
|||
]
|
||||
],
|
||||
"transform-input-013.html": [
|
||||
"45e1940a32007f7010b7291bed8240c7a2bba46f",
|
||||
"1fe2b07f0b7a88748edb2ba3a5f3fc58bd6c6d26",
|
||||
[
|
||||
null,
|
||||
[
|
||||
|
@ -255331,11 +255392,11 @@
|
|||
[
|
||||
[
|
||||
0,
|
||||
128
|
||||
129
|
||||
],
|
||||
[
|
||||
0,
|
||||
2254
|
||||
2506
|
||||
]
|
||||
]
|
||||
]
|
||||
|
@ -276434,7 +276495,7 @@
|
|||
},
|
||||
"css-view-transitions": {
|
||||
"3d-transform-incoming.html": [
|
||||
"1a0719eaa9e0027e752ce2c24609ec18c44427c0",
|
||||
"e1c172263b7824911d205646f14c93fe97cd78b0",
|
||||
[
|
||||
null,
|
||||
[
|
||||
|
@ -276454,7 +276515,7 @@
|
|||
[
|
||||
[
|
||||
0,
|
||||
80
|
||||
255
|
||||
],
|
||||
[
|
||||
0,
|
||||
|
@ -278292,6 +278353,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"transform-origin-view-transition-group.html": [
|
||||
"17a8218b76964d899c548dbae3e11292f8feffa7",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-view-transitions/transform-origin-view-transition-group-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"transition-in-empty-iframe.html": [
|
||||
"99e9f24176ea8985263e3e645cb201485c5abec0",
|
||||
[
|
||||
|
@ -392880,6 +392954,10 @@
|
|||
"d8c1834d9572e33a8f4b5306871fb725dbd9ce5d",
|
||||
[]
|
||||
],
|
||||
"text-wrap-balance-align-001-ref.html": [
|
||||
"e522e3711c9d1a68f6a90d97cba248ecb4e47d32",
|
||||
[]
|
||||
],
|
||||
"textarea-pre-wrap-001-ref.html": [
|
||||
"31070ea92815e4d3a3ece48ed69da03de02f671e",
|
||||
[]
|
||||
|
@ -397849,7 +397927,7 @@
|
|||
},
|
||||
"css-view-transitions": {
|
||||
"3d-transform-incoming-ref.html": [
|
||||
"a7d5e56db5bb2cc62ec3b339041df51321f0f8f5",
|
||||
"c690ee2b9af53301711e096aa708a619a74cc14a",
|
||||
[]
|
||||
],
|
||||
"3d-transform-outgoing-ref.html": [
|
||||
|
@ -398198,6 +398276,10 @@
|
|||
[]
|
||||
]
|
||||
},
|
||||
"transform-origin-view-transition-group-ref.html": [
|
||||
"e38cbb0ffeb8c0518bbfbede3b196e326014f78f",
|
||||
[]
|
||||
],
|
||||
"transition-in-empty-iframe-ref.html": [
|
||||
"67476122859cd718e900e624b011984550517a6c",
|
||||
[]
|
||||
|
@ -421041,7 +421123,7 @@
|
|||
[]
|
||||
],
|
||||
"popover-utils.js": [
|
||||
"404b893bf03cca530200bbfa8c340aa829d522a2",
|
||||
"9c6ba77549bd76f6bc4f05794547574d95d36224",
|
||||
[]
|
||||
]
|
||||
}
|
||||
|
@ -430438,7 +430520,7 @@
|
|||
[]
|
||||
],
|
||||
"pointerevent_support.js": [
|
||||
"f3229b90b6a4a6b8a97ed5a2938a03798bf6e081",
|
||||
"e8e9dd6642e356533f812e0f0ad6732cc3a37357",
|
||||
[]
|
||||
],
|
||||
"pointerlock": {
|
||||
|
@ -434231,18 +434313,6 @@
|
|||
"7040cf0a9d000d25367033a9ec5a5ebbb4690398",
|
||||
[]
|
||||
],
|
||||
"getPorts": {
|
||||
"reject_opaque_origin.https.html.headers": [
|
||||
"1efcf8c226fac074c98d0a5a747856f532e5d84e",
|
||||
[]
|
||||
]
|
||||
},
|
||||
"requestPort": {
|
||||
"reject_opaque_origin.https.html.headers": [
|
||||
"1efcf8c226fac074c98d0a5a747856f532e5d84e",
|
||||
[]
|
||||
]
|
||||
},
|
||||
"resources": {
|
||||
"automation.js": [
|
||||
"e88fdb1a9d23dfd601d5e9e6e11b560be07d577e",
|
||||
|
@ -434256,10 +434326,6 @@
|
|||
"ac19136b35acc43e7290131fd082657c58f1387b",
|
||||
[]
|
||||
],
|
||||
"open-in-iframe.html": [
|
||||
"9bf8beb66aa1c2514b591db508014572d1ec6b7e",
|
||||
[]
|
||||
],
|
||||
"serial-allowed-by-permissions-policy-worker.js": [
|
||||
"cef0aacdfc3d2f755b185439679706318935df17",
|
||||
[]
|
||||
|
@ -494336,7 +494402,7 @@
|
|||
]
|
||||
],
|
||||
"color-valid-relative-color.html": [
|
||||
"3222ea8c30632e7221cc782de45797d2d02e8927",
|
||||
"a463f7f3c86c8f6635400ef8de5e8a5e6b0d00f2",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -495580,7 +495646,7 @@
|
|||
]
|
||||
],
|
||||
"content-visibility-with-top-layer-006.html": [
|
||||
"f533f3dfa595224bb2217a12fa071af444324e19",
|
||||
"36a79532a9a73bf13a675ac2b81537e5512b158f",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -507102,6 +507168,52 @@
|
|||
]
|
||||
]
|
||||
},
|
||||
"css-rhythm": {
|
||||
"parsing": {
|
||||
"block-step-insert-computed.html": [
|
||||
"cedbe3b9ec83f99b37ced1e96e08591c7855147a",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"block-step-insert-invalid.html": [
|
||||
"a186b49e5dd128d6cbb18a8c9fd5c9b2ecb9c2dd",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"block-step-insert-valid.html": [
|
||||
"f7b0b5a9e04673c3e976b2127c2d127604f88b96",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"block-step-size-computed.html": [
|
||||
"e90b608215de16d9b80ad1d4090ec52e337ace51",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"block-step-size-invalid.html": [
|
||||
"0787941aec039d66d8c9c9e2c0b7060752a70122",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"block-step-size-valid.html": [
|
||||
"391ee28667fef8e27572caae06e1d15dec0979ed",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"css-ruby": {
|
||||
"br-clear-all-000.html": [
|
||||
"91c5a0b63b3f54edfeb10606713f7a3d3c8fb0fd",
|
||||
|
@ -515057,6 +515169,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"transition-important.html": [
|
||||
"cae14369ba54220bd769b550bc9113ce0e7506a4",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"transition-property-001.html": [
|
||||
"47a1417070f0c2e7b8171259d9c4f63c44e96bcc",
|
||||
[
|
||||
|
@ -519010,7 +519129,7 @@
|
|||
]
|
||||
],
|
||||
"variable-cssText.html": [
|
||||
"8e725622c9031eba3a4bf4a642440859dcee73cc",
|
||||
"27183eae34c6a9ee7e6c66a2b439c59d3894c309",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -605733,8 +605852,18 @@
|
|||
}
|
||||
]
|
||||
],
|
||||
"popover-attribute-all-elements.html": [
|
||||
"d620f767882c2fe7a53be1e30ed2f1b22c11d765",
|
||||
[
|
||||
null,
|
||||
{
|
||||
"testdriver": true,
|
||||
"timeout": "long"
|
||||
}
|
||||
]
|
||||
],
|
||||
"popover-attribute-basic.html": [
|
||||
"c80534af9d1907d92aff6100447993b7a62366a4",
|
||||
"88051f57394b7d525d24d74a37f5f73b05599e9f",
|
||||
[
|
||||
null,
|
||||
{
|
||||
|
@ -624022,7 +624151,7 @@
|
|||
]
|
||||
],
|
||||
"mediametadata.html": [
|
||||
"ff00e54ee7c6c31cb899a9045de2311be55fb67e",
|
||||
"f87e71d969004ee575300fb2f914c8d122dddf48",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
|
@ -632895,7 +633024,7 @@
|
|||
]
|
||||
],
|
||||
"pointerevent_mouse-pointer-preventdefault.html": [
|
||||
"c4990ff5f9db0bee3ca2638b43f8bba89119555a",
|
||||
"549cbf55d8818291f412a1627765df9611ce614c",
|
||||
[
|
||||
null,
|
||||
{
|
||||
|
@ -652524,22 +652653,6 @@
|
|||
]
|
||||
},
|
||||
"serial": {
|
||||
"getPorts": {
|
||||
"reject_opaque_origin.https.html": [
|
||||
"b2f630a3197deb0e80f01c28dafe3e8fd72971c9",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"sandboxed_iframe.https.window.js": [
|
||||
"8fae11ccfe53acc00a6a1cc1afd21439b7d1c968",
|
||||
[
|
||||
"serial/getPorts/sandboxed_iframe.https.window.html",
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"idlharness.https.any.js": [
|
||||
"b240da933ade1595d3b1965c3ca6613c91c8318f",
|
||||
[
|
||||
|
@ -652573,22 +652686,6 @@
|
|||
}
|
||||
]
|
||||
],
|
||||
"requestPort": {
|
||||
"reject_opaque_origin.https.html": [
|
||||
"ade8ae7392eccd9782f3b12f79ae71396de08913",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"sandboxed_iframe.https.window.js": [
|
||||
"6e169510a0bd0ad0123aa2a78c8646c99b8b186f",
|
||||
[
|
||||
"serial/requestPort/sandboxed_iframe.https.window.html",
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"serial-allowed-by-permissions-policy-attribute-redirect-on-load.https.sub.html": [
|
||||
"ac278ff0cf0f92dd2547851771e5cda7cc15ea4b",
|
||||
[
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[hit-test-floats-001.html]
|
||||
[hit-test-floats-001]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[hit-test-floats-004.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
|||
[hit-test-floats-005.html]
|
||||
[Miss clipped float]
|
||||
expected: FAIL
|
|
@ -8,8 +8,5 @@
|
|||
[[data-expected-height\] 3]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 1]
|
||||
expected: FAIL
|
||||
|
||||
[[data-expected-height\] 2]
|
||||
[[data-expected-height\] 4]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[block-in-inline-hittest-001.html]
|
||||
[block-in-inline-hittest-001]
|
||||
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
|||
[block-in-inline-hittest-float-002.html]
|
||||
[block-in-inline-hittest-float-002]
|
||||
expected: FAIL
|
|
@ -2837,9 +2837,6 @@
|
|||
[e.style['color'\] = "color(from color(xyz-d65 7 -20.5 100 / none) xyz-d65 x y z / alpha)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "rgb(from var(--color) calc(r * .3 + g * .59 + b * .11) calc(r * .3 + g * .59 + b * .11) calc(r * .3 + g * .59 + b * .11))" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
[e.style['color'\] = "rgb(from indianred 255 g b)" should set the property value]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
[transform-scale-hittest.html]
|
||||
[Hit test intersecting scaled box]
|
||||
expected: FAIL
|
||||
|
||||
[Hit test within unscaled box]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
[properties-value-003.html]
|
||||
bug: https://github.com/servo/servo/issues/21486
|
||||
|
||||
[outline-radius-bottomleft length(em) / events]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -492,3 +491,39 @@
|
|||
|
||||
[object-view-box object-view-box(xywh) / events]
|
||||
expected: FAIL
|
||||
|
||||
[border-top-left-radius border-radius(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[border-top-left-radius border-radius(px-px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[border-top-right-radius border-radius(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[border-top-right-radius border-radius(px-px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[border-bottom-left-radius border-radius(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[border-bottom-left-radius border-radius(px-px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[border-bottom-right-radius border-radius(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[border-bottom-right-radius border-radius(px-px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[box-shadow box-shadow(shadow) / values]
|
||||
expected: FAIL
|
||||
|
||||
[font-stretch font-stretch(keyword) / values]
|
||||
expected: FAIL
|
||||
|
||||
[transform transform(rotate) / values]
|
||||
expected: FAIL
|
||||
|
||||
[transform-origin horizontal(keyword) / values]
|
||||
expected: FAIL
|
||||
|
|
|
@ -476,3 +476,153 @@
|
|||
|
||||
[text-shadow shadow(shadow) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-right length(cm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-right length(in) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(pt) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(pc) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(em) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(ex) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(mm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(cm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[margin-top length(in) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height length(pt) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height length(pc) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height length(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height length(em) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height length(ex) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height length(mm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height length(cm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height length(in) / values]
|
||||
expected: FAIL
|
||||
|
||||
[height percentage(%) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width length(pt) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width length(pc) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width length(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width length(em) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width length(ex) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width length(mm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width length(cm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width length(in) / values]
|
||||
expected: FAIL
|
||||
|
||||
[width percentage(%) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-height length(pt) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-height length(pc) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-height length(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-height length(em) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-height length(ex) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-height length(mm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-height length(cm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-height length(in) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-height percentage(%) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-width length(pt) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-width length(pc) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-width length(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-width length(em) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-width length(ex) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-width length(mm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-width length(cm) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-width length(in) / values]
|
||||
expected: FAIL
|
||||
|
||||
[min-width percentage(%) / values]
|
||||
expected: FAIL
|
||||
|
||||
[max-height length(pt) / values]
|
||||
expected: FAIL
|
||||
|
||||
[max-height length(pc) / values]
|
||||
expected: FAIL
|
||||
|
||||
[max-height length(px) / values]
|
||||
expected: FAIL
|
||||
|
||||
[max-height length(em) / values]
|
||||
expected: FAIL
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[transition-important.html]
|
||||
[!important should not override transition]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[elementFromPoint-001.html]
|
||||
[CSSOM View - 5 - extensions to the Document interface]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[elementFromPoint-dynamic-anon-box.html]
|
||||
[Link should be clickable after hiding a scrollbox with an anonymous table inside]
|
||||
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
|||
[elementFromPoint-ellipsis-in-inline-box.html]
|
||||
[elementFromPoint-ellipsis-in-inline-box]
|
||||
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
|||
[elementFromPoint-float-in-table.html]
|
||||
[float-in-div]
|
||||
expected: FAIL
|
|
@ -13,6 +13,3 @@
|
|||
|
||||
[<li>Outside 3</li>]
|
||||
expected: FAIL
|
||||
|
||||
[<li>Inside 1</li>]
|
||||
expected: FAIL
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[elementFromPoint-subpixel.html]
|
||||
[Hit test top left corner of box]
|
||||
expected: FAIL
|
|
@ -4,6 +4,3 @@
|
|||
|
||||
[Navigating to a different document with form submission]
|
||||
expected: FAIL
|
||||
|
||||
[Navigating to a different document with link click]
|
||||
expected: FAIL
|
||||
|
|
|
@ -4,7 +4,16 @@
|
|||
expected: NOTRUN
|
||||
|
||||
[Navigating an opened window via location.href to a javascript: URL must not fire beforeunload: string completion]
|
||||
expected: TIMEOUT
|
||||
expected: NOTRUN
|
||||
|
||||
[Navigating an opened window with an iframe via location.href to a javascript: URL must not fire beforeunload on the iframe: undefined completion]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
[Navigating an opened window via location.href to a javascript: URL must not fire beforeunload: undefined completion]
|
||||
expected: TIMEOUT
|
||||
|
||||
[Navigating an iframe via location.href to a javascript: URL must not fire beforeunload: string completion]
|
||||
expected: NOTRUN
|
||||
|
||||
[Navigating an iframe via src="" to a javascript: URL after insertion must not fire beforeunload: string completion]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -16,3 +16,6 @@
|
|||
|
||||
[D83D DE0D set in href="" targeting a frame and clicked]
|
||||
expected: FAIL
|
||||
|
||||
[DE0D 0041 set in href="" targeting a frame and clicked]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[navigation-unload-cross-origin.sub.window.html]
|
||||
[Cross-origin navigation started from unload handler must be ignored]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[navigation-unload-same-origin.window.html]
|
||||
[Same-origin navigation started from unload handler must be ignored]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[pageload-image-in-popup.html]
|
||||
[The document for a standalone media file should have one child in the body.]
|
||||
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
|||
[traverse_the_history_1.html]
|
||||
[Multiple history traversals from the same task]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[traverse_the_history_write_onload_1.html]
|
||||
[Traverse the history when a history entry is written in the load event]
|
||||
expected: FAIL
|
|
@ -1,4 +1,5 @@
|
|||
[supported-elements.html]
|
||||
expected: TIMEOUT
|
||||
[Contenteditable element should support autofocus]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -9,7 +10,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[Area element should support autofocus]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[Host element with delegatesFocus should support autofocus]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[media_fragment_seek.html]
|
||||
[Video should seek to time specified in media fragment syntax]
|
||||
expected: FAIL
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-1.html]
|
||||
type: testharness
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[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: TIMEOUT
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-2.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[DOMContentLoaded-defer.html]
|
||||
[The end: DOMContentLoaded and defer scripts]
|
||||
expected: FAIL
|
|
@ -0,0 +1,3 @@
|
|||
[module-delayed.html]
|
||||
[async document.write in a module]
|
||||
expected: FAIL
|
|
@ -3,3 +3,6 @@
|
|||
expected: TIMEOUT
|
||||
[The incumbent settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
|
||||
expected: TIMEOUT
|
||||
|
||||
[The entry settings object while executing the compiled callback via Web IDL's invoke must be that of the node document]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
[promise-job-entry-different-function-realm.html]
|
||||
expected: TIMEOUT
|
||||
[Fulfillment handler on fulfilled promise]
|
||||
expected: FAIL
|
||||
|
||||
[Rejection handler on pending-then-rejected promise]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[Thenable resolution]
|
||||
expected: FAIL
|
||||
|
@ -12,4 +13,4 @@
|
|||
expected: FAIL
|
||||
|
||||
[Fulfillment handler on pending-then-fulfilled promise]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
[promise-rejection-events.html]
|
||||
expected: TIMEOUT
|
||||
[delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[unhandledrejection: from createImageBitmap which is UA triggered]
|
||||
expected: FAIL
|
||||
|
|
|
@ -94,10 +94,10 @@
|
|||
expected: FAIL
|
||||
|
||||
[mime-type 16 : text/html;charset=\x0bgbk]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[mime-type 17 : text/html;charset=\x0cgbk]
|
||||
expected: NOTRUN
|
||||
expected: TIMEOUT
|
||||
|
||||
[mime-type 18 : text/html;\x0bcharset=gbk]
|
||||
expected: NOTRUN
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
[cors-preflight.any.html]
|
||||
expected: ERROR
|
||||
[PerformanceResourceTiming sizes fetch with preflight test]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[cors-preflight.any.worker.html]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
[entry.html]
|
||||
expected: TIMEOUT
|
||||
[Start function]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Sanity check: this all works as expected synchronously]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[cross-partition.https.tentative.html]
|
||||
expected: TIMEOUT
|
||||
expected: CRASH
|
||||
[BroadcastChannel messages aren't received from a cross-partition iframe]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,4 @@
|
|||
[018.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, javascript:]
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,4 @@
|
|||
[localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html]
|
||||
expected: TIMEOUT
|
||||
[StorageKey: test 3P about:blank window opened from a 3P iframe]
|
||||
expected: TIMEOUT
|
|
@ -1,2 +0,0 @@
|
|||
[simple_inline_width_height.html]
|
||||
expected: TIMEOUT
|
|
@ -0,0 +1,3 @@
|
|||
[stylesheet_media_queries.html]
|
||||
[Media queries within stylesheets]
|
||||
expected: FAIL
|
|
@ -1,3 +0,0 @@
|
|||
[scrollBy.html]
|
||||
[Ensure that the window.scrollBy function affects scroll position as expected]
|
||||
expected: FAIL
|
|
@ -1,6 +0,0 @@
|
|||
[task_queue_throttling.any.html]
|
||||
[Throttling the performance timeline task queue.]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[task_queue_throttling.any.worker.html]
|
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1420637">
|
||||
<div style="columns:2; height:100px; column-fill:auto;">
|
||||
<div style="display:table-cell; padding-bottom:400px;">boo</div>
|
||||
</div>
|
|
@ -613,7 +613,7 @@
|
|||
test_valid_value(`color`, `lch(from var(--color) calc(l / 2) c h)`);
|
||||
|
||||
// Example 13.
|
||||
test_valid_value(`color`, `rgb(from var(--color) calc(r * .3 + g * .59 + b * .11) calc(r * .3 + g * .59 + b * .11) calc(r * .3 + g * .59 + b * .11))`, `rgb(from var(--color) calc(r * 0.3 + g * 0.59 + b * 0.11) calc(r * 0.3 + g * 0.59 + b * 0.11) calc(r * 0.3 + g * 0.59 + b * 0.11))`);
|
||||
test_valid_value(`color`, `rgb(from var(--color) calc(r * .3 + g * .59 + b * .11) calc(r * .3 + g * .59 + b * .11) calc(r * .3 + g * .59 + b * .11))`);
|
||||
test_valid_value(`color`, `lch(from var(--color) l 0 h)`);
|
||||
|
||||
// Example 14.
|
||||
|
|
|
@ -31,9 +31,10 @@ test(() => {
|
|||
dialog.close();
|
||||
dialog.showModal();
|
||||
|
||||
// Even though the element with `content-visibility: auto` is offscreen
|
||||
// it should be considered relevant content because it is now in the top
|
||||
// layer.
|
||||
assert_equals(inner.getBoundingClientRect().height, 200);
|
||||
// Even though the element with `content-visibility: auto` has an ancestor
|
||||
// in the top layer, this element is not in the top layer list (although
|
||||
// it's in the top layer stacking context). This means it should not be
|
||||
// relevant to the user, because it is nevertheless not onscreen.
|
||||
assert_equals(inner.getBoundingClientRect().height, 100);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
|
||||
<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html">
|
||||
<meta name="assert" content="block-step-size values other than none on block level elements cause the box to establish an independent formatting context">
|
||||
<style>
|
||||
div {
|
||||
width: 50px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
}
|
||||
.floating {
|
||||
float: left;
|
||||
}
|
||||
.block-step-size {
|
||||
display: list-item;
|
||||
list-style: none;
|
||||
block-step-size: 1px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if there is a filled green square.</p>
|
||||
<div class="floating"></div>
|
||||
<div class="block-step-size"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
|
||||
<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html">
|
||||
<meta name="assert" content="block-step-size values other than none on block level elements cause the box to establish an independent formatting context">
|
||||
<style>
|
||||
div {
|
||||
width: 50px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
}
|
||||
.floating {
|
||||
float: left;
|
||||
}
|
||||
.block-step-size {
|
||||
block-step-size: 1px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if there is a filled green square.</p>
|
||||
<div class="floating"></div>
|
||||
<div class="block-step-size"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" href="mailto:sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
|
||||
<link rel="match" href="/css/reference/ref-filled-green-100px-square.xht">
|
||||
<meta name="assert" content="block-step-size none should not establish an independent formatting context for the box">
|
||||
<style>
|
||||
div {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
}
|
||||
.floating {
|
||||
position: relative;
|
||||
z-index: -1;
|
||||
float: left;
|
||||
background-color: red;
|
||||
}
|
||||
.block-step-size {
|
||||
block-step-size: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div class="floating"></div>
|
||||
<div class="block-step-size"></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Rhythm: block-step-insert computed values</title>
|
||||
<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-insert">
|
||||
<meta name="assert" content="Checking computed values for block-step-insert">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("block-step-insert", "margin");
|
||||
test_computed_value("block-step-insert", "padding");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Rhythm: block-step-insert invalid values</title>
|
||||
<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-insert">
|
||||
<meta name="assert" content="Invalid values for block-step-insert should not be parsed">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_invalid_value("block-step-insert", "auto");
|
||||
test_invalid_value("block-step-insert", "-1px");
|
||||
test_invalid_value("block-step-insert", "min-content");
|
||||
test_invalid_value("block-step-insert", "10%");
|
||||
test_invalid_value("block-step-insert", "20");
|
||||
test_invalid_value("block-step-insert", "none");
|
||||
test_invalid_value("block-step-insert", "border-box");
|
||||
test_invalid_value('block-step-insert', "margin-box");
|
||||
test_invalid_value("block-step-insert", "margin padding");
|
||||
test_invalid_value("block-step-insert", "padding margin");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Rhythm: block-step-insert valid values</title>
|
||||
<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-insert">
|
||||
<meta name="assert" content="Parsing valid values for block-step-insert property">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_valid_value("block-step-insert", "margin");
|
||||
test_valid_value("block-step-insert", "padding");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Rhythm: block-step-size computed values</title>
|
||||
<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
|
||||
<meta name="assert" content="Checking computed values for block-step-size">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("block-step-size", "0px");
|
||||
test_computed_value("block-step-size", "none");
|
||||
test_computed_value("block-step-size", "100px");
|
||||
test_computed_value("block-step-size", "2em", "80px");
|
||||
test_computed_value("block-step-size", "calc(10px + 0.5em)", "30px");
|
||||
test_computed_value("block-step-size", "calc(10px - 0.5em)", "0px");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Rhythm: block-step-size invalid values</title>
|
||||
<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
|
||||
<meta name="assert" content="Invalid values for block-step-size should not be parsed">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_invalid_value("block-step-size", "auto");
|
||||
test_invalid_value("block-step-size", "-1px");
|
||||
test_invalid_value("block-step-size", "min-content");
|
||||
test_invalid_value("block-step-size", "10%");
|
||||
test_invalid_value("block-step-size", "20");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CSS Rhythm: block-step-size valid values</title>
|
||||
<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
|
||||
<meta name="assert" content="Parsing valid values for block-step-size properties">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_valid_value("block-step-size", "1px");
|
||||
test_valid_value("block-step-size", "2em");
|
||||
test_valid_value("block-step-size", "0", "0px");
|
||||
test_valid_value("block-step-size", "none");
|
||||
test_valid_value("block-step-size", "calc(2em + 3ex)");
|
||||
test_valid_value("block-step-size", "1.2em");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.container {
|
||||
font-family: monospace;
|
||||
font-size: 20px;
|
||||
width: 20ch;
|
||||
border: solid 1px;
|
||||
}
|
||||
</style>
|
||||
<div class="container" style="text-align: right">
|
||||
123456789 123 567
|
||||
123456789 123 567
|
||||
</div>
|
||||
<div class="container" style="text-align: center">
|
||||
123456789 123 567
|
||||
123456789 123 567
|
||||
</div>
|
||||
<div class="container" style="text-align: justify">
|
||||
123456789 123 567
|
||||
123456789 123 567
|
||||
</div>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://w3c.github.io/csswg-drafts/css-text-4/#valdef-text-wrap-balance">
|
||||
<link rel="match" href="reference/text-wrap-balance-align-001-ref.html">
|
||||
<style>
|
||||
.container {
|
||||
font-family: monospace;
|
||||
font-size: 20px;
|
||||
width: 20ch;
|
||||
border: solid 1px;
|
||||
text-wrap: balance;
|
||||
}
|
||||
</style>
|
||||
<div class="container" style="text-align: right">
|
||||
123456789 123 567
|
||||
123456789 123 567
|
||||
</div>
|
||||
<div class="container" style="text-align: center">
|
||||
123456789 123 567
|
||||
123456789 123 567
|
||||
</div>
|
||||
<div class="container" style="text-align: justify">
|
||||
123456789 123 567
|
||||
123456789 123 567
|
||||
</div>
|
|
@ -9,7 +9,7 @@
|
|||
Perspective with different transforms can have small anti-aliasing
|
||||
pixel differences, so the test should fuzzy patch to the ref.
|
||||
-->
|
||||
<meta name="fuzzy" content="maxDifference=0-29;totalPixels=0-235">
|
||||
<meta name="fuzzy" content="maxDifference=0-94;totalPixels=0-538">
|
||||
<style>
|
||||
|
||||
#container {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
difficult to construct a correct reference file for more complex
|
||||
transforms.)'>
|
||||
<link rel="match" href="transform-input-013-ref.html">
|
||||
<meta name="fuzzy" content="maxDifference=0-128;totalPixels=0-2254">
|
||||
<meta name="fuzzy" content="maxDifference=0-129;totalPixels=0-2506">
|
||||
<style>
|
||||
input {
|
||||
/* Margin to avoid overlap of translated inputs */
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Transitions Test: !important property</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-cascade-5/#cascade-sort">
|
||||
<script src="/resources/testharness.js" type="text/javascript"></script>
|
||||
<script src="/resources/testharnessreport.js" type="text/javascript"></script>
|
||||
<style>
|
||||
#target {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background-color: green;
|
||||
transition: background-color 100s;
|
||||
}
|
||||
.red {
|
||||
background-color: red !important;
|
||||
}
|
||||
</style>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test(t => {
|
||||
assert_equals(getComputedStyle(target).backgroundColor, "rgb(0, 128, 0)");
|
||||
target.className = "red";
|
||||
assert_equals(getComputedStyle(target).backgroundColor, "rgb(0, 128, 0)");
|
||||
}, "!important should not override transition");
|
||||
</script>
|
|
@ -23,6 +23,7 @@
|
|||
<div id="target8" style="color: green; color: var(--prop);"></div>
|
||||
<div id="target9" style="margin: var(--prop); margin-top: 10px"></div>
|
||||
<div id="target10"style="expando: var(--prop);"></div>
|
||||
<div id="target11"style="color: /* comment that must be preserved */ var(--prop) var(--prop);"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
"use strict";
|
||||
|
@ -37,7 +38,8 @@
|
|||
{ element: "target7", expectedCssText: "background: var(--prop);" },
|
||||
{ element: "target8", expectedCssText: "color: var(--prop);" },
|
||||
{ element: "target9", expectedCssText: "margin-right: ; margin-bottom: ; margin-left: ; margin-top: 10px;" },
|
||||
{ element: "target10", expectedCssText: "" }
|
||||
{ element: "target10", expectedCssText: "" },
|
||||
{ element: "target11", expectedCssText: "color: /* comment that must be preserved */ var(--prop) var(--prop);" }
|
||||
];
|
||||
|
||||
testcases.forEach(function (testcase) {
|
||||
|
|
|
@ -17,6 +17,7 @@ div { box-sizing: border-box; will-change: transform }
|
|||
.shared {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
view-transition-name: shared;
|
||||
}
|
||||
body { background: pink }
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<link rel="help" href="https://github.com/WICG/view-transitions">
|
||||
<link rel="author" href="mailto:vmpstr@chromium.org">
|
||||
<link rel="match" href="3d-transform-incoming-ref.html">
|
||||
<meta name=fuzzy content="3d-transform-incoming-ref.html:0-80;0-500">
|
||||
<meta name=fuzzy content="3d-transform-incoming-ref.html:0-255;0-500">
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<style>
|
||||
div { box-sizing: border-box; will-change: transform }
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<title>View transitions: validates that transform-origin value is default for view-transition-group (ref)</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
|
||||
<link rel="author" href="mailto:khushalsagar@chromium.org">
|
||||
<style>
|
||||
.target {
|
||||
width: 100px;
|
||||
height: 150px;
|
||||
background: green;
|
||||
position: fixed;
|
||||
top: 200px;
|
||||
left: 200px;
|
||||
transform: rotate(90deg);
|
||||
view-transition-name: target;
|
||||
clip-path: inset(1px 1px 1px 1px);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="target"></div>
|
|
@ -0,0 +1,58 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<title>View transitions: validates that transform-origin value is default for view-transition-group</title>
|
||||
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
|
||||
<link rel="author" href="mailto:khushalsagar@chromium.org">
|
||||
<link rel="match" href="transform-origin-view-transition-group-ref.html">
|
||||
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<style>
|
||||
.target {
|
||||
width: 100px;
|
||||
height: 150px;
|
||||
background: green;
|
||||
view-transition-name: target;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
contain: paint;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: grey;
|
||||
view-transition-name: hidden;
|
||||
}
|
||||
|
||||
html::view-transition-group(hidden) { animation-duration: 300s; }
|
||||
html::view-transition-image-pair(hidden) { animation: unset; opacity: 0; }
|
||||
|
||||
html::view-transition-group(target) {
|
||||
animation: unset;
|
||||
transform: rotate(90deg);
|
||||
top: 200px;
|
||||
left: 200px;
|
||||
/* The edges have minor pixel differences due to blending in highdpi */
|
||||
clip-path: inset(1px 1px 1px 1px);
|
||||
}
|
||||
|
||||
html::view-transition-old(target) {
|
||||
opacity: 1;
|
||||
animation: unset;
|
||||
}
|
||||
html::view-transition-new(target) {
|
||||
opacity: 0;
|
||||
animation: unset;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="target"></div>
|
||||
<div class="hidden"></div>
|
||||
|
||||
<script>
|
||||
failIfNot(document.startViewTransition, "Missing document.startViewTransition");
|
||||
|
||||
async function runTest() {
|
||||
document.startViewTransition().ready.then(
|
||||
requestAnimationFrame(() => requestAnimationFrame(takeScreenshot)));
|
||||
}
|
||||
onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
|
||||
</script>
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<link rel="author" href="mailto:masonf@chromium.org">
|
||||
<link rel=help href="https://open-ui.org/components/popup.research.explainer">
|
||||
<meta name="timeout" content="long">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-actions.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/popover-utils.js"></script>
|
||||
<script src="../../resources/common.js"></script>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
setup({ explicit_done: true });
|
||||
window.onload = () => {
|
||||
// Loop through all HTML5 elements that render a box by default:
|
||||
let elementsThatDontRender = ['audio','base','br','datalist','dialog','embed','head','link','meta','noscript','param','rp','script','slot','style','template','title','wbr'];
|
||||
const elements = HTML5_ELEMENTS.filter(el => !elementsThatDontRender.includes(el));
|
||||
elements.forEach(tag => {
|
||||
test((t) => {
|
||||
const element = document.createElement(tag);
|
||||
element.setAttribute('popover','auto');
|
||||
document.body.appendChild(element);
|
||||
t.add_cleanup(() => element.remove());
|
||||
assertIsFunctionalPopover(element);
|
||||
}, `A <${tag} popover> element should behave as a popover.`);
|
||||
test((t) => {
|
||||
const element = document.createElement(tag);
|
||||
document.body.appendChild(element);
|
||||
t.add_cleanup(() => element.remove());
|
||||
assertNotAPopover(element);
|
||||
}, `A <${tag}> element should *not* behave as a popover.`);
|
||||
});
|
||||
|
||||
done();
|
||||
};
|
||||
</script>
|
|
@ -9,7 +9,6 @@
|
|||
<script src="/resources/testdriver-actions.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script src="resources/popover-utils.js"></script>
|
||||
<script src="../../resources/common.js"></script>
|
||||
|
||||
<div id=popovers>
|
||||
<div popover id=boolean>Pop up</div>
|
||||
|
@ -53,59 +52,6 @@
|
|||
setup({ explicit_done: true });
|
||||
window.onload = () => {
|
||||
const outsideElement = document.getElementById('outside');
|
||||
function assertPopoverVisibility(popover, isPopover, expectedVisibility, message) {
|
||||
const isVisible = isElementVisible(popover);
|
||||
assert_equals(isVisible, expectedVisibility,`${message}: Expected this element to be ${expectedVisibility ? "visible" : "not visible"}`);
|
||||
// Check other things related to being visible or not:
|
||||
if (isVisible) {
|
||||
assert_not_equals(window.getComputedStyle(popover).display,'none');
|
||||
assert_equals(popover.matches(':open'),isPopover,`${message}: Visible popovers should match :open`);
|
||||
assert_false(popover.matches(':closed'),`${message}: Visible popovers and *all* non-popovers should *not* match :closed`);
|
||||
} else {
|
||||
assert_equals(window.getComputedStyle(popover).display,'none',`${message}: Non-showing popovers should have display:none`);
|
||||
assert_false(popover.matches(':open'),`${message}: Non-showing popovers should *not* match :open`);
|
||||
assert_true(popover.matches(':closed'),`${message}: Non-showing popovers should match :closed`);
|
||||
}
|
||||
}
|
||||
function assertIsFunctionalPopover(popover) {
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/false, 'A popover should start out hidden');
|
||||
popover.showPopover();
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/true, 'After showPopover(), a popover should be visible');
|
||||
assert_throws_dom("InvalidStateError",() => popover.showPopover(),'Calling showPopover on a showing popover should throw InvalidStateError');
|
||||
popover.hidePopover();
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/false, 'After hidePopover(), a popover should be hidden');
|
||||
assert_throws_dom("InvalidStateError",() => popover.hidePopover(),'Calling hidePopover on a hidden popover should throw InvalidStateError');
|
||||
popover.togglePopover();
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/true, 'After togglePopover() on hidden popover, it should be visible');
|
||||
popover.togglePopover();
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/false, 'After togglePopover() on visible popover, it should be hidden');
|
||||
popover.togglePopover(/*force=*/true);
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/true, 'After togglePopover(true) on hidden popover, it should be visible');
|
||||
popover.togglePopover(/*force=*/true);
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/true, 'After togglePopover(true) on visible popover, it should be visible');
|
||||
popover.togglePopover(/*force=*/false);
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/false, 'After togglePopover(false) on visible popover, it should be hidden');
|
||||
popover.togglePopover(/*force=*/false);
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/false, 'After togglePopover(false) on hidden popover, it should be hidden');
|
||||
const parent = popover.parentElement;
|
||||
popover.remove();
|
||||
assert_throws_dom("InvalidStateError",() => popover.showPopover(),'Calling showPopover on a disconnected popover should throw InvalidStateError');
|
||||
assert_throws_dom("InvalidStateError",() => popover.hidePopover(),'Calling hidePopover on a disconnected popover should throw InvalidStateError');
|
||||
assert_throws_dom("InvalidStateError",() => popover.togglePopover(),'Calling hidePopover on a disconnected popover should throw InvalidStateError');
|
||||
parent.appendChild(popover);
|
||||
}
|
||||
function assertNotAPopover(nonPopover) {
|
||||
// If the non-popover element nonetheless has a 'popover' attribute, it should
|
||||
// be invisible. Otherwise, it should be visible.
|
||||
const expectVisible = !nonPopover.hasAttribute('popover');
|
||||
assertPopoverVisibility(nonPopover, /*isPopover*/false, expectVisible, 'A non-popover should start out visible');
|
||||
assert_throws_dom("NotSupportedError",() => nonPopover.showPopover(),'Calling showPopover on a non-popover should throw NotSupported');
|
||||
assertPopoverVisibility(nonPopover, /*isPopover*/false, expectVisible, 'Calling showPopover on a non-popover should leave it visible');
|
||||
assert_throws_dom("NotSupportedError",() => nonPopover.hidePopover(),'Calling hidePopover on a non-popover should throw NotSupported');
|
||||
assertPopoverVisibility(nonPopover, /*isPopover*/false, expectVisible, 'Calling hidePopover on a non-popover should leave it visible');
|
||||
assert_throws_dom("NotSupportedError",() => nonPopover.togglePopover(),'Calling togglePopover on a non-popover should throw NotSupported');
|
||||
assertPopoverVisibility(nonPopover, /*isPopover*/false, expectVisible, 'Calling togglePopover on a non-popover should leave it visible');
|
||||
}
|
||||
|
||||
// Start with the provided examples:
|
||||
Array.from(document.getElementById('popovers').children).forEach(popover => {
|
||||
|
@ -119,25 +65,6 @@ window.onload = () => {
|
|||
}, `The element ${nonPopover.outerHTML} should *not* behave as a popover.`);
|
||||
});
|
||||
|
||||
// Then loop through all HTML5 elements that render a box by default:
|
||||
let elementsThatDontRender = ['audio','base','br','datalist','dialog','embed','head','link','meta','noscript','param','rp','script','slot','style','template','title','wbr'];
|
||||
const elements = HTML5_ELEMENTS.filter(el => !elementsThatDontRender.includes(el));
|
||||
elements.forEach(tag => {
|
||||
test((t) => {
|
||||
const element = document.createElement(tag);
|
||||
element.setAttribute('popover','auto');
|
||||
document.body.appendChild(element);
|
||||
t.add_cleanup(() => element.remove());
|
||||
assertIsFunctionalPopover(element);
|
||||
}, `A <${tag} popover> element should behave as a popover.`);
|
||||
test((t) => {
|
||||
const element = document.createElement(tag);
|
||||
document.body.appendChild(element);
|
||||
t.add_cleanup(() => element.remove());
|
||||
assertNotAPopover(element);
|
||||
}, `A <${tag}> element should *not* behave as a popover.`);
|
||||
});
|
||||
|
||||
function createPopover(t) {
|
||||
const popover = document.createElement('div');
|
||||
document.body.appendChild(popover);
|
||||
|
|
|
@ -114,3 +114,59 @@ function popoverHintSupported() {
|
|||
testElement.popover = 'hint';
|
||||
return testElement.popover === 'hint';
|
||||
}
|
||||
|
||||
function assertPopoverVisibility(popover, isPopover, expectedVisibility, message) {
|
||||
const isVisible = isElementVisible(popover);
|
||||
assert_equals(isVisible, expectedVisibility,`${message}: Expected this element to be ${expectedVisibility ? "visible" : "not visible"}`);
|
||||
// Check other things related to being visible or not:
|
||||
if (isVisible) {
|
||||
assert_not_equals(window.getComputedStyle(popover).display,'none');
|
||||
assert_equals(popover.matches(':open'),isPopover,`${message}: Visible popovers should match :open`);
|
||||
assert_false(popover.matches(':closed'),`${message}: Visible popovers and *all* non-popovers should *not* match :closed`);
|
||||
} else {
|
||||
assert_equals(window.getComputedStyle(popover).display,'none',`${message}: Non-showing popovers should have display:none`);
|
||||
assert_false(popover.matches(':open'),`${message}: Non-showing popovers should *not* match :open`);
|
||||
assert_true(popover.matches(':closed'),`${message}: Non-showing popovers should match :closed`);
|
||||
}
|
||||
}
|
||||
|
||||
function assertIsFunctionalPopover(popover) {
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/false, 'A popover should start out hidden');
|
||||
popover.showPopover();
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/true, 'After showPopover(), a popover should be visible');
|
||||
assert_throws_dom("InvalidStateError",() => popover.showPopover(),'Calling showPopover on a showing popover should throw InvalidStateError');
|
||||
popover.hidePopover();
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/false, 'After hidePopover(), a popover should be hidden');
|
||||
assert_throws_dom("InvalidStateError",() => popover.hidePopover(),'Calling hidePopover on a hidden popover should throw InvalidStateError');
|
||||
popover.togglePopover();
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/true, 'After togglePopover() on hidden popover, it should be visible');
|
||||
popover.togglePopover();
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/false, 'After togglePopover() on visible popover, it should be hidden');
|
||||
popover.togglePopover(/*force=*/true);
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/true, 'After togglePopover(true) on hidden popover, it should be visible');
|
||||
popover.togglePopover(/*force=*/true);
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/true, 'After togglePopover(true) on visible popover, it should be visible');
|
||||
popover.togglePopover(/*force=*/false);
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/false, 'After togglePopover(false) on visible popover, it should be hidden');
|
||||
popover.togglePopover(/*force=*/false);
|
||||
assertPopoverVisibility(popover, /*isPopover*/true, /*expectedVisibility*/false, 'After togglePopover(false) on hidden popover, it should be hidden');
|
||||
const parent = popover.parentElement;
|
||||
popover.remove();
|
||||
assert_throws_dom("InvalidStateError",() => popover.showPopover(),'Calling showPopover on a disconnected popover should throw InvalidStateError');
|
||||
assert_throws_dom("InvalidStateError",() => popover.hidePopover(),'Calling hidePopover on a disconnected popover should throw InvalidStateError');
|
||||
assert_throws_dom("InvalidStateError",() => popover.togglePopover(),'Calling hidePopover on a disconnected popover should throw InvalidStateError');
|
||||
parent.appendChild(popover);
|
||||
}
|
||||
|
||||
function assertNotAPopover(nonPopover) {
|
||||
// If the non-popover element nonetheless has a 'popover' attribute, it should
|
||||
// be invisible. Otherwise, it should be visible.
|
||||
const expectVisible = !nonPopover.hasAttribute('popover');
|
||||
assertPopoverVisibility(nonPopover, /*isPopover*/false, expectVisible, 'A non-popover should start out visible');
|
||||
assert_throws_dom("NotSupportedError",() => nonPopover.showPopover(),'Calling showPopover on a non-popover should throw NotSupported');
|
||||
assertPopoverVisibility(nonPopover, /*isPopover*/false, expectVisible, 'Calling showPopover on a non-popover should leave it visible');
|
||||
assert_throws_dom("NotSupportedError",() => nonPopover.hidePopover(),'Calling hidePopover on a non-popover should throw NotSupported');
|
||||
assertPopoverVisibility(nonPopover, /*isPopover*/false, expectVisible, 'Calling hidePopover on a non-popover should leave it visible');
|
||||
assert_throws_dom("NotSupportedError",() => nonPopover.togglePopover(),'Calling togglePopover on a non-popover should throw NotSupported');
|
||||
assertPopoverVisibility(nonPopover, /*isPopover*/false, expectVisible, 'Calling togglePopover on a non-popover should leave it visible');
|
||||
}
|
||||
|
|
|
@ -212,7 +212,7 @@ promise_test(async t => {
|
|||
|
||||
assert_equals(artwork.length, URLs.length);
|
||||
for (let i = 0 ; i < artwork.length ; ++i) {
|
||||
assert_equals(artwork[i].src, new URL(URLs[i], document.URL).href);
|
||||
assert_equals(artwork[i].src, new URL(URLs[i], subframe.contentDocument.URL).href);
|
||||
}
|
||||
}, 'Test that the base URL of MediaImage is the base URL of entry setting object');
|
||||
|
||||
|
|
|
@ -17,119 +17,58 @@ div.box {
|
|||
</div>
|
||||
|
||||
<script>
|
||||
var receivedEvents = [];
|
||||
var receivedMouseEvents = [];
|
||||
var receivedPointerEvents = [];
|
||||
var mouseEventList = ["mousedown", "mouseup", "mouseenter", "mouseleave", "mouseover", "mouseout", "mousemove"];
|
||||
var pointerEventList = ["pointerdown", "pointerup", "pointerenter", "pointerleave", "pointerover", "pointerout", "pointermove"];
|
||||
var receivedEvents = [];
|
||||
var receivedMouseEvents = [];
|
||||
var receivedPointerEvents = [];
|
||||
var mouseEventList = ["mousedown", "mouseup", "mouseenter", "mouseleave", "mouseover", "mouseout", "mousemove"];
|
||||
var pointerEventList = ["pointerdown", "pointerup", "pointerenter", "pointerleave", "pointerover", "pointerout", "pointermove"];
|
||||
|
||||
var preventDefaultList = ["none"].concat(pointerEventList);
|
||||
var eventToPreventDefault = "";
|
||||
var preventDefaultList = ["none"].concat(pointerEventList);
|
||||
var eventToPreventDefault = "";
|
||||
|
||||
function init() {
|
||||
var targetDiv = document.getElementById("target");
|
||||
function init() {
|
||||
var targetDiv = document.getElementById("target");
|
||||
|
||||
mouseEventList.forEach(function(eventName) {
|
||||
targetDiv.addEventListener(eventName, function(event) {
|
||||
receivedEvents.push(eventName);
|
||||
receivedMouseEvents.push(eventName);
|
||||
mouseEventList.forEach(function (eventName) {
|
||||
targetDiv.addEventListener(eventName, function (event) {
|
||||
receivedEvents.push(eventName);
|
||||
receivedMouseEvents.push(eventName);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
pointerEventList.forEach(function(eventName) {
|
||||
targetDiv.addEventListener(eventName, function(event) {
|
||||
if (event.type == eventToPreventDefault) {
|
||||
event.preventDefault();
|
||||
}
|
||||
receivedEvents.push(eventName);
|
||||
receivedPointerEvents.push(eventName);
|
||||
pointerEventList.forEach(function (eventName) {
|
||||
targetDiv.addEventListener(eventName, function (event) {
|
||||
if (event.type == eventToPreventDefault) {
|
||||
event.preventDefault();
|
||||
}
|
||||
receivedEvents.push(eventName);
|
||||
receivedPointerEvents.push(eventName);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var expectedPointerEvents = new Map([
|
||||
["none", ["pointerover", "pointerenter", "pointermove", "pointerdown", "pointerup",
|
||||
"pointerdown", "pointermove", "pointerout", "pointerleave",
|
||||
"pointerover", "pointerenter", "pointermove", "pointerup", "pointerout",
|
||||
"pointerleave"
|
||||
]],
|
||||
["pointerdown", ["pointerover", "pointerenter", "pointermove", "pointerdown",
|
||||
"pointerup", "pointerdown", "pointermove", "pointerout", "pointerleave",
|
||||
"pointerover", "pointerenter", "pointermove", "pointerup", "pointerout",
|
||||
"pointerleave"
|
||||
]],
|
||||
["pointerup", ["pointerover", "pointerenter", "pointermove", "pointerdown",
|
||||
"pointerup", "pointerdown", "pointermove", "pointerout", "pointerleave",
|
||||
"pointerover", "pointerenter", "pointermove", "pointerup",
|
||||
"pointerout", "pointerleave"
|
||||
]],
|
||||
["pointerenter", ["pointerover", "pointerenter", "pointermove",
|
||||
"pointerdown", "pointerup", "pointerdown", "pointermove",
|
||||
"pointerout", "pointerleave", "pointerover", "pointerenter",
|
||||
"pointermove", "pointerup", "pointerout", "pointerleave"
|
||||
]],
|
||||
["pointerleave", ["pointerover", "pointerenter", "pointermove",
|
||||
"pointerdown", "pointerup", "pointerdown", "pointermove",
|
||||
"pointerout", "pointerleave", "pointerover", "pointerenter",
|
||||
"pointermove", "pointerup", "pointerout", "pointerleave"
|
||||
]],
|
||||
["pointerover", ["pointerover", "pointerenter", "pointermove",
|
||||
"pointerdown", "pointerup", "pointerdown", "pointermove",
|
||||
"pointerout", "pointerleave", "pointerover", "pointerenter",
|
||||
"pointermove", "pointerup", "pointerout",
|
||||
"pointerleave"
|
||||
]],
|
||||
["pointerout", ["pointerover", "pointerenter", "pointermove",
|
||||
"pointerdown", "pointerup", "pointerdown", "pointermove",
|
||||
"pointerout", "pointerleave", "pointerover", "pointerenter",
|
||||
"pointermove", "pointerup", "pointerout",
|
||||
"pointerleave"
|
||||
]],
|
||||
["pointermove", ["pointerover", "pointerenter", "pointermove",
|
||||
"pointerdown", "pointerup", "pointerdown", "pointermove",
|
||||
"pointerout", "pointerleave", "pointerover", "pointerenter",
|
||||
"pointermove", "pointerup", "pointerout", "pointerleave"
|
||||
]]
|
||||
]);
|
||||
var expectedMouseEvents = new Map([
|
||||
["none", ["mouseover", "mouseenter", "mousemove", "mousedown", "mouseup",
|
||||
"mousedown", "mousemove", "mouseout", "mouseleave",
|
||||
"mouseover", "mouseenter", "mousemove", "mouseup", "mouseout", "mouseleave"
|
||||
]],
|
||||
["pointerdown", ["mouseover", "mouseenter", "mousemove",
|
||||
"mouseout", "mouseleave", "mouseover", "mouseenter",
|
||||
"mouseout", "mouseleave"
|
||||
]],
|
||||
["pointerup", ["mouseover", "mouseenter", "mousemove",
|
||||
"mousedown", "mouseup", "mousedown", "mousemove",
|
||||
"mouseout", "mouseleave", "mouseover",
|
||||
"mouseenter", "mousemove", "mouseup", "mouseout", "mouseleave"
|
||||
]],
|
||||
["pointerenter", ["mouseover", "mouseenter", "mousemove", "mousedown",
|
||||
"mouseup", "mousedown", "mousemove", "mouseout", "mouseleave",
|
||||
"mouseover", "mouseenter", "mousemove", "mouseup", "mouseout", "mouseleave"
|
||||
]],
|
||||
["pointerleave", ["mouseover", "mouseenter", "mousemove", "mousedown",
|
||||
"mouseup", "mousedown", "mousemove", "mouseout", "mouseleave",
|
||||
"mouseover", "mouseenter", "mousemove", "mouseup",
|
||||
"mouseout", "mouseleave"
|
||||
]],
|
||||
["pointerover", ["mouseover", "mouseenter", "mousemove",
|
||||
"mousedown", "mouseup", "mousedown", "mousemove", "mouseout",
|
||||
"mouseleave", "mouseover", "mouseenter", "mousemove", "mouseup",
|
||||
"mouseout", "mouseleave"
|
||||
]],
|
||||
["pointerout", ["mouseover", "mouseenter", "mousemove",
|
||||
"mousedown", "mouseup", "mousedown", "mousemove",
|
||||
"mouseout", "mouseleave", "mouseover", "mouseenter",
|
||||
"mousemove", "mouseup", "mouseout", "mouseleave"
|
||||
]],
|
||||
["pointermove", ["mouseover", "mouseenter", "mousemove",
|
||||
"mousedown", "mouseup", "mousedown", "mousemove",
|
||||
"mouseout", "mouseleave", "mouseover", "mouseenter",
|
||||
"mousemove", "mouseup", "mouseout", "mouseleave"
|
||||
]]
|
||||
]);
|
||||
function expectedPointerEvents() {
|
||||
return [
|
||||
"pointerover", "pointerenter", "pointermove", "pointerdown", "pointerup",
|
||||
"pointerdown", "pointermove", "pointerout", "pointerleave", "pointerover",
|
||||
"pointerenter", "pointermove", "pointerup", "pointerout", "pointerleave"
|
||||
];
|
||||
}
|
||||
|
||||
// When "pointerdown" is not prevented, all compat mouse events are fired.
|
||||
// Otherwise, the "mousedown/move/up" events between "pointerdown" and
|
||||
// "pointerup" are suppressed.
|
||||
function expectedMouseEvents(prevented_event) {
|
||||
return prevented_event === "pointerdown"
|
||||
? ["mouseover", "mouseenter", "mousemove",
|
||||
"mouseout", "mouseleave", "mouseover", "mouseenter",
|
||||
"mouseout", "mouseleave"]
|
||||
: ["mouseover", "mouseenter", "mousemove",
|
||||
"mousedown", "mouseup", "mousedown", "mousemove",
|
||||
"mouseout", "mouseleave", "mouseover", "mouseenter",
|
||||
"mousemove", "mouseup",
|
||||
"mouseout", "mouseleave"];
|
||||
}
|
||||
|
||||
async function runTestForDefaultEvent(preventDefaultEvent) {
|
||||
promise_test((test)=>
|
||||
|
@ -153,8 +92,8 @@ async function runTestForDefaultEvent(preventDefaultEvent) {
|
|||
if(eventToPreventDefault === 'none'){
|
||||
assert_true(arePointerEventsBeforeCompatMouseEvents(receivedEvents), "There are no compatible mouse events for all pointer events:" + receivedEvents);
|
||||
}
|
||||
assert_array_equals(receivedPointerEvents, expectedPointerEvents.get(preventDefaultEvent));
|
||||
assert_array_equals(receivedMouseEvents, expectedMouseEvents.get(preventDefaultEvent));
|
||||
assert_array_equals(receivedPointerEvents, expectedPointerEvents());
|
||||
assert_array_equals(receivedMouseEvents, expectedMouseEvents(preventDefaultEvent));
|
||||
});
|
||||
resolve();
|
||||
}), `Verifies the effect of pointer event prevent-default on ${preventDefaultEvent}`);
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
const All_Pointer_Events = [
|
||||
"pointerdown",
|
||||
"pointerup",
|
||||
"pointercancel",
|
||||
"pointermove",
|
||||
"pointerover",
|
||||
"pointerout",
|
||||
"pointerenter",
|
||||
"pointerleave",
|
||||
"gotpointercapture",
|
||||
"lostpointercapture"];
|
||||
"pointerdown",
|
||||
"pointerup",
|
||||
"pointercancel",
|
||||
"pointermove",
|
||||
"pointerover",
|
||||
"pointerout",
|
||||
"pointerenter",
|
||||
"pointerleave",
|
||||
"gotpointercapture",
|
||||
"lostpointercapture"
|
||||
];
|
||||
|
||||
// https://w3c.github.io/pointerevents/#the-button-property
|
||||
// Values for the button property, which indicates the device button whose state
|
||||
|
@ -44,194 +45,194 @@ const ButtonsBitfield = {
|
|||
// Check for conformance to PointerEvent interface
|
||||
// https://w3c.github.io/pointerevents/#pointerevent-interface
|
||||
function check_PointerEvent(event, testNamePrefix) {
|
||||
if (testNamePrefix === undefined)
|
||||
testNamePrefix = "";
|
||||
if (testNamePrefix === undefined)
|
||||
testNamePrefix = "";
|
||||
|
||||
// Use expectedPointerType if set otherwise just use the incoming event pointerType in the test name.
|
||||
var pointerTestName = (testNamePrefix ? testNamePrefix + ' ' : '')
|
||||
+ (expectedPointerType == null ? event.pointerType : expectedPointerType) + ' ' + event.type;
|
||||
// Use expectedPointerType if set otherwise just use the incoming event pointerType in the test name.
|
||||
var pointerTestName = (testNamePrefix ? testNamePrefix + ' ' : '')
|
||||
+ (expectedPointerType == null ? event.pointerType : expectedPointerType) + ' ' + event.type;
|
||||
|
||||
if (expectedPointerType != null) {
|
||||
test(function () {
|
||||
assert_equals(event.pointerType, expectedPointerType);
|
||||
}, pointerTestName + ".pointerType is correct.");
|
||||
if (expectedPointerType != null) {
|
||||
test(function () {
|
||||
assert_equals(event.pointerType, expectedPointerType);
|
||||
}, pointerTestName + ".pointerType is correct.");
|
||||
}
|
||||
|
||||
test(function () {
|
||||
assert_true(event instanceof event.target.ownerDocument.defaultView.PointerEvent);
|
||||
}, pointerTestName + " event is a PointerEvent event");
|
||||
|
||||
|
||||
// Check attributes for conformance to WebIDL (existence, type, being readable).
|
||||
var idl_type_check = {
|
||||
"long": function (v) { return typeof v === "number" && Math.round(v) === v; },
|
||||
"float": function (v) { return typeof v === "number"; },
|
||||
"string": function (v) { return typeof v === "string"; },
|
||||
"boolean": function (v) { return typeof v === "boolean" },
|
||||
"object": function (v) { return typeof v === "object" }
|
||||
};
|
||||
[
|
||||
["long", "pointerId"],
|
||||
["float", "width"],
|
||||
["float", "height"],
|
||||
["float", "pressure"],
|
||||
["long", "tiltX"],
|
||||
["long", "tiltY"],
|
||||
["string", "pointerType"],
|
||||
["boolean", "isPrimary"],
|
||||
["long", "detail", 0],
|
||||
["object", "fromElement"],
|
||||
["object", "toElement"],
|
||||
["boolean", "isTrusted"],
|
||||
["boolean", "composed"],
|
||||
["boolean", "bubbles"]
|
||||
].forEach(function (attr) {
|
||||
var type = attr[0];
|
||||
var name = attr[1];
|
||||
|
||||
test(function () {
|
||||
// Existence check.
|
||||
assert_true(name in event, "attribute exists");
|
||||
|
||||
// Readonly check.
|
||||
assert_readonly(event.type, name, "attribute is readonly");
|
||||
|
||||
// Type check.
|
||||
assert_true(idl_type_check[type](event[name]),
|
||||
"attribute type " + type + " (JS type was " + typeof event[name] + ")");
|
||||
}, pointerTestName + "." + name + " conforms to WebIDL");
|
||||
});
|
||||
|
||||
// Check values for inherited attributes.
|
||||
// https://w3c.github.io/pointerevents/#attributes-and-default-actions
|
||||
test(function () {
|
||||
assert_equals(event.fromElement, null);
|
||||
}, pointerTestName + ".fromElement value is null");
|
||||
test(function () {
|
||||
assert_equals(event.toElement, null);
|
||||
}, pointerTestName + ".toElement value is null");
|
||||
test(function () {
|
||||
assert_equals(event.isTrusted, true);
|
||||
}, pointerTestName + ".isTrusted value is true");
|
||||
test(function () {
|
||||
let expected = (event.type != 'pointerenter' && event.type != 'pointerleave');
|
||||
assert_equals(event.composed, expected);
|
||||
}, pointerTestName + ".composed value is valid");
|
||||
test(function () {
|
||||
let expected = (event.type != 'pointerenter' && event.type != 'pointerleave');
|
||||
assert_equals(event.bubbles, expected);
|
||||
}, pointerTestName + ".bubbles value is valid");
|
||||
|
||||
// Check the pressure value.
|
||||
// https://w3c.github.io/pointerevents/#dom-pointerevent-pressure
|
||||
test(function () {
|
||||
assert_greater_than_equal(event.pressure, 0, "pressure is greater than or equal to 0");
|
||||
assert_less_than_equal(event.pressure, 1, "pressure is less than or equal to 1");
|
||||
|
||||
if (event.buttons === 0) {
|
||||
assert_equals(event.pressure, 0, "pressure is 0 with no buttons pressed");
|
||||
} else {
|
||||
assert_greater_than(event.pressure, 0, "pressure is greater than 0 with a button pressed");
|
||||
if (event.pointerType === "mouse") {
|
||||
assert_equals(event.pressure, 0.5, "pressure is 0.5 for mouse with a button pressed");
|
||||
}
|
||||
}
|
||||
}, pointerTestName + ".pressure value is valid");
|
||||
|
||||
// Check mouse-specific properties.
|
||||
if (event.pointerType === "mouse") {
|
||||
test(function () {
|
||||
assert_true(event instanceof event.target.ownerDocument.defaultView.PointerEvent);
|
||||
}, pointerTestName + " event is a PointerEvent event");
|
||||
assert_equals(event.width, 1, "width of mouse should be 1");
|
||||
assert_equals(event.height, 1, "height of mouse should be 1");
|
||||
assert_equals(event.tiltX, 0, event.type + ".tiltX is 0 for mouse");
|
||||
assert_equals(event.tiltY, 0, event.type + ".tiltY is 0 for mouse");
|
||||
assert_true(event.isPrimary, event.type + ".isPrimary is true for mouse");
|
||||
}, pointerTestName + " properties for pointerType = mouse");
|
||||
}
|
||||
|
||||
|
||||
// Check attributes for conformance to WebIDL (existence, type, being readable).
|
||||
var idl_type_check = {
|
||||
"long": function (v) { return typeof v === "number" && Math.round(v) === v; },
|
||||
"float": function (v) { return typeof v === "number"; },
|
||||
"string": function (v) { return typeof v === "string"; },
|
||||
"boolean": function (v) { return typeof v === "boolean" },
|
||||
"object": function (v) { return typeof v === "object" }
|
||||
};
|
||||
[
|
||||
["long", "pointerId"],
|
||||
["float", "width"],
|
||||
["float", "height"],
|
||||
["float", "pressure"],
|
||||
["long", "tiltX"],
|
||||
["long", "tiltY"],
|
||||
["string", "pointerType"],
|
||||
["boolean", "isPrimary"],
|
||||
["long", "detail", 0],
|
||||
["object", "fromElement"],
|
||||
["object", "toElement"],
|
||||
["boolean", "isTrusted"],
|
||||
["boolean", "composed"],
|
||||
["boolean", "bubbles"]
|
||||
].forEach(function (attr) {
|
||||
var type = attr[0];
|
||||
var name = attr[1];
|
||||
|
||||
test(function () {
|
||||
// Existence check.
|
||||
assert_true(name in event, "attribute exists");
|
||||
|
||||
// Readonly check.
|
||||
assert_readonly(event.type, name, "attribute is readonly");
|
||||
|
||||
// Type check.
|
||||
assert_true(idl_type_check[type](event[name]),
|
||||
"attribute type " + type + " (JS type was " + typeof event[name] + ")");
|
||||
}, pointerTestName + "." + name + " conforms to WebIDL");
|
||||
});
|
||||
|
||||
// Check values for inherited attributes.
|
||||
// https://w3c.github.io/pointerevents/#attributes-and-default-actions
|
||||
// Check "pointerup" specific properties.
|
||||
if (event.type == "pointerup") {
|
||||
test(function () {
|
||||
assert_equals(event.fromElement, null);
|
||||
}, pointerTestName + ".fromElement value is null");
|
||||
test(function () {
|
||||
assert_equals(event.toElement, null);
|
||||
}, pointerTestName + ".toElement value is null");
|
||||
test(function () {
|
||||
assert_equals(event.isTrusted, true);
|
||||
}, pointerTestName + ".isTrusted value is true");
|
||||
test(function () {
|
||||
let expected = (event.type != 'pointerenter' && event.type != 'pointerleave');
|
||||
assert_equals(event.composed, expected);
|
||||
}, pointerTestName + ".composed value is valid");
|
||||
test(function () {
|
||||
let expected = (event.type != 'pointerenter' && event.type != 'pointerleave');
|
||||
assert_equals(event.bubbles, expected);
|
||||
}, pointerTestName + ".bubbles value is valid");
|
||||
|
||||
// Check the pressure value.
|
||||
// https://w3c.github.io/pointerevents/#dom-pointerevent-pressure
|
||||
test(function () {
|
||||
assert_greater_than_equal(event.pressure, 0, "pressure is greater than or equal to 0");
|
||||
assert_less_than_equal(event.pressure, 1, "pressure is less than or equal to 1");
|
||||
|
||||
if (event.buttons === 0) {
|
||||
assert_equals(event.pressure, 0, "pressure is 0 with no buttons pressed");
|
||||
} else {
|
||||
assert_greater_than(event.pressure, 0, "pressure is greater than 0 with a button pressed");
|
||||
if (event.pointerType === "mouse") {
|
||||
assert_equals(event.pressure, 0.5, "pressure is 0.5 for mouse with a button pressed");
|
||||
}
|
||||
}
|
||||
}, pointerTestName + ".pressure value is valid");
|
||||
|
||||
// Check mouse-specific properties.
|
||||
if (event.pointerType === "mouse") {
|
||||
test(function () {
|
||||
assert_equals(event.width, 1, "width of mouse should be 1");
|
||||
assert_equals(event.height, 1, "height of mouse should be 1");
|
||||
assert_equals(event.tiltX, 0, event.type + ".tiltX is 0 for mouse");
|
||||
assert_equals(event.tiltY, 0, event.type + ".tiltY is 0 for mouse");
|
||||
assert_true(event.isPrimary, event.type + ".isPrimary is true for mouse");
|
||||
}, pointerTestName + " properties for pointerType = mouse");
|
||||
}
|
||||
|
||||
// Check "pointerup" specific properties.
|
||||
if (event.type == "pointerup") {
|
||||
test(function () {
|
||||
assert_equals(event.width, 1, "width of pointerup should be 1");
|
||||
assert_equals(event.height, 1, "height of pointerup should be 1");
|
||||
}, pointerTestName + " properties for pointerup");
|
||||
}
|
||||
assert_equals(event.width, 1, "width of pointerup should be 1");
|
||||
assert_equals(event.height, 1, "height of pointerup should be 1");
|
||||
}, pointerTestName + " properties for pointerup");
|
||||
}
|
||||
}
|
||||
|
||||
function showPointerTypes() {
|
||||
var complete_notice = document.getElementById("complete-notice");
|
||||
var pointertype_log = document.getElementById("pointertype-log");
|
||||
var pointertypes = Object.keys(detected_pointertypes);
|
||||
pointertype_log.innerHTML = pointertypes.length ?
|
||||
pointertypes.join(",") : "(none)";
|
||||
complete_notice.style.display = "block";
|
||||
var complete_notice = document.getElementById("complete-notice");
|
||||
var pointertype_log = document.getElementById("pointertype-log");
|
||||
var pointertypes = Object.keys(detected_pointertypes);
|
||||
pointertype_log.innerHTML = pointertypes.length ?
|
||||
pointertypes.join(",") : "(none)";
|
||||
complete_notice.style.display = "block";
|
||||
}
|
||||
|
||||
function showLoggedEvents() {
|
||||
var event_log_elem = document.getElementById("event-log");
|
||||
event_log_elem.innerHTML = event_log.length ? event_log.join(", ") : "(none)";
|
||||
var event_log_elem = document.getElementById("event-log");
|
||||
event_log_elem.innerHTML = event_log.length ? event_log.join(", ") : "(none)";
|
||||
|
||||
var complete_notice = document.getElementById("complete-notice");
|
||||
complete_notice.style.display = "block";
|
||||
var complete_notice = document.getElementById("complete-notice");
|
||||
complete_notice.style.display = "block";
|
||||
}
|
||||
|
||||
function failOnScroll() {
|
||||
assert_true(false,
|
||||
"scroll received while shouldn't");
|
||||
assert_true(false,
|
||||
"scroll received while shouldn't");
|
||||
}
|
||||
|
||||
function updateDescriptionNextStep() {
|
||||
document.getElementById('desc').innerHTML = "Test Description: Try to scroll text RIGHT.";
|
||||
document.getElementById('desc').innerHTML = "Test Description: Try to scroll text RIGHT.";
|
||||
}
|
||||
|
||||
function updateDescriptionComplete() {
|
||||
document.getElementById('desc').innerHTML = "Test Description: Test complete";
|
||||
document.getElementById('desc').innerHTML = "Test Description: Test complete";
|
||||
}
|
||||
|
||||
function updateDescriptionSecondStepTouchActionElement(target, scrollReturnInterval) {
|
||||
window.step_timeout(function() {
|
||||
objectScroller(target, 'up', 0);}
|
||||
, scrollReturnInterval);
|
||||
document.getElementById('desc').innerHTML = "Test Description: Try to scroll element RIGHT moving your outside of the red border";
|
||||
window.step_timeout(function() {
|
||||
objectScroller(target, 'up', 0);}
|
||||
, scrollReturnInterval);
|
||||
document.getElementById('desc').innerHTML = "Test Description: Try to scroll element RIGHT moving your outside of the red border";
|
||||
}
|
||||
|
||||
function updateDescriptionThirdStepTouchActionElement(target, scrollReturnInterval, callback = null) {
|
||||
window.step_timeout(function() {
|
||||
objectScroller(target, 'left', 0);
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}, scrollReturnInterval);
|
||||
document.getElementById('desc').innerHTML = "Test Description: Try to scroll element DOWN then RIGHT starting your touch inside of the element. Then tap complete button";
|
||||
window.step_timeout(function() {
|
||||
objectScroller(target, 'left', 0);
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}, scrollReturnInterval);
|
||||
document.getElementById('desc').innerHTML = "Test Description: Try to scroll element DOWN then RIGHT starting your touch inside of the element. Then tap complete button";
|
||||
}
|
||||
|
||||
function updateDescriptionFourthStepTouchActionElement(target, scrollReturnInterval) {
|
||||
document.getElementById('desc').innerHTML = "Test Description: Try to scroll element RIGHT starting your touch inside of the element";
|
||||
document.getElementById('desc').innerHTML = "Test Description: Try to scroll element RIGHT starting your touch inside of the element";
|
||||
}
|
||||
|
||||
function objectScroller(target, direction, value) {
|
||||
if (direction == 'up') {
|
||||
target.scrollTop = 0;
|
||||
} else if (direction == 'left') {
|
||||
target.scrollLeft = 0;
|
||||
}
|
||||
if (direction == 'up') {
|
||||
target.scrollTop = 0;
|
||||
} else if (direction == 'left') {
|
||||
target.scrollLeft = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function sPointerCapture(e) {
|
||||
try {
|
||||
target0.setPointerCapture(e.pointerId);
|
||||
}
|
||||
catch(e) {
|
||||
}
|
||||
try {
|
||||
target0.setPointerCapture(e.pointerId);
|
||||
}
|
||||
catch(e) {
|
||||
}
|
||||
}
|
||||
|
||||
function rPointerCapture(e) {
|
||||
try {
|
||||
captureButton.value = 'Set Capture';
|
||||
target0.releasePointerCapture(e.pointerId);
|
||||
}
|
||||
catch(e) {
|
||||
}
|
||||
try {
|
||||
captureButton.value = 'Set Capture';
|
||||
target0.releasePointerCapture(e.pointerId);
|
||||
}
|
||||
catch(e) {
|
||||
}
|
||||
}
|
||||
|
||||
var globalPointerEventTest = null;
|
||||
|
@ -239,192 +240,192 @@ var expectedPointerType = null;
|
|||
const ALL_POINTERS = ['mouse', 'touch', 'pen'];
|
||||
|
||||
function MultiPointerTypeTest(testName, types) {
|
||||
this.testName = testName;
|
||||
this.types = types;
|
||||
this.currentTypeIndex = 0;
|
||||
this.currentTest = null;
|
||||
this.createNextTest();
|
||||
this.testName = testName;
|
||||
this.types = types;
|
||||
this.currentTypeIndex = 0;
|
||||
this.currentTest = null;
|
||||
this.createNextTest();
|
||||
}
|
||||
|
||||
MultiPointerTypeTest.prototype.step = function(op) {
|
||||
this.currentTest.step(op);
|
||||
this.currentTest.step(op);
|
||||
}
|
||||
|
||||
MultiPointerTypeTest.prototype.skip = function() {
|
||||
var prevTest = this.currentTest;
|
||||
this.createNextTest();
|
||||
prevTest.timeout();
|
||||
var prevTest = this.currentTest;
|
||||
this.createNextTest();
|
||||
prevTest.timeout();
|
||||
}
|
||||
|
||||
MultiPointerTypeTest.prototype.done = function() {
|
||||
if (this.currentTest.status != 1) {
|
||||
var prevTest = this.currentTest;
|
||||
this.createNextTest();
|
||||
if (prevTest != null)
|
||||
prevTest.done();
|
||||
}
|
||||
if (this.currentTest.status != 1) {
|
||||
var prevTest = this.currentTest;
|
||||
this.createNextTest();
|
||||
if (prevTest != null)
|
||||
prevTest.done();
|
||||
}
|
||||
}
|
||||
|
||||
MultiPointerTypeTest.prototype.step = function(stepFunction) {
|
||||
this.currentTest.step(stepFunction);
|
||||
this.currentTest.step(stepFunction);
|
||||
}
|
||||
|
||||
MultiPointerTypeTest.prototype.createNextTest = function() {
|
||||
if (this.currentTypeIndex < this.types.length) {
|
||||
var pointerTypeDescription = document.getElementById('pointerTypeDescription');
|
||||
document.getElementById('pointerTypeDescription').innerHTML = "Follow the test instructions with <span style='color: red'>" + this.types[this.currentTypeIndex] + "</span>. If you don't have the device <a href='javascript:;' onclick='globalPointerEventTest.skip()'>skip it</a>.";
|
||||
this.currentTest = async_test(this.types[this.currentTypeIndex] + ' ' + this.testName);
|
||||
expectedPointerType = this.types[this.currentTypeIndex];
|
||||
this.currentTypeIndex++;
|
||||
} else {
|
||||
document.getElementById('pointerTypeDescription').innerHTML = "";
|
||||
}
|
||||
resetTestState();
|
||||
if (this.currentTypeIndex < this.types.length) {
|
||||
var pointerTypeDescription = document.getElementById('pointerTypeDescription');
|
||||
document.getElementById('pointerTypeDescription').innerHTML = "Follow the test instructions with <span style='color: red'>" + this.types[this.currentTypeIndex] + "</span>. If you don't have the device <a href='javascript:;' onclick='globalPointerEventTest.skip()'>skip it</a>.";
|
||||
this.currentTest = async_test(this.types[this.currentTypeIndex] + ' ' + this.testName);
|
||||
expectedPointerType = this.types[this.currentTypeIndex];
|
||||
this.currentTypeIndex++;
|
||||
} else {
|
||||
document.getElementById('pointerTypeDescription').innerHTML = "";
|
||||
}
|
||||
resetTestState();
|
||||
}
|
||||
|
||||
function setup_pointerevent_test(testName, supportedPointerTypes) {
|
||||
return globalPointerEventTest = new MultiPointerTypeTest(testName, supportedPointerTypes);
|
||||
return globalPointerEventTest = new MultiPointerTypeTest(testName, supportedPointerTypes);
|
||||
}
|
||||
|
||||
function checkPointerEventType(event) {
|
||||
assert_equals(event.pointerType, expectedPointerType, "pointerType should be the same as the requested device.");
|
||||
assert_equals(event.pointerType, expectedPointerType, "pointerType should be the same as the requested device.");
|
||||
}
|
||||
|
||||
function touchScrollInTarget(target, direction) {
|
||||
var x_delta = 0;
|
||||
var y_delta = 0;
|
||||
if (direction == "down") {
|
||||
x_delta = 0;
|
||||
y_delta = -10;
|
||||
} else if (direction == "up") {
|
||||
x_delta = 0;
|
||||
y_delta = 10;
|
||||
} else if (direction == "right") {
|
||||
x_delta = -10;
|
||||
y_delta = 0;
|
||||
} else if (direction == "left") {
|
||||
x_delta = 10;
|
||||
y_delta = 0;
|
||||
} else {
|
||||
throw("scroll direction '" + direction + "' is not expected, direction should be 'down', 'up', 'left' or 'right'");
|
||||
}
|
||||
return new test_driver.Actions()
|
||||
.addPointer("touchPointer1", "touch")
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerDown()
|
||||
.pointerMove(x_delta, y_delta, {origin: target})
|
||||
.pointerMove(2 * x_delta, 2 * y_delta, {origin: target})
|
||||
.pointerMove(3 * x_delta, 3 * y_delta, {origin: target})
|
||||
.pointerMove(4 * x_delta, 4 * y_delta, {origin: target})
|
||||
.pointerMove(5 * x_delta, 5 * y_delta, {origin: target})
|
||||
.pointerMove(6 * x_delta, 6 * y_delta, {origin: target})
|
||||
.pause(100)
|
||||
.pointerUp()
|
||||
.send();
|
||||
var x_delta = 0;
|
||||
var y_delta = 0;
|
||||
if (direction == "down") {
|
||||
x_delta = 0;
|
||||
y_delta = -10;
|
||||
} else if (direction == "up") {
|
||||
x_delta = 0;
|
||||
y_delta = 10;
|
||||
} else if (direction == "right") {
|
||||
x_delta = -10;
|
||||
y_delta = 0;
|
||||
} else if (direction == "left") {
|
||||
x_delta = 10;
|
||||
y_delta = 0;
|
||||
} else {
|
||||
throw("scroll direction '" + direction + "' is not expected, direction should be 'down', 'up', 'left' or 'right'");
|
||||
}
|
||||
return new test_driver.Actions()
|
||||
.addPointer("touchPointer1", "touch")
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerDown()
|
||||
.pointerMove(x_delta, y_delta, {origin: target})
|
||||
.pointerMove(2 * x_delta, 2 * y_delta, {origin: target})
|
||||
.pointerMove(3 * x_delta, 3 * y_delta, {origin: target})
|
||||
.pointerMove(4 * x_delta, 4 * y_delta, {origin: target})
|
||||
.pointerMove(5 * x_delta, 5 * y_delta, {origin: target})
|
||||
.pointerMove(6 * x_delta, 6 * y_delta, {origin: target})
|
||||
.pause(100)
|
||||
.pointerUp()
|
||||
.send();
|
||||
}
|
||||
|
||||
function clickInTarget(pointerType, target) {
|
||||
var pointerId = pointerType + "Pointer1";
|
||||
return new test_driver.Actions()
|
||||
.addPointer(pointerId, pointerType)
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerDown()
|
||||
.pointerUp()
|
||||
.send();
|
||||
var pointerId = pointerType + "Pointer1";
|
||||
return new test_driver.Actions()
|
||||
.addPointer(pointerId, pointerType)
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerDown()
|
||||
.pointerUp()
|
||||
.send();
|
||||
}
|
||||
|
||||
function rightClickInTarget(pointerType, target) {
|
||||
let pointerId = pointerType + "Pointer1";
|
||||
let actions = new test_driver.Actions();
|
||||
return actions.addPointer(pointerId, pointerType)
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerDown({button:actions.ButtonType.RIGHT})
|
||||
.pointerUp({button:actions.ButtonType.RIGHT})
|
||||
.send();
|
||||
let pointerId = pointerType + "Pointer1";
|
||||
let actions = new test_driver.Actions();
|
||||
return actions.addPointer(pointerId, pointerType)
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerDown({button:actions.ButtonType.RIGHT})
|
||||
.pointerUp({button:actions.ButtonType.RIGHT})
|
||||
.send();
|
||||
}
|
||||
|
||||
function twoFingerDrag(target) {
|
||||
return new test_driver.Actions()
|
||||
.addPointer("touchPointer1", "touch")
|
||||
.addPointer("touchPointer2", "touch")
|
||||
.pointerMove(0, 0, {origin: target, sourceName: "touchPointer1"})
|
||||
.pointerMove(10, 0, {origin: target, sourceName: "touchPointer2"})
|
||||
.pointerDown({sourceName: "touchPointer1"})
|
||||
.pointerDown({sourceName: "touchPointer2"})
|
||||
.pointerMove(0, 10, {origin: target, sourceName: "touchPointer1"})
|
||||
.pointerMove(10, 10, {origin: target, sourceName: "touchPointer2"})
|
||||
.pointerMove(0, 20, {origin: target, sourceName: "touchPointer1"})
|
||||
.pointerMove(10, 20, {origin: target, sourceName: "touchPointer2"})
|
||||
.pause(100)
|
||||
.pointerUp({sourceName: "touchPointer1"})
|
||||
.pointerUp({sourceName: "touchPointer2"})
|
||||
.send();
|
||||
.addPointer("touchPointer1", "touch")
|
||||
.addPointer("touchPointer2", "touch")
|
||||
.pointerMove(0, 0, { origin: target, sourceName: "touchPointer1" })
|
||||
.pointerMove(10, 0, { origin: target, sourceName: "touchPointer2" })
|
||||
.pointerDown({ sourceName: "touchPointer1" })
|
||||
.pointerDown({ sourceName: "touchPointer2" })
|
||||
.pointerMove(0, 10, { origin: target, sourceName: "touchPointer1" })
|
||||
.pointerMove(10, 10, { origin: target, sourceName: "touchPointer2" })
|
||||
.pointerMove(0, 20, { origin: target, sourceName: "touchPointer1" })
|
||||
.pointerMove(10, 20, { origin: target, sourceName: "touchPointer2" })
|
||||
.pause(100)
|
||||
.pointerUp({ sourceName: "touchPointer1" })
|
||||
.pointerUp({ sourceName: "touchPointer2" })
|
||||
.send();
|
||||
}
|
||||
|
||||
function pointerDragInTarget(pointerType, target, direction) {
|
||||
var x_delta = 0;
|
||||
var y_delta = 0;
|
||||
if (direction == "down") {
|
||||
x_delta = 0;
|
||||
y_delta = 10;
|
||||
} else if (direction == "up") {
|
||||
x_delta = 0;
|
||||
y_delta = -10;
|
||||
} else if (direction == "right") {
|
||||
x_delta = 10;
|
||||
y_delta = 0;
|
||||
} else if (direction == "left") {
|
||||
x_delta = -10;
|
||||
y_delta = 0;
|
||||
} else {
|
||||
throw("drag direction '" + direction + "' is not expected, direction should be 'down', 'up', 'left' or 'right'");
|
||||
}
|
||||
var pointerId = pointerType + "Pointer1";
|
||||
return new test_driver.Actions()
|
||||
.addPointer(pointerId, pointerType)
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerDown()
|
||||
.pointerMove(x_delta, y_delta, {origin: target})
|
||||
.pointerMove(2 * x_delta, 2 * y_delta, {origin: target})
|
||||
.pointerMove(3 * x_delta, 3 * y_delta, {origin: target})
|
||||
.pointerUp()
|
||||
.send();
|
||||
var x_delta = 0;
|
||||
var y_delta = 0;
|
||||
if (direction == "down") {
|
||||
x_delta = 0;
|
||||
y_delta = 10;
|
||||
} else if (direction == "up") {
|
||||
x_delta = 0;
|
||||
y_delta = -10;
|
||||
} else if (direction == "right") {
|
||||
x_delta = 10;
|
||||
y_delta = 0;
|
||||
} else if (direction == "left") {
|
||||
x_delta = -10;
|
||||
y_delta = 0;
|
||||
} else {
|
||||
throw("drag direction '" + direction + "' is not expected, direction should be 'down', 'up', 'left' or 'right'");
|
||||
}
|
||||
var pointerId = pointerType + "Pointer1";
|
||||
return new test_driver.Actions()
|
||||
.addPointer(pointerId, pointerType)
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerDown()
|
||||
.pointerMove(x_delta, y_delta, {origin: target})
|
||||
.pointerMove(2 * x_delta, 2 * y_delta, {origin: target})
|
||||
.pointerMove(3 * x_delta, 3 * y_delta, {origin: target})
|
||||
.pointerUp()
|
||||
.send();
|
||||
}
|
||||
|
||||
function pointerHoverInTarget(pointerType, target, direction) {
|
||||
var x_delta = 0;
|
||||
var y_delta = 0;
|
||||
if (direction == "down") {
|
||||
x_delta = 0;
|
||||
y_delta = 10;
|
||||
} else if (direction == "up") {
|
||||
x_delta = 0;
|
||||
y_delta = -10;
|
||||
} else if (direction == "right") {
|
||||
x_delta = 10;
|
||||
y_delta = 0;
|
||||
} else if (direction == "left") {
|
||||
x_delta = -10;
|
||||
y_delta = 0;
|
||||
} else {
|
||||
throw("drag direction '" + direction + "' is not expected, direction should be 'down', 'up', 'left' or 'right'");
|
||||
}
|
||||
var pointerId = pointerType + "Pointer1";
|
||||
return new test_driver.Actions()
|
||||
.addPointer(pointerId, pointerType)
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerMove(x_delta, y_delta, {origin: target})
|
||||
.pointerMove(2 * x_delta, 2 * y_delta, {origin: target})
|
||||
.pointerMove(3 * x_delta, 3 * y_delta, {origin: target})
|
||||
.send();
|
||||
var x_delta = 0;
|
||||
var y_delta = 0;
|
||||
if (direction == "down") {
|
||||
x_delta = 0;
|
||||
y_delta = 10;
|
||||
} else if (direction == "up") {
|
||||
x_delta = 0;
|
||||
y_delta = -10;
|
||||
} else if (direction == "right") {
|
||||
x_delta = 10;
|
||||
y_delta = 0;
|
||||
} else if (direction == "left") {
|
||||
x_delta = -10;
|
||||
y_delta = 0;
|
||||
} else {
|
||||
throw("drag direction '" + direction + "' is not expected, direction should be 'down', 'up', 'left' or 'right'");
|
||||
}
|
||||
var pointerId = pointerType + "Pointer1";
|
||||
return new test_driver.Actions()
|
||||
.addPointer(pointerId, pointerType)
|
||||
.pointerMove(0, 0, {origin: target})
|
||||
.pointerMove(x_delta, y_delta, {origin: target})
|
||||
.pointerMove(2 * x_delta, 2 * y_delta, {origin: target})
|
||||
.pointerMove(3 * x_delta, 3 * y_delta, {origin: target})
|
||||
.send();
|
||||
}
|
||||
|
||||
function moveToDocument(pointerType) {
|
||||
var pointerId = pointerType + "Pointer1";
|
||||
return new test_driver.Actions()
|
||||
.addPointer(pointerId, pointerType)
|
||||
.pointerMove(0, 0)
|
||||
.send();
|
||||
var pointerId = pointerType + "Pointer1";
|
||||
return new test_driver.Actions()
|
||||
.addPointer(pointerId, pointerType)
|
||||
.pointerMove(0, 0)
|
||||
.send();
|
||||
}
|
||||
|
||||
// Returns a promise that only gets resolved when the condition is met.
|
||||
|
@ -441,61 +442,61 @@ function resolveWhen(condition) {
|
|||
}
|
||||
|
||||
// Returns a promise that only gets resolved after n animation frames
|
||||
function waitForAnimationFrames(n){
|
||||
function waitForAnimationFrames(n) {
|
||||
let p = 0;
|
||||
function next(){
|
||||
function next() {
|
||||
p++;
|
||||
return p === n;
|
||||
}
|
||||
return resolveWhen(next);
|
||||
}
|
||||
|
||||
function isPointerEvent(eventName){
|
||||
function isPointerEvent(eventName) {
|
||||
return All_Pointer_Events.includes(eventName);
|
||||
}
|
||||
|
||||
function isMouseEvent(eventName){
|
||||
function isMouseEvent(eventName) {
|
||||
return ["mousedown", "mouseup", "mousemove", "mouseover",
|
||||
"mouseenter", "mouseout", "mouseleave",
|
||||
"click", "contextmenu", "dblclick"
|
||||
].includes(eventName);
|
||||
"mouseenter", "mouseout", "mouseleave",
|
||||
"click", "contextmenu", "dblclick"
|
||||
].includes(eventName);
|
||||
}
|
||||
|
||||
function arePointerAndMouseEventCompatible(pointerEventName, mouseEventName){
|
||||
// e.g. compatible pointer-mouse events: pointerup - mouseup etc
|
||||
return pointerEventName.startsWith("pointer") &&
|
||||
mouseEventName.startsWith("mouse") &&
|
||||
pointerEventName.substring(7) === mouseEventName.substring(5);
|
||||
}
|
||||
// Events is a list of events fired at a target.
|
||||
//
|
||||
// Checks to see if each pointer event has a corresponding mouse event in the
|
||||
// event array and the two events are in the proper order (pointer event is
|
||||
// first).
|
||||
//
|
||||
// See https://w3c.github.io/pointerevents/#mapping-for-devices-that-support-hover
|
||||
function arePointerEventsBeforeCompatMouseEvents(events) {
|
||||
function arePointerAndMouseEventCompatible(pointerEventName, mouseEventName) {
|
||||
return pointerEventName.startsWith("pointer")
|
||||
&& mouseEventName.startsWith("mouse")
|
||||
&& pointerEventName.substring(7) === mouseEventName.substring(5);
|
||||
}
|
||||
|
||||
// events is a list of events fired at a target
|
||||
// checks to see if each pointer event has a corresponding mouse event in the event array
|
||||
// and the two events are in the proper order (pointer event is first)
|
||||
// see https://www.w3.org/TR/pointerevents3/#mapping-for-devices-that-support-hover
|
||||
function arePointerEventsBeforeCompatMouseEvents(events){
|
||||
// checks to see if the pointer event is compatible with the mouse event
|
||||
// and the pointer event happens before the mouse event
|
||||
function arePointerAndMouseEventInProperOrder(pointerEventIndex, mouseEventIndex, events){
|
||||
function arePointerAndMouseEventInProperOrder(pointerEventIndex, mouseEventIndex, events) {
|
||||
return (pointerEventIndex < mouseEventIndex && isPointerEvent(events[pointerEventIndex]) && isMouseEvent(events[mouseEventIndex])
|
||||
&& arePointerAndMouseEventCompatible(events[pointerEventIndex], events[mouseEventIndex]));
|
||||
}
|
||||
|
||||
let currentPointerEventIndex = events.findIndex((event)=>isPointerEvent(event));
|
||||
let currentMouseEventIndex = events.findIndex((event)=>isMouseEvent(event));
|
||||
let currentPointerEventIndex = events.findIndex((event) => isPointerEvent(event));
|
||||
let currentMouseEventIndex = events.findIndex((event) => isMouseEvent(event));
|
||||
|
||||
while(1){
|
||||
if(currentMouseEventIndex < 0 && currentPointerEventIndex < 0)
|
||||
while (1) {
|
||||
if (currentMouseEventIndex < 0 && currentPointerEventIndex < 0)
|
||||
return true;
|
||||
if(currentMouseEventIndex < 0 || currentPointerEventIndex < 0)
|
||||
if (currentMouseEventIndex < 0 || currentPointerEventIndex < 0)
|
||||
return false;
|
||||
if(!arePointerAndMouseEventInProperOrder(currentPointerEventIndex, currentMouseEventIndex, events))
|
||||
if (!arePointerAndMouseEventInProperOrder(currentPointerEventIndex, currentMouseEventIndex, events))
|
||||
return false;
|
||||
|
||||
let pointerIdx = events.slice(currentPointerEventIndex+1).findIndex(isPointerEvent);
|
||||
let mouseIdx = events.slice(currentMouseEventIndex+1).findIndex(isMouseEvent);
|
||||
let pointerIdx = events.slice(currentPointerEventIndex + 1).findIndex(isPointerEvent);
|
||||
let mouseIdx = events.slice(currentMouseEventIndex + 1).findIndex(isMouseEvent);
|
||||
|
||||
currentPointerEventIndex = (pointerIdx < 0)?pointerIdx:(currentPointerEventIndex+1+pointerIdx);
|
||||
currentMouseEventIndex = (mouseIdx < 0)?mouseIdx:(currentMouseEventIndex+1+mouseIdx);
|
||||
currentPointerEventIndex = (pointerIdx < 0) ? pointerIdx : (currentPointerEventIndex + 1 + pointerIdx);
|
||||
currentMouseEventIndex = (mouseIdx < 0) ? mouseIdx : (currentMouseEventIndex + 1 + mouseIdx);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -505,7 +506,7 @@ function arePointerEventsBeforeCompatMouseEvents(events){
|
|||
// receives an event of type |event_type|.
|
||||
function getEvent(event_type, target) {
|
||||
return new Promise(resolve => {
|
||||
target.addEventListener(event_type, e => resolve(e), {once: true});
|
||||
target.addEventListener(event_type, e => resolve(e), { once: true });
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -528,8 +529,8 @@ function preventDefaultPointerdownOnce(target) {
|
|||
return new Promise(
|
||||
(resolve) => {
|
||||
target.addEventListener("pointerdown", (event) => {
|
||||
event.preventDefault();
|
||||
resolve();
|
||||
}, {once: true});
|
||||
event.preventDefault();
|
||||
resolve();
|
||||
}, { once: true });
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
promise_test(async (t) => {
|
||||
await promise_rejects_dom(
|
||||
t, 'SecurityError', navigator.serial.getPorts(),
|
||||
'getPorts() should throw a SecurityError DOMException when called ' +
|
||||
'from a context where the top-level document has an opaque origin.');
|
||||
}, 'Calls to Serial APIs from an origin with opaque top origin get blocked.');
|
||||
</script>
|
|
@ -1 +0,0 @@
|
|||
Content-Security-Policy: sandbox allow-scripts
|
|
@ -1,22 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
let iframe = document.createElement('iframe');
|
||||
|
||||
promise_test(async () => {
|
||||
await new Promise(resolve => {
|
||||
iframe.src = '../resources/open-in-iframe.html';
|
||||
iframe.sandbox.add('allow-scripts');
|
||||
iframe.allow = 'serial';
|
||||
document.body.appendChild(iframe);
|
||||
iframe.addEventListener('load', resolve);
|
||||
});
|
||||
|
||||
await new Promise(resolve => {
|
||||
iframe.contentWindow.postMessage({type: 'GetPorts'}, '*');
|
||||
|
||||
window.addEventListener('message', (messageEvent) => {
|
||||
assert_equals('Success', messageEvent.data);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}, 'GetPorts from a sandboxed iframe is valid.');
|
|
@ -1,14 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
promise_test(async (t) => {
|
||||
await promise_rejects_dom(
|
||||
t, 'SecurityError', navigator.serial.requestPort(),
|
||||
'requestPort() should throw a SecurityError DOMException when called ' +
|
||||
'from a context where the top-level document has an opaque origin.');
|
||||
}, 'Calls to Serial APIs from an origin with opaque top origin get blocked.');
|
||||
</script>
|
|
@ -1 +0,0 @@
|
|||
Content-Security-Policy: sandbox allow-scripts
|
|
@ -1,26 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
let iframe = document.createElement('iframe');
|
||||
|
||||
promise_test(async () => {
|
||||
await new Promise(resolve => {
|
||||
iframe.src = '../resources/open-in-iframe.html';
|
||||
iframe.sandbox.add('allow-scripts');
|
||||
iframe.allow = 'serial';
|
||||
document.body.appendChild(iframe);
|
||||
iframe.addEventListener('load', resolve);
|
||||
});
|
||||
|
||||
await new Promise(resolve => {
|
||||
iframe.contentWindow.postMessage({type: 'RequestPort'}, '*');
|
||||
|
||||
window.addEventListener('message', (messageEvent) => {
|
||||
// The failure message of no device chosen is expected. The point here is
|
||||
// to validate not failing because of a sandboxed iframe.
|
||||
assert_equals(
|
||||
'FAIL: NotFoundError: Failed to execute \'requestPort\' on \'Serial\': No port selected by the user.',
|
||||
messageEvent.data);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}, 'RequestPort from a sandboxed iframe is valid.');
|
|
@ -1,33 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
|
||||
<body>
|
||||
<button>Fake user gesture</button>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
test_driver.set_test_context(parent);
|
||||
|
||||
window.onmessage = messageEvent => {
|
||||
switch (messageEvent.data.type) {
|
||||
case 'GetPorts':
|
||||
navigator.serial.getPorts()
|
||||
.then(ports => parent.postMessage('Success', '*'))
|
||||
.catch(err => parent.postMessage(`FAIL: ${err}`, '*'));
|
||||
break;
|
||||
case 'RequestPort':
|
||||
test_driver.click(document.getElementsByTagName('button')[0])
|
||||
.then(() => navigator.serial.requestPort({filters: []}))
|
||||
.then(port => parent.postMessage('Success', '*'))
|
||||
.catch(err => parent.postMessage(`FAIL: ${err}`, '*'));
|
||||
break;
|
||||
default:
|
||||
parent.postMessage(
|
||||
`FAIL: Bad message type: ${messageEvent.data}`, '*');
|
||||
};
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue