mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Update web-platform-tests to revision f535a2e92b3c0b43996400b0f9bfae5b5579c4bd
This commit is contained in:
parent
d42fbfb315
commit
fbb3d28129
64 changed files with 1087 additions and 204 deletions
|
@ -4,7 +4,7 @@
|
|||
expected: TIMEOUT
|
||||
|
||||
[Opening a blob URL in a new window immediately before revoking it works.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Fetching a blob URL immediately before revoking it works in an iframe.]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[hit-test-floats-004.html]
|
||||
[hit-test-floats-003.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-005.html]
|
||||
[Miss clipped float]
|
||||
expected: FAIL
|
||||
|
|
@ -2,3 +2,6 @@
|
|||
[Hit test intersecting scaled box]
|
||||
expected: FAIL
|
||||
|
||||
[Hit test within unscaled box]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[CaretPosition-001.html]
|
||||
[Element at (400, 100)]
|
||||
expected: FAIL
|
||||
|
|
@ -2,3 +2,6 @@
|
|||
[elementsFromPoint on the root document for points in iframe elements]
|
||||
expected: FAIL
|
||||
|
||||
[elementsFromPoint on inner documents]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[matchMedia-display-none-iframe.html]
|
||||
expected: ERROR
|
|
@ -315,18 +315,18 @@
|
|||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,3 +56,6 @@
|
|||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,3 +11,6 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
|
||||
expected: FAIL
|
||||
|
||||
[Content-Type-Options%3A%20nosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_2.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_3.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -171,3 +171,6 @@
|
|||
[XHTML img usemap="#hash-id"]
|
||||
expected: FAIL
|
||||
|
||||
[HTML (standards) IMG usemap="no-hash-name"]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[form-double-submit-2.html]
|
||||
[preventDefault should allow onclick submit() to succeed]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[form-double-submit-3.html]
|
||||
[<button> should have the same double-submit protection as <input type=submit>]
|
||||
expected: FAIL
|
||||
|
|
@ -8,6 +8,3 @@
|
|||
[Check that rel=noopener with target=_parent does a normal load]
|
||||
expected: FAIL
|
||||
|
||||
[Check that rel=noopener with target=_self does a normal load]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[module-delayed.html]
|
||||
[async document.write in a module]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
[ignore-opens-during-unload.window.html]
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
[document.open should bail out when ignore-opens-during-unload is greater than 0 during visibilitychange event (open(parent) while unloading parent and child)]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
[promise-job-entry.html]
|
||||
expected: TIMEOUT
|
||||
[Fulfillment handler on fulfilled promise]
|
||||
expected: FAIL
|
||||
|
||||
[Rejection handler on pending-then-rejected promise]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Sanity check: this all works as expected with no promises involved]
|
||||
expected: FAIL
|
||||
|
@ -16,5 +15,5 @@
|
|||
expected: FAIL
|
||||
|
||||
[Fulfillment handler on pending-then-fulfilled promise]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[realtimeanalyser-fft-scaling.html]
|
||||
expected: TIMEOUT
|
||||
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -242,3 +242,6 @@
|
|||
[X SNR (-432.82623184916594 dB) is not greater than or equal to 65.737. Got -432.82623184916594.]
|
||||
expected: FAIL
|
||||
|
||||
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[28696\]\t2.7146387523941948e-32\t9.3139332532882690e-1\t9.3139332532882690e-1\t1.0000000000000000e+0\t3.8985999999999999e-3\n\t[28697\]\t7.0477002859115601e-1\t9.0675884485244751e-1\t2.0198881626129150e-1\t2.2275913536212616e-1\t3.8985999999999999e-3\n\tMax AbsError of 9.3139332532882690e-1 at index of 28696.\n\tMax RelError of 1.0000000000000000e+0 at index of 28696.\n]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[audiocontext-not-fully-active.html]
|
||||
expected: TIMEOUT
|
||||
[frame in navigated remote-site frame]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[Opening a blob URL in a new window immediately before revoking it works.]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Opening a blob URL in a noopener about:blank window immediately before revoking it works.]
|
||||
expected: TIMEOUT
|
||||
|
|
|
@ -22240,22 +22240,6 @@
|
|||
]
|
||||
]
|
||||
},
|
||||
"mouse": {
|
||||
"layout_change_should_fire_mouseover-manual.html": [
|
||||
"1e3662500f255c7d492505767aa4bfbd0382587a",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mouseevent_move_button-manual.html": [
|
||||
"d057ecd85e7b55a48fa9e22ad8c3db38b89c9bc9",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"order-of-events": {
|
||||
"focus-events": {
|
||||
"focus-contained-manual.html": [
|
||||
|
@ -22329,13 +22313,6 @@
|
|||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mouseover-out-manual.html": [
|
||||
"ca65c3ff8de38b8a939a03e498d14bbabe1f8de4",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -157834,6 +157811,19 @@
|
|||
]
|
||||
},
|
||||
"clip-path": {
|
||||
"clip-path-blending-offset.html": [
|
||||
"806904d68765b147830c6ee3b27a68df7a4c527d",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-masking/clip-path/clip-path-blending-offset-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"clip-path-circle-001.html": [
|
||||
"d38b909a4d43ce7dd26be39a11d607fa76331320",
|
||||
[
|
||||
|
@ -158588,6 +158578,19 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"clip-path-svg-text-backdrop-filter.html": [
|
||||
"c605a913243c0036a8559b906fc8cbb542dd7143",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/css-masking/clip-path/clip-path-svg-text-backdrop-filter-ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"clip-path-transform-mutated-001.html": [
|
||||
"01f11a34a33823651d46f4788ca12074f91560ed",
|
||||
[
|
||||
|
@ -312400,6 +312403,10 @@
|
|||
}
|
||||
},
|
||||
"clip-path": {
|
||||
"clip-path-blending-offset-ref.html": [
|
||||
"c2613ac0a69f48279a3f9b67013b9ff0322ee1f9",
|
||||
[]
|
||||
],
|
||||
"clip-path-filter-order-ref.html": [
|
||||
"5fdef1e3007ab77cd5b03814419890ec69b91970",
|
||||
[]
|
||||
|
@ -312416,6 +312423,10 @@
|
|||
"20c8085b948f7ce9f3268b1f3cfb653673e335e9",
|
||||
[]
|
||||
],
|
||||
"clip-path-svg-text-backdrop-filter-ref.html": [
|
||||
"194c4734828bfd9ff496cbbc31cf2abcf4a57a67",
|
||||
[]
|
||||
],
|
||||
"reference": {
|
||||
"clip-path-circle-2-ref.html": [
|
||||
"7794d32b3f0e2415dbfda8ff12475b0e4f0b4117",
|
||||
|
@ -407294,6 +407305,20 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"grid-columns-rows-get-set-multiple.html": [
|
||||
"99af0110be7d14ae6a61f612cebf02c4a86be76b",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"grid-content-sized-columns-resolution.html": [
|
||||
"411687abdb789a865ecb32f6844ef9bc4ad848a3",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"grid-shorthand-invalid.html": [
|
||||
"642a4abab3b8177982c4006e4a5c0477d035305a",
|
||||
[
|
||||
|
@ -533491,6 +533516,15 @@
|
|||
}
|
||||
},
|
||||
"mouse": {
|
||||
"layout_change_should_fire_mouseover.html": [
|
||||
"49257ae60d19dc69d523f735fc0e5ccbde1663bf",
|
||||
[
|
||||
null,
|
||||
{
|
||||
"testdriver": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"mouse_buttons_back_forward.html": [
|
||||
"2323bc10269a7238fbe655aa1341d9dde210e3a6",
|
||||
[
|
||||
|
@ -533499,6 +533533,16 @@
|
|||
"testdriver": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"mouseevent_move_button.html": [
|
||||
"edde11d022e81969957cf99578c394db8697f461",
|
||||
[
|
||||
null,
|
||||
{
|
||||
"testdriver": true,
|
||||
"timeout": "long"
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"order-of-events": {
|
||||
|
@ -533530,6 +533574,15 @@
|
|||
}
|
||||
]
|
||||
],
|
||||
"mouseover-out.html": [
|
||||
"f10518c7f15fb60e43eee66f15dd39c1fe843f17",
|
||||
[
|
||||
null,
|
||||
{
|
||||
"testdriver": true
|
||||
}
|
||||
]
|
||||
],
|
||||
"wheel-basic.html": [
|
||||
"1a43022d2928bd704b25a7b48443264268d7088c",
|
||||
[
|
||||
|
@ -545326,6 +545379,13 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"rtp-demuxing.html": [
|
||||
"1b8dce3b45dab0d369e49498e19b2fb036635717",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"sctp-format.html": [
|
||||
"207e51d4c3aaaaa8bc749fb06760cd7da26fd0d5",
|
||||
[
|
||||
|
@ -545354,13 +545414,6 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"unbundled-pt-demuxing.https.html": [
|
||||
"e9f07e4551c0f55d0bf299c0d9ec4cc0bc8c2c6e",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"unknown-mediatypes.html": [
|
||||
"f5176d1c87b6a2a14281c603f4a491efd86c826d",
|
||||
[
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[hit-test-floats-004.html]
|
||||
[hit-test-floats-003.html]
|
||||
[Miss float below something else]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-005.html]
|
||||
[Miss clipped float]
|
||||
expected: FAIL
|
||||
|
|
@ -2,3 +2,6 @@
|
|||
[Hit test intersecting scaled box]
|
||||
expected: FAIL
|
||||
|
||||
[Hit test within unscaled box]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[CaretPosition-001.html]
|
||||
[Element at (400, 100)]
|
||||
expected: FAIL
|
||||
|
|
@ -2,3 +2,6 @@
|
|||
[elementsFromPoint on the root document for points in iframe elements]
|
||||
expected: FAIL
|
||||
|
||||
[elementsFromPoint on inner documents]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[matchMedia-display-none-iframe.html]
|
||||
expected: ERROR
|
|
@ -315,18 +315,18 @@
|
|||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
[<iframe>: separate response Content-Type: text/plain */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*]
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,3 +56,6 @@
|
|||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,3 +11,6 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%2C%2C%40%23%24%23%25%25%26%5E%26%5E*()()11!]
|
||||
expected: FAIL
|
||||
|
||||
[Content-Type-Options%3A%20nosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_2.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[traverse_the_history_3.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -172,3 +172,6 @@
|
|||
[XHTML img usemap="http://example.org/#garbage-before-hash-id"]
|
||||
expected: FAIL
|
||||
|
||||
[HTML (standards) IMG usemap="no-hash-name"]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[iframe_sandbox_popups_escaping-3.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
type: testharness
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[form-double-submit-2.html]
|
||||
[preventDefault should allow onclick submit() to succeed]
|
||||
expected: FAIL
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
[form-double-submit-3.html]
|
||||
[<button> should have the same double-submit protection as <input type=submit>]
|
||||
expected: FAIL
|
||||
|
|
@ -12,6 +12,3 @@
|
|||
[Check that rel=noopener with target=_parent does a normal load]
|
||||
expected: FAIL
|
||||
|
||||
[Check that rel=noopener with target=_self does a normal load]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[module-delayed.html]
|
||||
[async document.write in a module]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
[ignore-opens-during-unload.window.html]
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
[ignore-opens-during-unload]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
[promise-job-entry.html]
|
||||
expected: TIMEOUT
|
||||
[Fulfillment handler on fulfilled promise]
|
||||
expected: FAIL
|
||||
|
||||
[Rejection handler on pending-then-rejected promise]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
[Sanity check: this all works as expected with no promises involved]
|
||||
expected: FAIL
|
||||
|
@ -16,5 +15,5 @@
|
|||
expected: FAIL
|
||||
|
||||
[Fulfillment handler on pending-then-fulfilled promise]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
[realtimeanalyser-fft-scaling.html]
|
||||
expected: TIMEOUT
|
||||
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -470,3 +470,6 @@
|
|||
[X SNR (-432.82623184916594 dB) is not greater than or equal to 65.737. Got -432.82623184916594.]
|
||||
expected: FAIL
|
||||
|
||||
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[28696\]\t2.7146387523941948e-32\t9.3139332532882690e-1\t9.3139332532882690e-1\t1.0000000000000000e+0\t3.8985999999999999e-3\n\t[28697\]\t7.0477002859115601e-1\t9.0675884485244751e-1\t2.0198881626129150e-1\t2.2275913536212616e-1\t3.8985999999999999e-3\n\tMax AbsError of 9.3139332532882690e-1 at index of 28696.\n\tMax RelError of 1.0000000000000000e+0 at index of 28696.\n]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
[audiocontext-not-fully-active.html]
|
||||
expected: TIMEOUT
|
||||
[frame in navigated remote-site frame]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,322 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<link rel="author" title="Julien Chaffraix" href="mailto:jchaffraix@webkit.org">
|
||||
<link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=73272">
|
||||
<link href="/css/support/width-keyword-classes.css" rel="stylesheet">
|
||||
<link href="/css/support/grid.css" rel="stylesheet">
|
||||
<link href="/css/support/alignment.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid/#track-sizing">
|
||||
<meta name="assert" content="Test that setting and getting multiple grid-template-columns and grid-template-rows works as expected">
|
||||
<style>
|
||||
/* Give an explicit size to the grid so that percentage grid tracks have a consistent resolution. */
|
||||
.definite {
|
||||
width: 800px;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.gridItem {
|
||||
grid-column: 1;
|
||||
grid-row: 1;
|
||||
width: 7px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.gridItem2 {
|
||||
grid-column: 2;
|
||||
grid-row: 2;
|
||||
width: 17px;
|
||||
height: 3px;
|
||||
}
|
||||
|
||||
.gridWithFixed {
|
||||
grid-template-columns: 7px 11px;
|
||||
grid-template-rows: 17px 2px;
|
||||
}
|
||||
|
||||
.gridWithPercent {
|
||||
grid-template-columns: 50% 100%;
|
||||
grid-template-rows: 25% 75%;
|
||||
}
|
||||
.gridWithAuto {
|
||||
grid-template-columns: auto auto;
|
||||
grid-template-rows: auto auto;
|
||||
}
|
||||
.gridWithEM {
|
||||
grid-template-columns: 10em 12em;
|
||||
grid-template-rows: 15em 17em;
|
||||
font: 10px Ahem;
|
||||
}
|
||||
.gridWithNoneAndAuto {
|
||||
grid-template-columns: none auto;
|
||||
grid-template-rows: none auto;
|
||||
}
|
||||
.gridNoneWithAndFixed {
|
||||
grid-template-columns: none 15px;
|
||||
grid-template-rows: none 22px;
|
||||
}
|
||||
.gridWithThreeItems {
|
||||
grid-template-columns: 15px auto 10em;
|
||||
grid-template-rows: 12em 18px auto;
|
||||
font: 10px Ahem;
|
||||
}
|
||||
.gridWithFitContentAndFitAvailable {
|
||||
grid-template-columns: -webkit-content-available;
|
||||
grid-template-rows: -webkit-fit-content -webkit-fit-available;
|
||||
}
|
||||
.gridWithMinMaxContent {
|
||||
grid-template-columns: min-content max-content;
|
||||
grid-template-rows: max-content min-content;
|
||||
}
|
||||
.gridWithMinMaxAndFixed {
|
||||
grid-template-columns: minmax(45px, 30%) 15px;
|
||||
grid-template-rows: 12em minmax(35%, 10px);
|
||||
font: 10px Ahem;
|
||||
}
|
||||
.gridWithMinMaxAndMinMaxContent {
|
||||
grid-template-columns: minmax(min-content, 30%) 15px;
|
||||
grid-template-rows: 12em minmax(35%, max-content);
|
||||
font: 10px Ahem;
|
||||
}
|
||||
.gridWithFractionFraction {
|
||||
grid-template-columns: 2fr 3fr;
|
||||
grid-template-rows: 3fr 5fr;
|
||||
}
|
||||
.gridWithFractionMinMax {
|
||||
grid-template-columns: minmax(min-content, 45px) 2fr;
|
||||
grid-template-rows: 3fr minmax(14px, max-content);
|
||||
}
|
||||
.gridWithCalcCalc {
|
||||
grid-template-columns: calc(200px) calc(10em);
|
||||
grid-template-rows: calc(15em) calc(75px);
|
||||
font: 10px Ahem;
|
||||
}
|
||||
.gridWithCalcAndFixed {
|
||||
grid-template-columns: calc(50%) 8em;
|
||||
grid-template-rows: 88px calc(25%);
|
||||
font: 10px Ahem;
|
||||
}
|
||||
.gridWithCalcAndMinMax {
|
||||
grid-template-columns: calc(30px + 20%) minmax(min-content, 80px);
|
||||
grid-template-rows: minmax(25%, max-content) calc(10% - 7px);
|
||||
}
|
||||
.gridWithCalcInsideMinMax {
|
||||
grid-template-columns: minmax(calc(23px + 10%), 400px) 12em;
|
||||
grid-template-rows: calc(150px) minmax(5%, calc(50% - 125px));
|
||||
font: 10px Ahem;
|
||||
}
|
||||
.gridWithAutoInsideMinMax {
|
||||
grid-template-columns: minmax(auto, min-content) 30px;
|
||||
grid-template-rows: calc(100px + 2em) minmax(10%, auto);
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div class="grid definite gridWithFixed" id="gridWithFixedElement"></div>
|
||||
<div class="grid definite gridWithPercent" id="gridWithPercentElement"></div>
|
||||
<div class="grid min-content gridWithPercent" id="gridWithPercentWithoutSize">
|
||||
<div class="gridItem"></div>
|
||||
</div>
|
||||
<div class="grid definite gridWithAuto contentStart" id="gridWithAutoElement">
|
||||
<div class="gridItem2"></div>
|
||||
</div>
|
||||
<div class="grid definite gridWithEM" id="gridWithEMElement"></div>
|
||||
<div class="grid definite gridWithNoneAndAuto" id="gridWithNoneAndAuto"></div>
|
||||
<div class="grid definite gridWithNoneAndFixed" id="gridWithNoneAndFixed"></div>
|
||||
<div class="grid definite gridWithThreeItems contentStart" id="gridWithThreeItems"></div>
|
||||
<div class="grid definite gridWithFitContentAndFitAvailable" id="gridWithFitContentAndFitAvailable"></div>
|
||||
<div class="grid definite gridWithMinMaxContent" id="gridWithMinMaxContent"></div>
|
||||
<div class="grid definite gridWithMinMaxContent" id="gridWithMinMaxContentWithChildrenElement">
|
||||
<div class="gridItem"></div>
|
||||
<div class="gridItem2"></div>
|
||||
</div>
|
||||
<div class="grid definite gridWithMinMaxAndFixed" id="gridWithMinMaxAndFixed"></div>
|
||||
<div class="grid definite gridWithMinMaxAndMinMaxContent" id="gridWithMinMaxAndMinMaxContent"></div>
|
||||
<div class="grid definite gridWithFractionFraction" id="gridWithFractionFraction"></div>
|
||||
<div class="grid definite gridWithFractionMinMax" id="gridWithFractionMinMax"></div>
|
||||
<div class="grid definite gridWithCalcCalc" id="gridWithCalcCalc"></div>
|
||||
<div class="grid definite gridWithCalcAndFixed" id="gridWithCalcAndFixed"></div>
|
||||
<div class="grid definite gridWithCalcAndMinMax" id="gridWithCalcAndMinMax"></div>
|
||||
<div class="grid definite gridWithCalcInsideMinMax" id="gridWithCalcInsideMinMax"></div>
|
||||
<div class="grid definite gridWithAutoInsideMinMax contentStart" id="gridWithAutoInsideMinMax"></div>
|
||||
|
||||
<script>
|
||||
function testGridDefinitionsValues(id, columnValue, rowValue)
|
||||
{
|
||||
test(function(){
|
||||
var element = document.getElementById(id);
|
||||
var readColumnValue = getComputedStyle(element).gridTemplateColumns;
|
||||
var readRowValue = getComputedStyle(element).gridTemplateRows;
|
||||
assert_equals(readColumnValue, columnValue);
|
||||
assert_equals(readRowValue, rowValue);
|
||||
}, `Test getting grid-template-columns and grid-template-rows set through CSS for element '${id}' : grid-template-columns = '${columnValue}', grid-template-rows = '${rowValue}'`);
|
||||
}
|
||||
|
||||
function testGridDefinitionsSetJSValues(
|
||||
columnValue,
|
||||
rowValue,
|
||||
computedColumnValue = columnValue,
|
||||
computedRowValue = rowValue,
|
||||
jsColumnValue = columnValue,
|
||||
jsRowValue = rowValue)
|
||||
{
|
||||
test(function(){
|
||||
window.element = document.createElement("div");
|
||||
document.body.appendChild(element);
|
||||
element.style.display = "grid";
|
||||
element.style.width = "800px";
|
||||
element.style.height = "600px";
|
||||
element.style.justifyContent = "start";
|
||||
element.style.alignContent = "start";
|
||||
element.style.font = "10px Ahem"; // Used to resolve em font consistently.
|
||||
element.style.gridTemplateColumns = columnValue;
|
||||
element.style.gridTemplateRows = rowValue;
|
||||
assert_equals(getComputedStyle(element).gridTemplateColumns, computedColumnValue);
|
||||
assert_equals(element.style.gridTemplateColumns, jsColumnValue);
|
||||
assert_equals(getComputedStyle(element).gridTemplateRows, computedRowValue);
|
||||
assert_equals(element.style.gridTemplateRows, jsRowValue);
|
||||
document.body.removeChild(element);
|
||||
}, `Test getting and setting grid-template-rows and grid-template-columns through JS: grid-template-columns = '${computedColumnValue}', element.style.gridTemplateColumns = '${columnValue}', grid-template-rows = '${computedRowValue}', element.style.gridTemplateRows = '${rowValue}'`);
|
||||
}
|
||||
|
||||
function testGridDefinitionsSetBadJSValues(columnValue, rowValue)
|
||||
{
|
||||
test(function(){
|
||||
window.element = document.createElement("div");
|
||||
document.body.appendChild(element);
|
||||
element.style.gridTemplateColumns = columnValue;
|
||||
element.style.gridTemplateRows = rowValue;
|
||||
assert_equals(getComputedStyle(element).gridTemplateColumns, "none");
|
||||
assert_equals(getComputedStyle(element).gridTemplateRows, "none");
|
||||
document.body.removeChild(element);
|
||||
}, `Test setting bad JS values: grid-template-columns = '${columnValue}', grid-template-rows = '${rowValue}'`);
|
||||
}
|
||||
|
||||
function testDefaultValue()
|
||||
{
|
||||
test(function(){
|
||||
var element = document.createElement("div");
|
||||
document.body.appendChild(element);
|
||||
assert_equals(getComputedStyle(element).gridTemplateColumns, "none");
|
||||
assert_equals(getComputedStyle(element).gridTemplateRows, "none");
|
||||
document.body.removeChild(element);
|
||||
}, `Test the default value`);
|
||||
}
|
||||
|
||||
function testWrongCSSValue()
|
||||
{
|
||||
test(function(){
|
||||
var gridWithNoneAndAuto = document.getElementById("gridWithNoneAndAuto");
|
||||
assert_equals(getComputedStyle(gridWithNoneAndAuto).gridTemplateColumns, "none");
|
||||
assert_equals(getComputedStyle(gridWithNoneAndAuto).gridTemplateRows, "none");
|
||||
|
||||
var gridWithNoneAndFixed = document.getElementById("gridWithNoneAndFixed");
|
||||
assert_equals(getComputedStyle(gridWithNoneAndFixed).gridTemplateColumns, "none");
|
||||
assert_equals(getComputedStyle(gridWithNoneAndFixed).gridTemplateRows, "none");
|
||||
}, `Test setting wrong/invalid values through CSS`);
|
||||
}
|
||||
|
||||
function testInherit()
|
||||
{
|
||||
test(function(){
|
||||
var parentElement = document.createElement("div");
|
||||
document.body.appendChild(parentElement);
|
||||
parentElement.style.display = "grid";
|
||||
parentElement.style.width = "800px";
|
||||
parentElement.style.height = "600px";
|
||||
parentElement.style.font = "10px Ahem"; // Used to resolve em font consistently.
|
||||
parentElement.style.gridTemplateColumns = "50px 1fr [last]";
|
||||
parentElement.style.gridTemplateRows = "2em [middle] 45px";
|
||||
assert_equals(getComputedStyle(parentElement).gridTemplateColumns, "50px 750px [last]");
|
||||
assert_equals(getComputedStyle(parentElement).gridTemplateRows, "20px [middle] 45px");
|
||||
|
||||
element = document.createElement("div");
|
||||
parentElement.appendChild(element);
|
||||
element.style.display = "grid";
|
||||
element.style.gridTemplateColumns = "inherit";
|
||||
element.style.gridTemplateRows = "inherit";
|
||||
assert_equals(getComputedStyle(element).gridTemplateColumns, "50px 0px [last]");
|
||||
assert_equals(getComputedStyle(element).gridTemplateRows, "20px [middle] 45px");
|
||||
|
||||
document.body.removeChild(parentElement);
|
||||
}, `Test setting grid-template-columns and grid-template-rows to 'inherit' through JS`);
|
||||
}
|
||||
|
||||
function testInitial()
|
||||
{
|
||||
test(function(){
|
||||
element = document.createElement("div");
|
||||
document.body.appendChild(element);
|
||||
element.style.display = "grid";
|
||||
element.style.width = "800px";
|
||||
element.style.height = "600px";
|
||||
element.style.gridTemplateColumns = "150% [middle] 55px";
|
||||
element.style.gridTemplateRows = "1fr [line] 2fr [line]";
|
||||
assert_equals(getComputedStyle(element).gridTemplateColumns, "1200px [middle] 55px");
|
||||
assert_equals(getComputedStyle(element).gridTemplateRows, "200px [line] 400px [line]");
|
||||
|
||||
element.style.gridTemplateColumns = "initial";
|
||||
element.style.gridTemplateRows = "initial";
|
||||
assert_equals(getComputedStyle(element).gridTemplateColumns, "none");
|
||||
assert_equals(getComputedStyle(element).gridTemplateRows, "none");
|
||||
|
||||
document.body.removeChild(element);
|
||||
}, `Test setting grid-template-columns and grid-template-rows to 'initial' through JS`);
|
||||
}
|
||||
|
||||
setup({ explicit_done: true });
|
||||
document.fonts.ready.then(() => {
|
||||
testGridDefinitionsValues("gridWithFixedElement", "7px 11px", "17px 2px");
|
||||
testGridDefinitionsValues("gridWithPercentElement", "400px 800px", "150px 450px");
|
||||
// This test failing in Firefox is caused by https://bugzilla.mozilla.org/show_bug.cgi?id=1481876
|
||||
testGridDefinitionsValues("gridWithPercentWithoutSize", "3.5px 7px", "4px 12px");
|
||||
testGridDefinitionsValues("gridWithAutoElement", "0px 17px", "0px 3px");
|
||||
testGridDefinitionsValues("gridWithEMElement", "100px 120px", "150px 170px");
|
||||
testGridDefinitionsValues("gridWithThreeItems", "15px 0px 100px", "120px 18px 0px");
|
||||
testGridDefinitionsValues("gridWithFitContentAndFitAvailable", "none", "none");
|
||||
testGridDefinitionsValues("gridWithMinMaxContent", "0px 0px", "0px 0px");
|
||||
testGridDefinitionsValues("gridWithMinMaxContentWithChildrenElement", "7px 17px", "16px 3px");
|
||||
testGridDefinitionsValues("gridWithMinMaxAndFixed", "240px 15px", "120px 210px");
|
||||
testGridDefinitionsValues("gridWithMinMaxAndMinMaxContent", "240px 15px", "120px 210px");
|
||||
testGridDefinitionsValues("gridWithFractionFraction", "320px 480px", "225px 375px");
|
||||
testGridDefinitionsValues("gridWithFractionMinMax", "45px 755px", "586px 14px");
|
||||
testGridDefinitionsValues("gridWithCalcCalc", "200px 100px", "150px 75px");
|
||||
testGridDefinitionsValues("gridWithCalcAndFixed", "400px 80px", "88px 150px");
|
||||
testGridDefinitionsValues("gridWithCalcAndMinMax", "190px 80px", "150px 53px");
|
||||
testGridDefinitionsValues("gridWithCalcInsideMinMax", "400px 120px", "150px 175px");
|
||||
testGridDefinitionsValues("gridWithAutoInsideMinMax", "0px 30px", "132px 60px");
|
||||
|
||||
testGridDefinitionsSetJSValues("18px 22px", "66px 70px");
|
||||
testGridDefinitionsSetJSValues("55% 80%", "40% 63%", "440px 640px", "240px 378px");
|
||||
testGridDefinitionsSetJSValues("auto auto", "auto auto", "0px 0px", "0px 0px");
|
||||
testGridDefinitionsSetJSValues("auto 16em 22px", "56% 10em auto", "0px 160px 22px", "336px 100px 0px");
|
||||
testGridDefinitionsSetJSValues("16em minmax(16px, 20px)", "minmax(10%, 15%) auto", "160px 20px", "90px 0px");
|
||||
testGridDefinitionsSetJSValues("16em 2fr", "14fr auto", "160px 640px", "600px 0px");
|
||||
testGridDefinitionsSetJSValues("calc(25px) calc(2em)", "auto calc(10%)", "25px 20px", "0px 60px", "calc(25px) calc(2em)", "auto calc(10%)");
|
||||
// This test failing in Chromium is caused by https://bugs.chromium.org/p/chromium/issues/detail?id=1050968
|
||||
testGridDefinitionsSetJSValues("calc(25px + 40%) minmax(min-content, calc(10% + 12px))", "minmax(calc(75% - 350px), max-content) auto", "345px 92px", "100px 0px", "calc(40% + 25px) minmax(min-content, calc(10% + 12px))", "minmax(calc(75% - 350px), max-content) auto");
|
||||
|
||||
testWrongCSSValue();
|
||||
|
||||
testGridDefinitionsSetBadJSValues("none auto", "none auto");
|
||||
testGridDefinitionsSetBadJSValues("none 16em", "none 56%");
|
||||
testGridDefinitionsSetBadJSValues("none none", "none none");
|
||||
testGridDefinitionsSetBadJSValues("auto none", "auto none");
|
||||
testGridDefinitionsSetBadJSValues("auto none 16em", "auto 18em none");
|
||||
testGridDefinitionsSetBadJSValues("-webkit-fit-content -webkit-fit-content", "-webkit-fit-available -webkit-fit-available");
|
||||
// Negative values are not allowed.
|
||||
testGridDefinitionsSetBadJSValues("-10px minmax(16px, 32px)", "minmax(10%, 15%) -10vw");
|
||||
testGridDefinitionsSetBadJSValues("10px minmax(16px, -1vw)", "minmax(-1%, 15%) 10vw");
|
||||
// Invalid expressions with calc
|
||||
testGridDefinitionsSetBadJSValues("10px calc(16px 30px)", "calc(25px + auto) 2em");
|
||||
testGridDefinitionsSetBadJSValues("minmax(min-content, calc() 250px", "calc(2em(");
|
||||
|
||||
testInherit();
|
||||
|
||||
testDefaultValue()
|
||||
|
||||
testInitial();
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,386 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<link rel="author" title="Sergio Villar" href="mailto:svillar@igalia.com">
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=392200">
|
||||
<link href="/css/support/grid.css" rel="stylesheet">
|
||||
<link href="/css/support/alignment.css" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-grid/#track-sizing">
|
||||
<meta name="assert" content="Checks resolution of content sized grid columns and verifies that items are processed by ascending span to compute column breadths">
|
||||
<style>
|
||||
.grid {
|
||||
font: 10px/1 Ahem;
|
||||
}
|
||||
.gridWidth300 {
|
||||
width: 300px;
|
||||
}
|
||||
.gridMinContentFixedAndAuto {
|
||||
grid-template-columns: minmax(min-content, 15px) auto;
|
||||
}
|
||||
.gridMaxContentFixedAndAuto {
|
||||
grid-template-columns: minmax(max-content, 15px) auto;
|
||||
}
|
||||
.gridAutoAndAuto {
|
||||
grid-template-columns: auto auto;
|
||||
}
|
||||
.gridMinContentAndMinContentFixed {
|
||||
grid-template-columns: min-content minmax(min-content, 30px);
|
||||
}
|
||||
.gridMinContentAndMaxContentFixed {
|
||||
grid-template-columns: min-content minmax(max-content, 30px);
|
||||
}
|
||||
.gridMaxContentAndMinContent {
|
||||
grid-template-columns: max-content min-content;
|
||||
}
|
||||
.gridFixedMinContentAndMaxContent {
|
||||
grid-template-columns: minmax(10px, min-content) max-content;
|
||||
}
|
||||
.gridFixedMaxContentAndMinContent {
|
||||
grid-template-columns: minmax(10px, max-content) min-content;
|
||||
}
|
||||
.gridAutoMinContent {
|
||||
grid-template-columns: auto min-content;
|
||||
}
|
||||
.gridAutoMaxContent {
|
||||
grid-template-columns: auto max-content;
|
||||
}
|
||||
.gridMaxContentAndMinContentFixed {
|
||||
grid-template-columns: max-content minmax(min-content, 35px);
|
||||
}
|
||||
.gridMaxContentAndMaxContentFixed {
|
||||
grid-template-columns: max-content minmax(max-content, 35px);
|
||||
}
|
||||
.gridMinContentFixedAndFixedFixedAndAuto {
|
||||
grid-template-columns: minmax(min-content, 20px) minmax(20px, 30px) auto;
|
||||
}
|
||||
.gridAutoAndFixedFixedAndMaxContentFixed {
|
||||
grid-template-columns: auto minmax(20px, 30px) minmax(max-content, 20px);
|
||||
}
|
||||
.gridMaxContentAndMaxContentFixedAndMaxContent {
|
||||
grid-template-columns: max-content minmax(max-content, 20px) max-content;
|
||||
}
|
||||
.gridAutoAndMinContentFixedAndMinContent {
|
||||
grid-template-columns: auto minmax(min-content, 30px) min-content;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div class="grid gridMinContentFixedAndAuto justifyContentStart" id="gridMinContentFixedAndAuto">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridAutoAndAuto justifyContentStart" id="gridAutoAndAuto">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMinContentAndMinContentFixed" id="gridMinContentAndMinContentFixed">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMaxContentAndMinContent" id="gridMaxContentAndMinContent">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridFixedMinContentAndMaxContent" id="gridFixedMinContentAndMaxContent">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridFixedMaxContentAndMinContent" id="gridFixedMaxContentAndMinContent">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMinContentAndMaxContentFixed" id="gridMinContentAndMaxContentFixed">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMaxContentFixedAndAuto" id="gridMaxContentFixedAndAuto">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridAutoMinContent justifyContentStart" id="gridAutoMinContent">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridAutoMaxContent justifyContentStart" id="gridAutoMaxContent">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMaxContentAndMinContentFixed" id="gridMaxContentAndMinContentFixed">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMaxContentAndMaxContentFixed" id="gridMaxContentAndMaxContentFixed">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<!-- Check that items are processed by ascending span instead of going track by track forbidding extra space distribution. -->
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMinContentFixedAndAuto" id="gridMinContentFixedAndAutoUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowSecondColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridAutoAndAuto" id="gridAutoAndAutoUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowSecondColumn">XXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMinContentAndMinContentFixed" id="gridMinContentAndMinContentFixedUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">XX XX XX</div>
|
||||
<div class="firstRowSecondColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMaxContentAndMinContent" id="gridMaxContentAndMinContentUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XXX XXX</div>
|
||||
<div class="firstRowSecondColumn">XXXXXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridFixedMinContentAndMaxContent" id="gridFixedMinContentAndMaxContentUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XXXXX XX</div>
|
||||
<div class="firstRowSecondColumn">XXX</div>
|
||||
<div class="firstRowSecondColumn">XXXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridFixedMaxContentAndMinContent" id="gridFixedMaxContentAndMinContentUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">X X</div>
|
||||
<div class="firstRowSecondColumn">XXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMinContentAndMaxContentFixed" id="gridMinContentAndMaxContentFixedUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowSecondColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMaxContentFixedAndAuto" id="gridMaxContentFixedAndAutoUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XX XX</div>
|
||||
<div class="firstRowSecondColumn">XXXX</div>
|
||||
<div class="firstRowSecondColumn">XXX XXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridAutoMinContent" id="gridAutoMinContentUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XX XX XX XX</div>
|
||||
<div class="firstRowSecondColumn">XXXXXX XXXXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridAutoMaxContent" id="gridAutoMaxContentUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">XXX XXX</div>
|
||||
<div class="firstRowSecondColumn">XXXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMaxContentAndMinContentFixed" id="gridMaxContentAndMinContentFixedUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XXX XXX</div>
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowSecondColumn">XXXX XXXX</div>
|
||||
<div class="firstRowSecondColumn">XX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMaxContentAndMaxContentFixed" id="gridMaxContentAndMaxContentFixedUnsortedConstrained">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">XX XX XX XX</div>
|
||||
<div class="firstRowSecondColumn">XXXXXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Check that items are processed by ascending span instead of going track by track allowing extra space distribution. -->
|
||||
<div class="grid gridMinContentFixedAndAuto justifyContentStart" id="gridMinContentFixedAndAutoUnsorted">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowSecondColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridAutoAndAuto justifyContentStart" id="gridAutoAndAutoUnsorted">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowSecondColumn">XXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMinContentAndMinContentFixed" id="gridMinContentAndMinContentFixedUnsorted">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">XX XX XX XX</div>
|
||||
<div class="firstRowSecondColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMaxContentAndMinContent" id="gridMaxContentAndMinContentUnsorted">
|
||||
<div class="firstRowBothColumn">XXX XXX</div>
|
||||
<div class="firstRowSecondColumn">XXXXXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridFixedMinContentAndMaxContent" id="gridFixedMinContentAndMaxContentUnsorted">
|
||||
<div class="firstRowBothColumn">XXXXX XX</div>
|
||||
<div class="firstRowSecondColumn">XXX</div>
|
||||
<div class="firstRowSecondColumn">XXXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridFixedMaxContentAndMinContent" id="gridFixedMaxContentAndMinContentUnsorted">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">X X</div>
|
||||
<div class="firstRowSecondColumn">XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMinContentAndMaxContentFixed" id="gridMinContentAndMaxContentFixedUnsorted">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowSecondColumn">XXXX XXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMaxContentFixedAndAuto justifyContentStart" id="gridMaxContentFixedAndAutoUnsorted">
|
||||
<div class="firstRowBothColumn">XX XX</div>
|
||||
<div class="firstRowSecondColumn">XXXX</div>
|
||||
<div class="firstRowSecondColumn">XXX XXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridAutoMinContent justifyContentStart" id="gridAutoMinContentUnsorted">
|
||||
<div class="firstRowBothColumn">XX XX XX XX</div>
|
||||
<div class="firstRowSecondColumn">XXXXXX XXXXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridAutoMaxContent justifyContentStart" id="gridAutoMaxContentUnsorted">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">XXX XXX</div>
|
||||
<div class="firstRowSecondColumn">XXXXX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMaxContentAndMinContentFixed" id="gridMaxContentAndMinContentFixedUnsorted">
|
||||
<div class="firstRowBothColumn">XXX XXX</div>
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowSecondColumn">XXXX XXXX</div>
|
||||
<div class="firstRowSecondColumn">XX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMaxContentAndMaxContentFixed" id="gridMaxContentAndMaxContentFixedUnsorted">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">XX XX XX XX</div>
|
||||
<div class="firstRowSecondColumn">XXXXXXX</div>
|
||||
</div>
|
||||
|
||||
<!-- The next four force the grid to grow only a particular subset of tracks above the limits -->
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMinContentFixedAndAuto justifyContentStart" id="gridMinContentFixedAndAutoAboveLimits">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">XXXXXXXXXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMaxContentFixedAndAuto" id="gridMaxContentFixedAndAutoAboveLimits">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">XXXXXXXXXXXXXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridMinContentFixedAndFixedFixedAndAuto" id="gridMinContentFixedAndFixedFixedAndAuto">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">XXXXXXXXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="constrainedContainer">
|
||||
<div class="grid gridAutoAndFixedFixedAndMaxContentFixed" id="gridAutoAndFixedFixedAndMaxContentFixed">
|
||||
<div class="firstRowBothColumn">XXXX XXXX</div>
|
||||
<div class="firstRowBothColumn">XXXXXXXXXXXXXXX</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridMaxContentAndMaxContentFixedAndMaxContent" id="gridMaxContentAndMaxContentFixedAndMaxContent">
|
||||
<div style="grid-row: 1; grid-column: 1;">X X X</div>
|
||||
<div style="grid-row: 1; grid-column: 3;">X X</div>
|
||||
<div style="grid-row: 1; grid-column: 1 / -1;">XX XX XX XX XX</div>
|
||||
</div>
|
||||
|
||||
<div class="grid gridAutoAndMinContentFixedAndMinContent justifyContentStart" id="gridAutoAndMinContentFixedAndMinContent">
|
||||
<div style="grid-row: 1; grid-column: 1;">XX</div>
|
||||
<div style="grid-row: 1; grid-column: 1 / -1;">XXXXXXXXXXXXXXX</div>
|
||||
<div style="grid-row: 1; grid-column: 3;">XXX XXX</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function testGridColumnsValues(id, computedColumnValue) {
|
||||
test(function(){
|
||||
var div = document.getElementById(id);
|
||||
var readValue = getComputedStyle(div).gridTemplateColumns;
|
||||
assert_equals(readValue, computedColumnValue);
|
||||
}, `Element '${id}' grid-template-columns value computes to '${computedColumnValue}'`);
|
||||
}
|
||||
|
||||
setup({ explicit_done: true });
|
||||
document.fonts.ready.then(() => {
|
||||
testGridColumnsValues("gridMinContentFixedAndAuto", "15px 75px");
|
||||
testGridColumnsValues("gridAutoAndAuto", "45px 45px");
|
||||
testGridColumnsValues("gridMinContentAndMinContentFixed", "20px 30px");
|
||||
testGridColumnsValues("gridMaxContentAndMinContent", "70px 20px");
|
||||
testGridColumnsValues("gridFixedMinContentAndMaxContent", "10px 80px");
|
||||
testGridColumnsValues("gridFixedMaxContentAndMinContent", "60px 30px");
|
||||
testGridColumnsValues("gridMinContentAndMaxContentFixed", "20px 70px");
|
||||
testGridColumnsValues("gridMaxContentFixedAndAuto", "65px 25px");
|
||||
testGridColumnsValues("gridAutoMinContent", "70px 20px");
|
||||
testGridColumnsValues("gridAutoMaxContent", "20px 70px");
|
||||
testGridColumnsValues("gridMaxContentAndMinContentFixed", "70px 20px");
|
||||
testGridColumnsValues("gridMaxContentAndMaxContentFixed", "55px 35px");
|
||||
|
||||
// Check that items are processed by ascending span to compute track breadths forbidding extra space distribution.
|
||||
testGridColumnsValues("gridMinContentFixedAndAutoUnsortedConstrained", "0px 40px");
|
||||
testGridColumnsValues("gridAutoAndAutoUnsortedConstrained", "10px 30px");
|
||||
testGridColumnsValues("gridMinContentAndMinContentFixedUnsortedConstrained", "0px 40px");
|
||||
testGridColumnsValues("gridMaxContentAndMinContentUnsortedConstrained", "0px 70px");
|
||||
testGridColumnsValues("gridFixedMinContentAndMaxContentUnsortedConstrained", "10px 70px");
|
||||
testGridColumnsValues("gridFixedMaxContentAndMinContentUnsortedConstrained", "10px 40px");
|
||||
testGridColumnsValues("gridMinContentAndMaxContentFixedUnsortedConstrained", "0px 90px");
|
||||
testGridColumnsValues("gridMaxContentFixedAndAutoUnsortedConstrained", "10px 40px");
|
||||
testGridColumnsValues("gridAutoMinContentUnsortedConstrained", "0px 60px");
|
||||
testGridColumnsValues("gridAutoMaxContentUnsortedConstrained", "0px 90px");
|
||||
testGridColumnsValues("gridMaxContentAndMinContentFixedUnsortedConstrained", "50px 40px");
|
||||
testGridColumnsValues("gridMaxContentAndMaxContentFixedUnsortedConstrained", "40px 70px");
|
||||
|
||||
// Check that items are processed by ascending span to compute track breadths allowing extra space distribution.
|
||||
testGridColumnsValues("gridMinContentFixedAndAutoUnsorted", "15px 90px");
|
||||
testGridColumnsValues("gridAutoAndAutoUnsorted", "60px 30px");
|
||||
testGridColumnsValues("gridMinContentAndMinContentFixedUnsorted", "0px 40px");
|
||||
testGridColumnsValues("gridMaxContentAndMinContentUnsorted", "0px 70px");
|
||||
testGridColumnsValues("gridFixedMinContentAndMaxContentUnsorted", "10px 70px");
|
||||
testGridColumnsValues("gridFixedMaxContentAndMinContentUnsorted", "50px 40px");
|
||||
testGridColumnsValues("gridMinContentAndMaxContentFixedUnsorted", "0px 90px");
|
||||
testGridColumnsValues("gridMaxContentFixedAndAutoUnsorted", "15px 70px");
|
||||
testGridColumnsValues("gridAutoMinContentUnsorted", "50px 60px");
|
||||
testGridColumnsValues("gridAutoMaxContentUnsorted", "0px 90px");
|
||||
testGridColumnsValues("gridMaxContentAndMinContentFixedUnsorted", "50px 40px");
|
||||
testGridColumnsValues("gridMaxContentAndMaxContentFixedUnsorted", "40px 70px");
|
||||
|
||||
// Check that only a subset of tracks grow above track limits.
|
||||
testGridColumnsValues("gridMinContentFixedAndAutoAboveLimits", "15px 95px");
|
||||
testGridColumnsValues("gridMaxContentFixedAndAutoAboveLimits", "15px 135px");
|
||||
testGridColumnsValues("gridMinContentFixedAndFixedFixedAndAuto", "20px 20px 60px");
|
||||
testGridColumnsValues("gridAutoAndFixedFixedAndMaxContentFixed", "110px 20px 20px");
|
||||
testGridColumnsValues("gridMaxContentAndMaxContentFixedAndMaxContent", "70px 20px 50px");
|
||||
testGridColumnsValues("gridAutoAndMinContentFixedAndMinContent", "55px 30px 65px");
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,3 @@
|
|||
<!DOCTYPE html>
|
||||
<div style="width: 100px; height: 30px; background: green"></div>
|
||||
<div style="width: 30px; height: 70px; background: green"></div>
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<title>CSS Masking: Test clip-path with mix-blend-mode with offset</title>
|
||||
<link rel="author" title="Xianzhu Wang" href="mailto:wangxianzhu@chromium.org">
|
||||
<link rel="help" href="http://www.w3.org/TR/css-masking-1/#the-clip-path">
|
||||
<link rel="match" href="clip-path-blending-offset-ref.html">
|
||||
<style>
|
||||
div {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
#clip-path {
|
||||
overflow: hidden;
|
||||
background: green;
|
||||
clip-path: polygon(0 0, 100px 0, 100px 30px, 30px 30px, 30px 100px, 0 100px);
|
||||
}
|
||||
#blend {
|
||||
position: absolute;
|
||||
mix-blend-mode: multiply;
|
||||
left: 40px;
|
||||
top: 50px;
|
||||
background: red;
|
||||
}
|
||||
</style>
|
||||
<div id="clip-path">
|
||||
<div id="blend"></div>
|
||||
</div>
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<meta name="flags" content="ahem">
|
||||
<link rel="stylesheet" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
#svgText {
|
||||
font: 100px/1 Ahem;
|
||||
}
|
||||
</style>
|
||||
<svg width="500" height="300">
|
||||
<text id="svgText" x="10" y="100">Text</text>
|
||||
</svg>
|
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<link rel="help" href="http://www.w3.org/TR/css-masking-1/#the-clip-path">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="clip-path-svg-text-backdrop-filter-ref.html">
|
||||
<meta name="flags" content="ahem">
|
||||
<link rel="stylesheet" href="/fonts/ahem.css" />
|
||||
<style>
|
||||
.masked {
|
||||
width: 500px;
|
||||
height: 300px;
|
||||
clip-path: url(#svgPath);
|
||||
backdrop-filter: invert(100%);
|
||||
background: transparent;
|
||||
}
|
||||
#svgText {
|
||||
font: 100px/1 Ahem;
|
||||
}
|
||||
</style>
|
||||
<div class="masked"></div>
|
||||
<svg>
|
||||
<clipPath id="svgPath">
|
||||
<text id="svgText" x="10" y="100">Text</text>
|
||||
</clipPath>
|
||||
</svg>
|
|
@ -5,6 +5,9 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<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>
|
||||
<style>
|
||||
#spacer {
|
||||
height: 100px;
|
||||
|
@ -44,6 +47,7 @@
|
|||
</h4>
|
||||
<script type="text/javascript">
|
||||
var testMouseOver = async_test('Tests that the mouseover event is fired and the element has a hover effect when the element underneath the mouse cursor is changed.');
|
||||
var actions_promise;
|
||||
|
||||
var eventList = [];
|
||||
function addBlue() {
|
||||
|
@ -61,7 +65,10 @@
|
|||
function checkEventSequence() {
|
||||
var result = eventList.join();
|
||||
assert_equals(result, 'mouseover,mouseenter');
|
||||
testMouseOver.done();
|
||||
// Make sure the test finishes after all the input actions are completed.
|
||||
actions_promise.then( () => {
|
||||
testMouseOver.done();
|
||||
});
|
||||
}
|
||||
|
||||
function run() {
|
||||
|
@ -78,6 +85,13 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Inject mouse inputs.
|
||||
actions_promise = new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: red})
|
||||
.pointerDown()
|
||||
.pointerUp()
|
||||
.send();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -6,6 +6,9 @@
|
|||
<meta name="viewport" content="width=device-width">
|
||||
<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>
|
||||
<style>
|
||||
div.box {
|
||||
border: 2px solid lightgray;
|
||||
|
@ -41,6 +44,7 @@
|
|||
<script>
|
||||
var test = async_test("mouse events fired without button state");
|
||||
var button = -1;
|
||||
var actions_promise;
|
||||
|
||||
function run() {
|
||||
var lightgreen = document.getElementById("lightgreen");
|
||||
|
@ -77,9 +81,21 @@
|
|||
on_event(lightblue, "mouseup", function (event) {
|
||||
if (button != -1) {
|
||||
test.step(function() {assert_equals(event.button, button, "Button must be the same as mousedown.");});
|
||||
test.done();
|
||||
// Make sure the test finishes after all the input actions are completed.
|
||||
actions_promise.then( () => {
|
||||
test.done();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Inject mouse inputs.
|
||||
var actions = new test_driver.Actions();
|
||||
actions_promise = actions.pointerMove(0, 0, {origin: lightgreen})
|
||||
.pointerDown({button: actions.ButtonType.MIDDLE})
|
||||
.pointerMove(0, 0, {origin: lightyellow})
|
||||
.pointerMove(0, 0, {origin: lightblue})
|
||||
.pointerUp({button: actions.ButtonType.MIDDLE})
|
||||
.send();
|
||||
}
|
||||
</script>
|
||||
</body>
|
|
@ -3,6 +3,9 @@
|
|||
<title>Mouseover/mouseout handling</title>
|
||||
<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>
|
||||
<style>
|
||||
#outer,
|
||||
#inner,
|
||||
|
@ -53,6 +56,7 @@
|
|||
var t = async_test("Mouseover/out events");
|
||||
var outer = document.getElementById("outer");
|
||||
var inner = document.getElementById("inner");
|
||||
var actions_promise;
|
||||
|
||||
var inner_over = 0;
|
||||
var inner_out = 0;
|
||||
|
@ -62,7 +66,6 @@ var outer_own_out = 0;
|
|||
var outer_over = 0;
|
||||
var outer_out = 0;
|
||||
|
||||
|
||||
inner.addEventListener("mouseover", t.step_func(function(e) {
|
||||
assert_equals(inner_over, inner_out, "mouseover is received before mouseout");
|
||||
|
||||
|
@ -112,7 +115,10 @@ outer.addEventListener('mouseout', t.step_func(function(e) {
|
|||
assert_equals(outer_own_over, outer_own_out + 1, "outer: mouseout is received after mouseover");
|
||||
if (outer_own_out == 1) {
|
||||
assert_equals(inner_out, 2, "inner should be done now");
|
||||
t.done();
|
||||
// Make sure the test finishes after all the input actions are completed.
|
||||
actions_promise.then( () => {
|
||||
t.done();
|
||||
});
|
||||
}
|
||||
|
||||
outer_own_out++;
|
||||
|
@ -122,4 +128,14 @@ outer.addEventListener('mouseout', t.step_func(function(e) {
|
|||
|
||||
outer_out++;
|
||||
}), false);
|
||||
|
||||
// Inject mouse inputs.
|
||||
actions_promise = new test_driver.Actions()
|
||||
.pointerMove(0, 0, {origin: outer})
|
||||
.pointerMove(0, 0, {origin: inner})
|
||||
.pointerMove(0, 0, {origin: released})
|
||||
.pointerMove(0, 0, {origin: inner})
|
||||
.pointerMove(0, 0, {origin: outer})
|
||||
.pointerMove(0, 0)
|
||||
.send();
|
||||
</script>
|
108
tests/wpt/web-platform-tests/webrtc/protocol/rtp-demuxing.html
Normal file
108
tests/wpt/web-platform-tests/webrtc/protocol/rtp-demuxing.html
Normal file
|
@ -0,0 +1,108 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>RTCPeerConnection payload type demuxing</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../RTCPeerConnection-helper.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
promise_test(async t => {
|
||||
const caller = new RTCPeerConnection();
|
||||
t.add_cleanup(() => caller.close());
|
||||
const callee = new RTCPeerConnection();
|
||||
t.add_cleanup(() => callee.close());
|
||||
exchangeIceCandidates(caller, callee);
|
||||
|
||||
const stream = await getNoiseStream({video: true});
|
||||
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
|
||||
stream.getTracks().forEach(track => caller.addTrack(track, stream));
|
||||
stream.getTracks().forEach(track => caller.addTrack(track.clone(), stream.clone()));
|
||||
|
||||
let callCount = 0;
|
||||
let metadataToBeLoaded = new Promise(resolve => {
|
||||
callee.ontrack = (e) => {
|
||||
const stream = e.streams[0];
|
||||
const v = document.createElement('video');
|
||||
v.autoplay = true;
|
||||
v.srcObject = stream;
|
||||
v.id = stream.id
|
||||
v.addEventListener('loadedmetadata', () => {
|
||||
if (++callCount === 2) {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
// Restrict first transceiver to VP8, second to H264.
|
||||
const {codecs} = RTCRtpSender.getCapabilities('video');
|
||||
const vp8 = codecs.find(c => c.mimeType === 'video/VP8');
|
||||
const h264 = codecs.find(c => c.mimeType === 'video/H264');
|
||||
caller.getTransceivers()[0].setCodecPreferences([vp8]);
|
||||
caller.getTransceivers()[1].setCodecPreferences([h264]);
|
||||
|
||||
const offer = await caller.createOffer();
|
||||
// Replace the mid header extension and all ssrc lines
|
||||
// with bogus. The receiver will be forced to do payload type demuxing.
|
||||
const sdp = offer.sdp
|
||||
.replace(/rtp-hdrext:sdes/g, 'rtp-hdrext:something')
|
||||
.replace(/a=ssrc:/g, 'a=notssrc');
|
||||
|
||||
await callee.setRemoteDescription({type: 'offer', sdp});
|
||||
await caller.setLocalDescription(offer);
|
||||
|
||||
const answer = await callee.createAnswer();
|
||||
await caller.setRemoteDescription(answer);
|
||||
await callee.setLocalDescription(answer);
|
||||
|
||||
await metadataToBeLoaded;
|
||||
}, 'Can demux two video tracks with different payload types on a bundled connection');
|
||||
|
||||
promise_test(async t => {
|
||||
const caller = new RTCPeerConnection({bundlePolicy: 'max-compat'});
|
||||
t.add_cleanup(() => caller.close());
|
||||
const callee = new RTCPeerConnection();
|
||||
t.add_cleanup(() => callee.close());
|
||||
exchangeIceCandidates(caller, callee);
|
||||
|
||||
const stream = await getNoiseStream({video: true});
|
||||
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
|
||||
stream.getTracks().forEach(track => caller.addTrack(track, stream));
|
||||
stream.getTracks().forEach(track => caller.addTrack(track.clone(), stream.clone()));
|
||||
|
||||
let callCount = 0;
|
||||
let metadataToBeLoaded = new Promise(resolve => {
|
||||
callee.ontrack = (e) => {
|
||||
const stream = e.streams[0];
|
||||
const v = document.createElement('video');
|
||||
v.autoplay = true;
|
||||
v.srcObject = stream;
|
||||
v.id = stream.id
|
||||
v.addEventListener('loadedmetadata', () => {
|
||||
if (++callCount === 2) {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
const offer = await caller.createOffer();
|
||||
// Replace BUNDLE, the mid header extension and all ssrc lines
|
||||
// with bogus. The receiver will be forced to do payload type demuxing
|
||||
// which is still possible because the different m-lines arrive on
|
||||
// different ports/sockets.
|
||||
const sdp = offer.sdp.replace('BUNDLE', 'SOMETHING')
|
||||
.replace(/rtp-hdrext:sdes/g, 'rtp-hdrext:something')
|
||||
.replace(/a=ssrc:/g, 'a=notssrc');
|
||||
|
||||
await callee.setRemoteDescription({type: 'offer', sdp});
|
||||
await caller.setLocalDescription(offer);
|
||||
|
||||
const answer = await callee.createAnswer();
|
||||
await caller.setRemoteDescription(answer);
|
||||
await callee.setLocalDescription(answer);
|
||||
|
||||
await metadataToBeLoaded;
|
||||
}, 'Can demux two video tracks with the same payload type on an unbundled connection');
|
||||
|
||||
</script>
|
|
@ -1,56 +0,0 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>RTCPeerConnection payload type demuxing for unbundled connections</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../RTCPeerConnection-helper.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
promise_test(async t => {
|
||||
const caller = new RTCPeerConnection({bundlePolicy: 'max-compat'});
|
||||
t.add_cleanup(() => caller.close());
|
||||
const callee = new RTCPeerConnection();
|
||||
t.add_cleanup(() => callee.close());
|
||||
|
||||
const stream = await getNoiseStream({video: true});
|
||||
t.add_cleanup(() => stream.getTracks().forEach(track => track.stop()));
|
||||
stream.getTracks().forEach(track => caller.addTrack(track, stream));
|
||||
stream.getTracks().forEach(track => caller.addTrack(track.clone(), stream.clone()));
|
||||
|
||||
let callCount = 0;
|
||||
let metadataToBeLoaded = new Promise(resolve => {
|
||||
callee.ontrack = (e) => {
|
||||
const stream = e.streams[0];
|
||||
const v = document.createElement('video');
|
||||
v.autoplay = true;
|
||||
v.srcObject = stream;
|
||||
v.id = stream.id
|
||||
v.addEventListener('loadedmetadata', () => {
|
||||
if (++callCount === 2) {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
exchangeIceCandidates(caller, callee);
|
||||
|
||||
const offer = await caller.createOffer();
|
||||
// Replace BUNDLE, the mid header extension and all ssrc lines
|
||||
// with bogus. The receiver will be forced to do payload type demuxing
|
||||
// which is still possible because the different m-lines arrive on
|
||||
// different ports/sockets.
|
||||
const sdp = offer.sdp.replace('BUNDLE', 'SOMETHING')
|
||||
.replace(/rtp-hdrext:sdes/g, 'rtp-hdrext:something')
|
||||
.replace(/a=ssrc:/g, 'a=notssrc');
|
||||
|
||||
await callee.setRemoteDescription({type: 'offer', sdp});
|
||||
await caller.setLocalDescription(offer);
|
||||
|
||||
const answer = await callee.createAnswer();
|
||||
await caller.setRemoteDescription(answer);
|
||||
await callee.setLocalDescription(answer);
|
||||
|
||||
await metadataToBeLoaded;
|
||||
}, 'Can demux two video tracks on an unbundled connection by payload type');
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue