Auto merge of #22875 - servo-wpt-sync:wpt_update_12-02-2019, r=jdm

Sync WPT with upstream (12-02-2019)

Automated downstream sync of changes from upstream as of 12-02-2019.
[no-wpt-sync]

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22875)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-02-13 20:37:05 -05:00 committed by GitHub
commit b65828d909
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 1112 additions and 114 deletions

View file

@ -137125,6 +137125,78 @@
{} {}
] ]
], ],
"css/css-sizing/intrinsic-percent-replaced-001.html": [
[
"/css/css-sizing/intrinsic-percent-replaced-001.html",
[
[
"/css/reference/ref-filled-green-100px-square-only.html",
"=="
]
],
{}
]
],
"css/css-sizing/intrinsic-percent-replaced-002.html": [
[
"/css/css-sizing/intrinsic-percent-replaced-002.html",
[
[
"/css/reference/ref-filled-green-100px-square-only.html",
"=="
]
],
{}
]
],
"css/css-sizing/intrinsic-percent-replaced-003.html": [
[
"/css/css-sizing/intrinsic-percent-replaced-003.html",
[
[
"/css/reference/ref-filled-green-100px-square-only.html",
"=="
]
],
{}
]
],
"css/css-sizing/intrinsic-percent-replaced-004.html": [
[
"/css/css-sizing/intrinsic-percent-replaced-004.html",
[
[
"/css/reference/ref-filled-green-100px-square-only.html",
"=="
]
],
{}
]
],
"css/css-sizing/intrinsic-percent-replaced-005.html": [
[
"/css/css-sizing/intrinsic-percent-replaced-005.html",
[
[
"/css/reference/ref-filled-green-100px-square-only.html",
"=="
]
],
{}
]
],
"css/css-sizing/intrinsic-percent-replaced-006.html": [
[
"/css/css-sizing/intrinsic-percent-replaced-006.html",
[
[
"/css/reference/ref-filled-green-100px-square-only.html",
"=="
]
],
{}
]
],
"css/css-sizing/orthogonal-writing-mode-float-in-inline.html": [ "css/css-sizing/orthogonal-writing-mode-float-in-inline.html": [
[ [
"/css/css-sizing/orthogonal-writing-mode-float-in-inline.html", "/css/css-sizing/orthogonal-writing-mode-float-in-inline.html",
@ -200451,6 +200523,11 @@
{} {}
] ]
], ],
".mailmap": [
[
{}
]
],
".pyup.yml": [ ".pyup.yml": [
[ [
{} {}
@ -336568,6 +336645,12 @@
{} {}
] ]
], ],
"animation-worklet/animate-multiple-effects-on-different-targets-via-main-thread.https.html": [
[
"/animation-worklet/animate-multiple-effects-on-different-targets-via-main-thread.https.html",
{}
]
],
"animation-worklet/animation-worklet-inside-iframe.https.html": [ "animation-worklet/animation-worklet-inside-iframe.https.html": [
[ [
"/animation-worklet/animation-worklet-inside-iframe.https.html", "/animation-worklet/animation-worklet-inside-iframe.https.html",
@ -336590,6 +336673,12 @@
{} {}
] ]
], ],
"animation-worklet/multiple-effects-on-same-target-driven-by-individual-local-time.https.html": [
[
"/animation-worklet/multiple-effects-on-same-target-driven-by-individual-local-time.https.html",
{}
]
],
"animation-worklet/playback-rate.https.html": [ "animation-worklet/playback-rate.https.html": [
[ [
"/animation-worklet/playback-rate.https.html", "/animation-worklet/playback-rate.https.html",
@ -348918,6 +349007,12 @@
{} {}
] ]
], ],
"css/css-syntax/unclosed-url-at-eof.html": [
[
"/css/css-syntax/unclosed-url-at-eof.html",
{}
]
],
"css/css-syntax/unicode-range-selector.html": [ "css/css-syntax/unicode-range-selector.html": [
[ [
"/css/css-syntax/unicode-range-selector.html", "/css/css-syntax/unicode-range-selector.html",
@ -353534,6 +353629,12 @@
{} {}
] ]
], ],
"css/css-values/calc-angle-values.html": [
[
"/css/css-values/calc-angle-values.html",
{}
]
],
"css/css-values/calc-in-color-001.html": [ "css/css-values/calc-in-color-001.html": [
[ [
"/css/css-values/calc-in-color-001.html", "/css/css-values/calc-in-color-001.html",
@ -353576,6 +353677,12 @@
{} {}
] ]
], ],
"css/css-values/calc-time-values.html": [
[
"/css/css-values/calc-time-values.html",
{}
]
],
"css/css-values/calc-unit-analysis.html": [ "css/css-values/calc-unit-analysis.html": [
[ [
"/css/css-values/calc-unit-analysis.html", "/css/css-values/calc-unit-analysis.html",
@ -411032,6 +411139,14 @@
{} {}
] ]
], ],
"screen-orientation/event-before-promise.html": [
[
"/screen-orientation/event-before-promise.html",
{
"testdriver": true
}
]
],
"screen-orientation/idlharness.window.js": [ "screen-orientation/idlharness.window.js": [
[ [
"/screen-orientation/idlharness.window.html", "/screen-orientation/idlharness.window.html",
@ -449145,6 +449260,10 @@
"f40c77f6331efbb7464a9180e999d77107f59180", "f40c77f6331efbb7464a9180e999d77107f59180",
"support" "support"
], ],
".mailmap": [
"5293948fc2311eb9b900a89a5b57e30f5c5c8eb2",
"support"
],
".pyup.yml": [ ".pyup.yml": [
"2249e1a89dc7687fa04a38e1704ee22c325bd15b", "2249e1a89dc7687fa04a38e1704ee22c325bd15b",
"support" "support"
@ -457045,6 +457164,10 @@
"c6918965843779e02522af1abf48acda8d0a128b", "c6918965843779e02522af1abf48acda8d0a128b",
"support" "support"
], ],
"animation-worklet/animate-multiple-effects-on-different-targets-via-main-thread.https.html": [
"d22ed4cd251a20de43c4425e54abdc984b41976a",
"testharness"
],
"animation-worklet/animation-worklet-inside-iframe.https.html": [ "animation-worklet/animation-worklet-inside-iframe.https.html": [
"b02186309dc2cf8df05559ef9fb9bcacdf535112", "b02186309dc2cf8df05559ef9fb9bcacdf535112",
"testharness" "testharness"
@ -457054,13 +457177,17 @@
"support" "support"
], ],
"animation-worklet/current-time.https.html": [ "animation-worklet/current-time.https.html": [
"402c49307df75b0c6d264f8072425b617342d2c3", "a445d5b004f8d4849ac9a65ca6e1b0e7bf5d072d",
"testharness" "testharness"
], ],
"animation-worklet/idlharness.any.js": [ "animation-worklet/idlharness.any.js": [
"e821a2fee8a3ace54e8e7092ab17c490a0ded914", "e821a2fee8a3ace54e8e7092ab17c490a0ded914",
"testharness" "testharness"
], ],
"animation-worklet/multiple-effects-on-same-target-driven-by-individual-local-time.https.html": [
"edf8488deda79eeb8eec071bf24305543d2f6627",
"testharness"
],
"animation-worklet/playback-rate.https.html": [ "animation-worklet/playback-rate.https.html": [
"9c975814f1ed09b3e78493df177c3c0eddf74cdd", "9c975814f1ed09b3e78493df177c3c0eddf74cdd",
"testharness" "testharness"
@ -575445,6 +575572,30 @@
"f105d942043c44efa0b9e1ec58798db8f9b64a8c", "f105d942043c44efa0b9e1ec58798db8f9b64a8c",
"reftest" "reftest"
], ],
"css/css-sizing/intrinsic-percent-replaced-001.html": [
"ebb93a225a7cc5df9a81d21ab218872077e93ab7",
"reftest"
],
"css/css-sizing/intrinsic-percent-replaced-002.html": [
"05051e63d8ce32b2d6dbd09655011d5427398c04",
"reftest"
],
"css/css-sizing/intrinsic-percent-replaced-003.html": [
"0f130b82db58a367b8751899c6dcfd224cb4631b",
"reftest"
],
"css/css-sizing/intrinsic-percent-replaced-004.html": [
"1c4002b0f8fc6d3c1819be013214a69a7e155923",
"reftest"
],
"css/css-sizing/intrinsic-percent-replaced-005.html": [
"84e945c833972afa92481ffd33574377ca7d48fa",
"reftest"
],
"css/css-sizing/intrinsic-percent-replaced-006.html": [
"bce0a18be6f66e57cad2e2e90694a6f53dab71c7",
"reftest"
],
"css/css-sizing/orthogonal-writing-mode-float-in-inline.html": [ "css/css-sizing/orthogonal-writing-mode-float-in-inline.html": [
"fa95069dbf0083b0dc7095d2bb3acf20a6ccf898", "fa95069dbf0083b0dc7095d2bb3acf20a6ccf898",
"reftest" "reftest"
@ -575973,6 +576124,10 @@
"3d7940387c810572159bd55fcc79fc10626221dc", "3d7940387c810572159bd55fcc79fc10626221dc",
"testharness" "testharness"
], ],
"css/css-syntax/unclosed-url-at-eof.html": [
"7157896d97857f6aad35114f29323b2b6bdd9318",
"testharness"
],
"css/css-syntax/unicode-range-selector.html": [ "css/css-syntax/unicode-range-selector.html": [
"db09540bb08c47f62b4255be6ba72b289987d64c", "db09540bb08c47f62b4255be6ba72b289987d64c",
"testharness" "testharness"
@ -592113,6 +592268,10 @@
"ec96924a6805bc6157a3845c12b630aed9e52fa8", "ec96924a6805bc6157a3845c12b630aed9e52fa8",
"reftest" "reftest"
], ],
"css/css-values/calc-angle-values.html": [
"e41beaff211b87dd74dd6fee6f05d894ba03988d",
"testharness"
],
"css/css-values/calc-ch-ex-lang-ref.html": [ "css/css-values/calc-ch-ex-lang-ref.html": [
"e0ac1ead1e5247c7c1d5fb2dffdf9ee0b08dd497", "e0ac1ead1e5247c7c1d5fb2dffdf9ee0b08dd497",
"support" "support"
@ -592189,6 +592348,10 @@
"f92de7338d3f05a6623f3aa882e21a724f1344e5", "f92de7338d3f05a6623f3aa882e21a724f1344e5",
"testharness" "testharness"
], ],
"css/css-values/calc-time-values.html": [
"60bcdcba594d8300091120100dfe8d878f8ff708",
"testharness"
],
"css/css-values/calc-unit-analysis.html": [ "css/css-values/calc-unit-analysis.html": [
"7508a3924162b87454a180f75f17c572192c3776", "7508a3924162b87454a180f75f17c572192c3776",
"testharness" "testharness"
@ -615638,7 +615801,7 @@
"support" "support"
], ],
"domparsing/XMLSerializer-serializeToString.html": [ "domparsing/XMLSerializer-serializeToString.html": [
"d71da494fe7dbce56af5e45926739c7b6a232676", "ab373481204e64070b8e3fd5a0f52f06211153b4",
"testharness" "testharness"
], ],
"domparsing/createContextualFragment.html": [ "domparsing/createContextualFragment.html": [
@ -621058,7 +621221,7 @@
"support" "support"
], ],
"fetch/stale-while-revalidate/stale-css.tentative.html": [ "fetch/stale-while-revalidate/stale-css.tentative.html": [
"df03bd96243138cbaee076dc9b0a6cc3d15d9a16", "9b95b891fff2db4a29bd438208ea4274a762977d",
"testharness" "testharness"
], ],
"fetch/stale-while-revalidate/stale-image.py": [ "fetch/stale-while-revalidate/stale-image.py": [
@ -621066,7 +621229,7 @@
"support" "support"
], ],
"fetch/stale-while-revalidate/stale-image.tentative.html": [ "fetch/stale-while-revalidate/stale-image.tentative.html": [
"d8383acb319c2e0398bd83632377ac8cb219da49", "a5d4e79c54b8fca7a7089efcca0bc5f6f7c1202a",
"testharness" "testharness"
], ],
"fetch/stale-while-revalidate/stale-script.py": [ "fetch/stale-while-revalidate/stale-script.py": [
@ -638966,7 +639129,7 @@
"testharness" "testharness"
], ],
"html/semantics/text-level-semantics/historical.html": [ "html/semantics/text-level-semantics/historical.html": [
"9de09fe5b389ba642ab5a55d96b5cb50918c2d73", "7fe83a95ed0464c5f6dac8ceb9b8327acbd70e16",
"testharness" "testharness"
], ],
"html/semantics/text-level-semantics/the-a-element/a-download-404.py": [ "html/semantics/text-level-semantics/the-a-element/a-download-404.py": [
@ -642350,7 +642513,7 @@
"support" "support"
], ],
"interfaces/web-bluetooth.idl": [ "interfaces/web-bluetooth.idl": [
"00b93a551335c1270a9529c36765ec8c858e18c1", "c5fd30cf320ac857d34758558110c972770fd428",
"support" "support"
], ],
"interfaces/web-nfc.idl": [ "interfaces/web-nfc.idl": [
@ -642406,7 +642569,7 @@
"support" "support"
], ],
"interfaces/webxr.idl": [ "interfaces/webxr.idl": [
"b1ed0f9072716efd5ef92ead32d58b396319dbfa", "2bc100e100d89da510c56dc51d13d45335f67740",
"support" "support"
], ],
"interfaces/worklets.idl": [ "interfaces/worklets.idl": [
@ -666905,6 +667068,10 @@
"dc3f290196fabe6e4594a498282fc0091134bdad", "dc3f290196fabe6e4594a498282fc0091134bdad",
"support" "support"
], ],
"screen-orientation/event-before-promise.html": [
"d876b0c8873ebe0f009ebe4e6ef02a8bac52cf9c",
"testharness"
],
"screen-orientation/idlharness.window.js": [ "screen-orientation/idlharness.window.js": [
"115f6ccb1e393586f4076884c01443d4944bb413", "115f6ccb1e393586f4076884c01443d4944bb413",
"testharness" "testharness"
@ -672126,11 +672293,11 @@
"testharness" "testharness"
], ],
"svg/geometry/parsing/ry-invalid.svg": [ "svg/geometry/parsing/ry-invalid.svg": [
"7a25a1ec0e61e4a36e65b7884d9667bb1614adfa", "5938ae830d52ad752a3f502a2308e9efae57dcdb",
"testharness" "testharness"
], ],
"svg/geometry/parsing/ry-valid.svg": [ "svg/geometry/parsing/ry-valid.svg": [
"e92e2cf6410ba4071baa81c18ec4462ba60b42dd", "178c0c007d649d75bd51a52a31f5c046eba9fd28",
"testharness" "testharness"
], ],
"svg/geometry/parsing/sizing-properties-computed.svg": [ "svg/geometry/parsing/sizing-properties-computed.svg": [
@ -675914,15 +676081,15 @@
"support" "support"
], ],
"tools/ci/ci_built_diff.sh": [ "tools/ci/ci_built_diff.sh": [
"81bf098f56aad48b7b3fce2d7cabd606fefa2d4e", "709cc2aa7e6867f548d4efdd62d74abc185e657b",
"support" "support"
], ],
"tools/ci/ci_lint.sh": [ "tools/ci/ci_lint.sh": [
"fe8bbfb8cf928d1982d302f6f91b64c37026ad25", "bf98f209eba1330c9a69d13ed0ca9380e3ec24a2",
"support" "support"
], ],
"tools/ci/ci_manifest.sh": [ "tools/ci/ci_manifest.sh": [
"695fd457d13081fb9814b9a9a266c75c9fd0c9f3", "7d0d5ca04189a099d8ac4d782f7be295437c648f",
"support" "support"
], ],
"tools/ci/ci_resources_unittest.sh": [ "tools/ci/ci_resources_unittest.sh": [
@ -675954,7 +676121,7 @@
"support" "support"
], ],
"tools/ci/lib.sh": [ "tools/ci/lib.sh": [
"7c0b8253a906e05f7d793d1c6274f9aed01b7f83", "8d5e6aef73b456446aaf265e35c3d0d6d252d1a7",
"support" "support"
], ],
"tools/ci/make_hosts_file.py": [ "tools/ci/make_hosts_file.py": [
@ -676002,7 +676169,7 @@
"support" "support"
], ],
"tools/docker/start.sh": [ "tools/docker/start.sh": [
"bfc7e9960abf595c8319c1865a2ad3c4d1c51087", "0675a0af2da2bb81b9a1d2f8cd062e3ee383e6b7",
"support" "support"
], ],
"tools/gitignore/__init__.py": [ "tools/gitignore/__init__.py": [
@ -676478,7 +676645,7 @@
"support" "support"
], ],
"tools/pywebsocket/mod_pywebsocket/memorizingfile.py": [ "tools/pywebsocket/mod_pywebsocket/memorizingfile.py": [
"07bcbd5876cc355328ebf5c7a9cd98850abb8c6a", "ba70ceb4e29e6cec5425212d0891dca7752ea808",
"support" "support"
], ],
"tools/pywebsocket/mod_pywebsocket/msgutil.py": [ "tools/pywebsocket/mod_pywebsocket/msgutil.py": [
@ -680682,7 +680849,7 @@
"support" "support"
], ],
"tools/wpt/browser.py": [ "tools/wpt/browser.py": [
"8c573a82bde2da17463943703d7ad20cb57df0cd", "5f711f47580fc54461c166771b28828693a63d5b",
"support" "support"
], ],
"tools/wpt/commands.json": [ "tools/wpt/commands.json": [
@ -680822,7 +680989,7 @@
"support" "support"
], ],
"tools/wptrunner/requirements_firefox.txt": [ "tools/wptrunner/requirements_firefox.txt": [
"0f2396afac1204af10a582f3d69162538a94625d", "656d57f4b200f3ac57efbc2b0b7ddbe4a880c57a",
"support" "support"
], ],
"tools/wptrunner/requirements_ie.txt": [ "tools/wptrunner/requirements_ie.txt": [
@ -685214,7 +685381,7 @@
"testharness" "testharness"
], ],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html": [ "webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-buffer-stitching.html": [
"b69cb0e81259a4e47cff1ae11befbe63341d4849", "3700bfa8ce806a57a4df6c050a9d299d9274edea",
"testharness" "testharness"
], ],
"webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-scheduling.html": [ "webaudio/the-audio-api/the-audiobuffersourcenode-interface/sub-sample-scheduling.html": [

View file

@ -2,6 +2,15 @@
[BluetoothRemoteGATTService interface: attribute oncharacteristicvaluechanged] [BluetoothRemoteGATTService interface: attribute oncharacteristicvaluechanged]
expected: FAIL expected: FAIL
[Bluetooth interface: navigator.bluetooth must inherit property "onadvertisementreceived" with the proper type]
expected: FAIL
[Bluetooth interface: attribute onadvertisementreceived]
expected: FAIL
[BluetoothDevice interface: attribute onadvertisementreceived]
expected: FAIL
[Bluetooth interface: attribute onserviceadded] [Bluetooth interface: attribute onserviceadded]
expected: FAIL expected: FAIL

View file

@ -332,3 +332,6 @@
[Matching font-style: 'oblique 0deg' should prefer 'oblique 5deg' over 'oblique 15deg 20deg'] [Matching font-style: 'oblique 0deg' should prefer 'oblique 5deg' over 'oblique 15deg 20deg']
expected: FAIL expected: FAIL
[Matching font-weight: '399' should prefer '500 501' over '502 510']
expected: FAIL

View file

@ -0,0 +1,82 @@
[calc-angle-values.html]
[substraction of angle unit: grad minus grad]
expected: FAIL
[multiplication of angle unit: deg multiplied by int]
expected: FAIL
[addition of 2 angle units: deg plus deg]
expected: FAIL
[division of angle unit: turn divided by int]
expected: FAIL
[addition of 2 angle units: deg plus turn]
expected: FAIL
[multiplication of angle unit: int multiplied by turn]
expected: FAIL
[substraction of angle unit: deg minus deg]
expected: FAIL
[division of angle unit: rad divided by int]
expected: FAIL
[substraction of angle unit: rad minus grad]
expected: FAIL
[multiplication of angle unit: grad multiplied by int]
expected: FAIL
[substraction of angle unit: rad minus turn]
expected: FAIL
[substraction of angle unit: grad minus turn]
expected: FAIL
[conversion of angle unit: grad into deg]
expected: FAIL
[substraction of angle unit: deg minus rad]
expected: FAIL
[addition of 2 angle units: grad plus grad]
expected: FAIL
[division of angle unit: grad divided by int]
expected: FAIL
[addition of 2 angle units: grad plus turn]
expected: FAIL
[addition of 2 angle units: rad plus turn]
expected: FAIL
[addition of 2 angle units: deg plus rad]
expected: FAIL
[addition of 2 angle units: rad plus grad]
expected: FAIL
[addition of 2 angle units: deg plus grad]
expected: FAIL
[substraction of angle unit: deg minus turn]
expected: FAIL
[division of angle unit: deg divided by int]
expected: FAIL
[multiplication of angle unit: int multiplied by rad]
expected: FAIL
[addition of 2 angle units: rad plus rad]
expected: FAIL
[substraction of angle unit: rad minus rad]
expected: FAIL
[substraction of angle unit: deg minus grad]
expected: FAIL

View file

@ -3,9 +3,3 @@
[scroll-behavior: smooth on DIV element] [scroll-behavior: smooth on DIV element]
expected: FAIL expected: FAIL
[Instant scrolling while doing history navigation.]
expected: FAIL
[Smooth scrolling while doing history navigation.]
expected: FAIL

View file

@ -21,3 +21,9 @@
[Check if "ns1" is generated even if the element already has xmlns:ns1.] [Check if "ns1" is generated even if the element already has xmlns:ns1.]
expected: FAIL expected: FAIL
[Check if attribute serialization takes into account of following xmlns:* attributes]
expected: FAIL
[Check if attribute serialization takes into account of the same prefix declared in an ancestor element]
expected: FAIL

View file

@ -0,0 +1,4 @@
[traverse_the_history_1.html]
[Multiple history traversals from the same task]
expected: FAIL

View file

@ -0,0 +1,4 @@
[iframe_005.html]
[document.write external script into iframe write back into parent]
expected: FAIL

View file

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

View file

@ -0,0 +1,9 @@
# People who've changed name:
# Sam Sneddon:
Sam Sneddon <me@gsnedders.com>
Sam Sneddon <me@gsnedders.com> <geoffers@gmail.com>
# Theresa O'Connor:
Theresa O'Connor <eoconnor@apple.com>
Theresa O'Connor <hober0@gmail.com>

View file

@ -0,0 +1,65 @@
<!DOCTYPE html>
<title>Animate multiple effects on different targets via main thread</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/web-animations/testcommon.js"></script>
<script src="common.js"></script>
<style>
#target {
width: 100px;
height: 100px;
background-color: green;
}
#target2 {
width: 100px;
height: 100px;
background-color: blue;
box-shadow: 4px 4px 25px blue;
}
</style>
<div id="target"></div>
<div id="target2"></div>
<script id="simple_animate" type="text/worklet">
registerAnimator("test_animator", class {
animate(currentTime, effect) {
let effects = effect.getChildren();
effects[0].localTime = 1000;
effects[1].localTime = 1000;
}
});
</script>
<script>
promise_test(async t => {
await runInAnimationWorklet(document.getElementById('simple_animate').textContent);
const effect = new KeyframeEffect(
document.getElementById("target"),
[
{ background: 'green' },
{ background: 'blue' },
],
{ duration: 2000 }
);
const effect2 = new KeyframeEffect(
document.getElementById("target2"),
[
{ boxShadow: '4px 4px 25px blue' },
{ boxShadow: '4px 4px 25px green' }
],
{ duration: 2000 }
);
const animation = new WorkletAnimation('test_animator', [effect, effect2]);
animation.play();
await waitForAsyncAnimationFrames(1);
assert_equals(getComputedStyle(document.getElementById('target')).backgroundColor, "rgb(0, 64, 128)");
assert_equals(getComputedStyle(document.getElementById('target2')).boxShadow, "rgb(0, 64, 128) 4px 4px 25px 0px");
}, 'Animating multiple effects on different targets via main thread should produce new output values accordingly');
</script>

View file

@ -2,47 +2,63 @@
<meta charset=utf-8> <meta charset=utf-8>
<title>The current time of a worklet animation</title> <title>The current time of a worklet animation</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/"> <link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/web-animations/testcommon.js"></script> <script src="/web-animations/testcommon.js"></script>
<script src="common.js"></script> <script src="common.js"></script>
<body>
<div id="log"></div> <div id="box"></div>
<script> <script>
'use strict'; 'use strict';
const DURATION = 10000; // ms function CreateAnimation() {
const KEYFRAMES = { height : ['100px', '50px'] }; const box = document.getElementById('box');
const effect = new KeyframeEffect(
box,
{ height: ['100px', '50px'] },
10000);
promise_test(async t => { return new WorkletAnimation('passthrough', effect);
await registerPassthroughAnimator(); }
const animation =
new WorkletAnimation('passthrough', new KeyframeEffect(createDiv(t),
KEYFRAMES, DURATION), document.timeline);
animation.play(); setup(setupAndRegisterTests, {explicit_done: true});
assert_equals(animation.currentTime, 0,
'Current time returns the hold time set when entering the play-pending' +
'state');
}, 'The current time returns the hold time when set');
promise_test(async t => { function setupAndRegisterTests() {
await registerPassthroughAnimator(); registerPassthroughAnimator().then(() => {
const animation = promise_test(async t => {
new WorkletAnimation('passthrough', new KeyframeEffect(createDiv(t), const animation = CreateAnimation();
KEYFRAMES, DURATION), document.timeline); animation.play();
// TODO(majidvp): We should use Animation.startTime here because the assert_equals(animation.currentTime, 0,
// animation may not immediately start. 'Current time returns the hold time set when entering the play-pending' +
const startTime = document.timeline.currentTime; 'state');
animation.play();
await waitForNextFrame(); animation.cancel();
const timelineTime = document.timeline.currentTime; }, 'The current time returns the hold time when set');
assert_times_equal(animation.currentTime, (timelineTime - startTime));
}, 'The current time is calculated from the timeline time and start time'); promise_test(async t => {
const animation = CreateAnimation();
animation.play();
// Allow one async animation frame to pass so that animation is running.
await waitForAsyncAnimationFrames(1);
assert_equals(animation.playState, "running");
// Allow time to advance so that we have a non-zero current time.
await waitForDocumentTimelineAdvance();
const timelineTime = document.timeline.currentTime;
assert_greater_than(animation.currentTime, 0);
assert_times_equal(animation.currentTime, (timelineTime - animation.startTime));
animation.cancel();
}, 'The current time is calculated from the timeline time and start time');
done();
});
}
// TODO(majidvp): Add tests for playbackRate and animations that are not // TODO(majidvp): Add tests for playbackRate and animations that are not
// associated with a timeline once these are supported in WorkletAnimation. // associated with a timeline once these are supported in WorkletAnimation.
// http://crbug.com/833846 // http://crbug.com/833846
</script> </script>
</body>

View file

@ -0,0 +1,65 @@
<!DOCTYPE html>
<title>Multiple effects on same target driven by individual local time</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/web-animations/testcommon.js"></script>
<script src="common.js"></script>
<style>
#target {
width: 100px;
height: 100px;
background-color: green;
}
#target2 {
width: 100px;
height: 100px;
background-color: blue;
box-shadow: 4px 4px 25px blue;
}
</style>
<div id="target"></div>
<script id="simple_animate" type="text/worklet">
registerAnimator("test_animator", class {
animate(currentTime, effect) {
let effects = effect.getChildren();
effects[0].localTime = 0;
effects[1].localTime = 1000;
}
});
</script>
<script>
promise_test(async t => {
await runInAnimationWorklet(document.getElementById('simple_animate').textContent);
const effect = new KeyframeEffect(
document.getElementById("target"),
[
{ background: 'green' },
{ background: 'blue' },
],
{ duration: 2000 }
);
const effect2 = new KeyframeEffect(
document.getElementById("target"),
[
{ width: '100px' },
{ width: '200px' }
],
{ duration: 2000 }
);
const animation = new WorkletAnimation('test_animator', [effect, effect2]);
animation.play();
await waitForAsyncAnimationFrames(1);
assert_equals(getComputedStyle(document.getElementById('target')).backgroundColor, "rgb(0, 128, 0)");
assert_equals(getComputedStyle(document.getElementById('target')).width, "150px");
}, `Animating multiple effects on the same target using effect specific local time should output values
relative to each effects unique local time`);
</script>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<style>
#float { float: left; height: 100px; background: green; }
canvas { height: 100%; }
</style>
<p>Test passes if there is a filled green square.</p>
<div id=float>
<canvas width=10 height=10></canvas>
</div>

View file

@ -0,0 +1,14 @@
<!-- quirks mode -->
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<style>
#float { float: left; height: 100px; background: green; }
canvas { height: 100%; }
</style>
<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
<div id=float>
<div>
<canvas width=10 height=10></canvas>
</div>
</div>

View file

@ -0,0 +1,17 @@
<!-- quirks mode -->
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<style>
#container { height: 200px; }
#float { float: left; height: 50%; background: green; }
canvas { height: 100%; }
</style>
<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
<div id=container>
<div id=float>
<div>
<canvas width=10 height=10></canvas>
</div>
</div>
</div>

View file

@ -0,0 +1,17 @@
<!-- quirks mode -->
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<style>
#container { display: flex; height: 200px; }
#float { float: left; height: 50%; background: green; }
canvas { height: 100%; }
</style>
<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
<div id=container>
<div id=float>
<div>
<canvas width=10 height=10></canvas>
</div>
</div>
</div>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<style>
#container { position: relative; height: 100px; }
#abs { position: absolute; top: 0; bottom: 0; background: green; }
canvas { height: 100%; }
</style>
<p>Test passes if there is a filled green square.</p>
<div id=container>
<div id=abs>
<canvas width=10 height=10></canvas>
</div>
</div>

View file

@ -0,0 +1,17 @@
<!-- quirks mode -->
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes">
<meta name="assert" content="Checks that a replaced element, with an aspect ratio, converts a percent height into an intrinsic width." />
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<style>
#container { height: 100px; }
#float { float: left; background: green; }
canvas { height: 100%; }
</style>
<p style="margin-top: 1em;">Test passes if there is a filled green square.</p>
<div id=container>
<div id=float>
<div>
<canvas width=10 height=10></canvas>
</div>
</div>
</div>

View file

@ -0,0 +1,29 @@
<!doctype html>
<title>Unclosed URL At EOF</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<meta name=author title="Tab Atkins-Bittner">
<link rel=help href="https://drafts.csswg.org/css-syntax/#consume-url-token">
<div id=test1-control style="background-image:url(foo)"></div>
<div id=test1-experiment style="background-image:url(foo"></div>
<div id=test2-control style="background-image:url()"></div>
<div id=test2-experiment style="background-image:url("></div>
<script>
test(()=>{
const control = document.querySelector("#test1-control");
const experiment = document.querySelector("#test1-experiment");
assert_equals(control.style.backgroundImage, experiment.style.backgroundImage);
}, "Unclosed url token at EOF is valid.");
test(()=>{
const control = document.querySelector("#test2-control");
const experiment = document.querySelector("#test2-experiment");
assert_equals(control.style.backgroundImage, experiment.style.backgroundImage);
}, "Unclosed empty url token at EOF is valid.");
</script>

View file

@ -0,0 +1,295 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test: calc() function with angle values</title>
<!--
Original test is:
https://chromium.googlesource.com/chromium/src/+/c825d655f6aaf73484f9d56e9012793f5b9668cc/third_party/WebKit/LayoutTests/css3/calc/calc-with-time-angle-and-frequency-values.html
Issue 917718: [css-values] calc-with-time-angle-and-frequency-values
test is highly unreliable, transition-delay testing causes side effects
https://bugs.chromium.org/p/chromium/issues/detail?id=917718
-->
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-values-3/#calc-computed-value">
<link rel="help" href="https://www.w3.org/TR/css-values-3/#angles">
<meta content="This test checks that additions, substractions, multiplications and divisions in calc() function when applied to angle units." name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<div id="target"></div>
<script>
function startTesting()
{
var targetElement = document.getElementById("target");
function compareValueCloseTo(property_name, calcValue, epsilon, expectedValue, description)
{
test(function()
{
targetElement.style.setProperty(property_name, "initial");
/*
Since we are running many consecutive tests on the same
element, then it is necessary to reset its property
to an initial value before actually re-testing it.
*/
targetElement.style.setProperty(property_name, calcValue);
var computedCalcValue = getComputedStyle(targetElement)[property_name];
/*
We first strip out the word "matrix" with the
opening parenthesis "(" and the closing
parenthesis ")"
*/
computedCalcValue = computedCalcValue.replace("matrix(", "").replace(")", "");
/*
Then, we split the string at each comma ","
and store the resulting 6 sub-strings into
tableSplitComputedCalcValue
*/
var tableSplitCalcValue = computedCalcValue.split(",");
/*
We convert the 6 sub-strings into numerical floating values
so that mathematical operations (substraction, absolute value,
comparison) can be performed.
*/
tableSplitCalcValue[0] = parseFloat(tableSplitCalcValue[0]);
tableSplitCalcValue[1] = parseFloat(tableSplitCalcValue[1]);
tableSplitCalcValue[2] = parseFloat(tableSplitCalcValue[2]);
tableSplitCalcValue[3] = parseFloat(tableSplitCalcValue[3]);
tableSplitCalcValue[4] = parseFloat(tableSplitCalcValue[4]);
tableSplitCalcValue[5] = parseFloat(tableSplitCalcValue[5]);
/*
Now, we execute the same steps with the expectedValue
*/
targetElement.style.setProperty(property_name, expectedValue);
var computedExpectedValue = getComputedStyle(targetElement)[property_name];
/*
We first strip out the word "matrix" with the
opening parenthesis "(" and the closing
parenthesis ")"
*/
computedExpectedValue = computedExpectedValue.replace("matrix(", "").replace(")", "");
/*
Then, we split the string at each comma ","
and store the resulting 6 sub-strings into
tableSplitComputedCalcValue
*/
var tableSplitExpectedValue = computedExpectedValue.split(",");
/*
We convert the 6 sub-strings into numerical floating values
so that mathematical operations (substraction, absolute value,
comparison) can be performed.
*/
tableSplitExpectedValue[0] = parseFloat(tableSplitExpectedValue[0]);
tableSplitExpectedValue[1] = parseFloat(tableSplitExpectedValue[1]);
tableSplitExpectedValue[2] = parseFloat(tableSplitExpectedValue[2]);
tableSplitExpectedValue[3] = parseFloat(tableSplitExpectedValue[3]);
tableSplitExpectedValue[4] = parseFloat(tableSplitExpectedValue[4]);
tableSplitExpectedValue[5] = parseFloat(tableSplitExpectedValue[5]);
assert_array_approx_equals(tableSplitCalcValue, tableSplitExpectedValue, epsilon);
/*
In this mega-test of 27 sub-tests, we intentionally
set the tolerance precision (epsilon) to a rather big
value (0.0001 === 100 millionths). The reason for this
is we want to verify if browsers and CSS-capable
applications do the right calculations. We do not want
to penalize browsers and CSS-capable applications that
have modest precision (not capable of a 1 millionth
level precision).
*/
} , description);
}
/*
deg
Degrees. There are 360 degrees in a full circle.
grad
Gradians, also known as "gons" or "grades". There are 400 gradians in a full circle.
rad
Radians. There are 2π radians in a full circle.
1rad == 57.295779513°
https://www.rapidtables.com/convert/number/radians-to-degrees.html
π == Math.PI == 3.141592653589793
turn
Turns. There is 1 turn in a full circle.
*/
/* Addition of angle units */
/* compareValueCloseTo(property_name, calcValue, epsilon, expectedValue, description) */
compareValueCloseTo("transform", "rotate(calc(45deg + 45deg))", 0.0001, "rotate(90deg)", "addition of 2 angle units: deg plus deg");
compareValueCloseTo("transform", "rotate(calc(45deg + 1rad))", 0.0001, "rotate(102.29578deg)", "addition of 2 angle units: deg plus rad");
/*
1 radian == 57.295779513 degrees
The original test was using the slightly imprecise rotate(102.3deg)
*/
compareValueCloseTo("transform", "rotate(calc(20deg + 200grad))", 0.0001, "rotate(200deg)", "addition of 2 angle units: deg plus grad");
compareValueCloseTo("transform", "rotate(calc(200deg + 0.5turn))", 0.0001, "rotate(380deg)", "addition of 2 angle units: deg plus turn");
compareValueCloseTo("transform", "rotate(calc(45rad + 45rad))", 0.0001, "rotate(90rad)", "addition of 2 angle units: rad plus rad");
compareValueCloseTo("transform", "rotate(calc(1rad + 40grad))", 0.0001, "rotate(93.29578deg)", "addition of 2 angle units: rad plus grad");
/*
1 radian == 57.295779513 degrees; 40 gradians is 36 degrees.
*/
compareValueCloseTo("transform", "rotate(calc(1rad + 0.5turn))", 0.0001, "rotate(237.29578deg)", "addition of 2 angle units: rad plus turn");
compareValueCloseTo("transform", "rotate(calc(45grad + 45grad))", 0.0001, "rotate(90grad)", "addition of 2 angle units: grad plus grad");
compareValueCloseTo("transform", "rotate(calc(10grad + 0.5turn))", 0.0001, "rotate(189deg)", "addition of 2 angle units: grad plus turn");
/*
10 gradians is 9 degrees.
*/
/* compareValueCloseTo(property_name, calcValue, epsilon, expectedValue, description) */
/* Substraction of angle unit */
/* compareValueCloseTo(property_name, calcValue, epsilon, expectedValue, description) */
compareValueCloseTo("transform", "rotate(calc(45deg - 15deg))", 0.0001, "rotate(30deg)", "substraction of angle unit: deg minus deg");
compareValueCloseTo("transform", "rotate(calc(90deg - 1rad))", 0.0001, "rotate(32.70422deg)", "substraction of angle unit: deg minus rad");
/*
1 radian == 57.295779513 degrees
*/
compareValueCloseTo("transform", "rotate(calc(38deg - 20grad))", 0.0001, "rotate(20deg)", "substraction of angle unit: deg minus grad");
compareValueCloseTo("transform", "rotate(calc(360deg - 0.5turn))", 0.0001, "rotate(180deg)", "substraction of angle unit: deg minus turn");
compareValueCloseTo("transform", "rotate(calc(45rad - 15rad))", 0.0001, "rotate(30rad)", "substraction of angle unit: rad minus rad");
compareValueCloseTo("transform", "rotate(calc(30rad - 10grad))", 0.0001, "rotate(1709.87339deg)", "substraction of angle unit: rad minus grad");
/*
30 radians is 1718.8733854 degrees ; 10 gradians is 9 degrees.
*/
compareValueCloseTo("transform", "rotate(calc(4rad - 0.1turn))", 0.0001, "rotate(193.18312deg)", "substraction of angle unit: rad minus turn");
/*
4 radians is 229.183118052 degrees ; 0.1 turn is 36 degrees.
*/
compareValueCloseTo("transform", "rotate(calc(45grad - 15grad))", 0.0001, "rotate(30grad)", "substraction of angle unit: grad minus grad");
compareValueCloseTo("transform", "rotate(calc(100grad - 0.25turn))", 0.0001, "rotate(0deg)", "substraction of angle unit: grad minus turn");
/* Multiplication of angle unit */
/* compareValueCloseTo(property_name, calcValue, epsilon, expectedValue, description) */
compareValueCloseTo("transform", "rotate(calc(45deg * 2))", 0.0001, "rotate(90deg)", "multiplication of angle unit: deg multiplied by int");
compareValueCloseTo("transform", "rotate(calc(2 * 45rad))", 0.0001, "rotate(90rad)", "multiplication of angle unit: int multiplied by rad");
compareValueCloseTo("transform", "rotate(calc(45grad * 2))", 0.0001, "rotate(90grad)", "multiplication of angle unit: grad multiplied by int");
compareValueCloseTo("transform", "rotate(calc(2 * 45turn))", 0.0001, "rotate(90turn)", "multiplication of angle unit: int multiplied by turn");
/* Division of angle unit */
/* compareValueCloseTo(property_name, calcValue, epsilon, expectedValue, description) */
compareValueCloseTo("transform", "rotate(calc(90deg / 2))", 0.0001, "rotate(45deg)", "division of angle unit: deg divided by int");
compareValueCloseTo("transform", "rotate(calc(90rad / 2))", 0.0001, "rotate(45rad)", "division of angle unit: rad divided by int");
compareValueCloseTo("transform", "rotate(calc(90grad / 2))", 0.0001, "rotate(45grad)", "division of angle unit: grad divided by int");
compareValueCloseTo("transform", "rotate(calc(90turn / 2))", 0.0001, "rotate(45turn)", "division of angle unit: turn divided by int");
/* compareValueCloseTo(property_name, calcValue, epsilon, expectedValue, description) */
/*
deg
Degrees. There are 360 degrees in a full circle.
grad
Gradians, also known as "gons" or "grades". There are 400 gradians in a full circle.
rad
Radians. There are 2π radians in a full circle.
1rad == 57.295779513°
https://www.rapidtables.com/convert/number/radians-to-degrees.html
π == Math.PI == 3.141592653589793
turn
Turns. There is 1 turn in a full circle.
*/
/* Testing conversion of angle unit */
/* compareValueCloseTo(property_name, calcValue, epsilon, expectedValue, description) */
compareValueCloseTo("transform", "rotate(calc(50grad)", 0.0001, "rotate(45deg)", "conversion of angle unit: grad into deg");
}
startTesting();
</script>

View file

@ -0,0 +1,104 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Values and Units Test: calc() function with time values</title>
<!--
Original test is:
https://chromium.googlesource.com/chromium/src/+/c825d655f6aaf73484f9d56e9012793f5b9668cc/third_party/WebKit/LayoutTests/css3/calc/calc-with-time-angle-and-frequency-values.html
Issue 917718: [css-values] calc-with-time-angle-and-frequency-values
test is highly unreliable, transition-delay testing causes side effects
https://bugs.chromium.org/p/chromium/issues/detail?id=917718
-->
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
<link rel="help" href="https://www.w3.org/TR/css-values-3/#calc-computed-value">
<link rel="help" href="https://www.w3.org/TR/css-values-3/#time">
<meta content="This test checks that additions, substractions, multiplications and divisions in calc() function when applied to time units." name="assert">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<div id="target"></div>
<script>
function startTesting()
{
var targetElement = document.getElementById("target");
function compareValue(property_name, calcValue, expectedValue, description)
{
test(function()
{
targetElement.style.setProperty(property_name, "inherit");
/*
Since we are running many consecutive tests on the same
element, then it is necessary to 'reset' its property
to an initial value before actually re-testing it.
*/
targetElement.style.setProperty(property_name, calcValue);
var computedCalcValue = getComputedStyle(targetElement)[property_name];
targetElement.style.setProperty(property_name, expectedValue);
var computedExpectedValue = getComputedStyle(targetElement)[property_name];
assert_equals(computedCalcValue, computedExpectedValue);
}, description);
}
/* Testing time units */
/* compareValue(property_name, calcValue, expectedValue, description) */
compareValue("transition-delay", "calc(4s + 1s)", "5s", "addition of 2 time units: s plus s");
compareValue("transition-delay", "calc(4s + 1ms)", "4.001s", "addition of 2 time units: s plus ms");
compareValue("transition-delay", "calc(4ms + 1ms)", "0.005s", "addition of 2 time units: ms plus ms");
compareValue("transition-delay", "calc(4s - 1s)", "3s", "substraction of time unit: s minus s");
compareValue("transition-delay", "calc(4s - 1ms)", "3.999s", "substraction of time unit: s minus ms");
compareValue("transition-delay", "calc(4 * 1s)", "4s", "multiplication of integer with a time unit: int multiplied by s");
compareValue("transition-delay", "calc(4 * 1ms)", "0.004s", "multiplication of integer with a time unit: int multiplied by ms");
compareValue("transition-delay", "calc(4s / 2)", "2s", "division of time unit with integer: s divided by int");
compareValue("transition-delay", "calc(4ms / 2)", "0.002s", "division of time unit with integer: ms divided by int");
/* compareValue(property_name, calcValue, expectedValue, description) */
/* Testing conversion of time unit */
/* compareValue(property_name, calcValue, expectedValue, description) */
compareValue("transition-delay", "calc(4000ms)", "4s", "conversion of time unit: ms into s");
}
startTesting();
</script>

View file

@ -55,6 +55,22 @@ test(function() {
'<root attr="&#xD;"/>', '<root attr="&#13;"/>']); '<root attr="&#xD;"/>', '<root attr="&#13;"/>']);
}, 'check XMLSerializer.serializeToString escapes attribute values for roundtripping'); }, 'check XMLSerializer.serializeToString escapes attribute values for roundtripping');
test(function() {
const root = (new Document()).createElement('root');
root.setAttributeNS('uri1', 'p:foobar', 'value1');
root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:p', 'uri2');
const xmlString = (new XMLSerializer()).serializeToString(root);
assert_equals(xmlString, '<root xmlns:ns1="uri1" ns1:foobar="value1" xmlns:p="uri2"/>');
}, 'Check if attribute serialization takes into account of following xmlns:* attributes');
test(function() {
const input = '<root xmlns:p="uri1"><child/></root>';
const root = (new DOMParser()).parseFromString(input, 'text/xml').documentElement;
root.firstChild.setAttributeNS('uri2', 'p:foobar', 'v');
const xmlString = (new XMLSerializer()).serializeToString(root);
assert_equals(xmlString, '<root xmlns:p="uri1"><child xmlns:ns1="uri2" ns1:foobar="v"/></root>');
}, 'Check if attribute serialization takes into account of the same prefix declared in an ancestor element');
test(function() { test(function() {
const input = '<root><child1/><child2/></root>'; const input = '<root><child1/><child2/></root>';
const root = (new DOMParser()).parseFromString(input, 'text/xml').documentElement; const root = (new DOMParser()).parseFromString(input, 'text/xml').documentElement;

View file

@ -12,7 +12,7 @@ https://github.com/whatwg/fetch/pull/853
async_test(t => { async_test(t => {
window.onload = t.step_func(() => { window.onload = t.step_func(() => {
step_timeout(() => { t.step_timeout(() => {
assert_equals(window.getComputedStyle(document.body).getPropertyValue('background-color'), "rgb(0, 128, 0)"); assert_equals(window.getComputedStyle(document.body).getPropertyValue('background-color'), "rgb(0, 128, 0)");
var link2 = document.createElement("link"); var link2 = document.createElement("link");
link2.onload = t.step_func(() => { link2.onload = t.step_func(() => {

View file

@ -18,7 +18,7 @@ See: https://html.spec.whatwg.org/#the-list-of-available-images
async_test(t => { async_test(t => {
window.onload = t.step_func(() => { window.onload = t.step_func(() => {
step_timeout(() => { t.step_timeout(() => {
assert_equals(document.getElementById("firstimage").width, 16, "Width is 16"); assert_equals(document.getElementById("firstimage").width, 16, "Width is 16");
var childDocument = document.getElementById('child').contentDocument; var childDocument = document.getElementById('child').contentDocument;
var img2 = childDocument.createElement("img"); var img2 = childDocument.createElement("img");

View file

@ -26,7 +26,4 @@ t('datetime', 'time');
// removed in https://github.com/whatwg/html/commit/66fcb2357f205448fe2f40d7834a1e8ea2ed283b // removed in https://github.com/whatwg/html/commit/66fcb2357f205448fe2f40d7834a1e8ea2ed283b
t('media', ['a', 'area']); t('media', ['a', 'area']);
// renamed to noreferrer in https://github.com/whatwg/html/commit/6a34274e99593e767ae99744a6c38a19489915c6
t('noreferer', ['link', 'a', 'area']);
</script> </script>

View file

@ -199,6 +199,7 @@ interface mixin CharacteristicEventHandlers {
[SecureContext] [SecureContext]
interface mixin BluetoothDeviceEventHandlers { interface mixin BluetoothDeviceEventHandlers {
attribute EventHandler onadvertisementreceived;
attribute EventHandler ongattserverdisconnected; attribute EventHandler ongattserverdisconnected;
}; };

View file

@ -3,6 +3,10 @@
// (https://github.com/tidoust/reffy-reports) // (https://github.com/tidoust/reffy-reports)
// Source: WebXR Device API (https://immersive-web.github.io/webxr/) // Source: WebXR Device API (https://immersive-web.github.io/webxr/)
partial interface Navigator {
[SecureContext, SameObject] readonly attribute XR xr;
};
[SecureContext, Exposed=Window] interface XR : EventTarget { [SecureContext, Exposed=Window] interface XR : EventTarget {
// Methods // Methods
Promise<void> supportsSessionMode(XRSessionMode mode); Promise<void> supportsSessionMode(XRSessionMode mode);
@ -12,11 +16,6 @@
attribute EventHandler ondevicechange; attribute EventHandler ondevicechange;
}; };
[SecureContext]
partial interface Navigator {
[SameObject] readonly attribute XR xr;
};
enum XREnvironmentBlendMode { enum XREnvironmentBlendMode {
"opaque", "opaque",
"additive", "additive",

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
promise_test(async t => {
await test_driver.bless("request full screen", () => {
return document.documentElement.requestFullscreen();
});
const promiseToChange = new Promise(resolve => {
screen.orientation.addEventListener("change", resolve);
});
const result = await Promise.race([
screen.orientation.lock("landscape"),
promiseToChange
]);
assert_true(result instanceof Event, "Expected an instance of Event");
}, "The 'change' event must fire before the [[orientationPendingPromise]] is resolved.");
</script>

View file

@ -2,10 +2,10 @@
<svg xmlns="http://www.w3.org/2000/svg" <svg xmlns="http://www.w3.org/2000/svg"
xmlns:h="http://www.w3.org/1999/xhtml" xmlns:h="http://www.w3.org/1999/xhtml"
width="800px" height="8000px"> width="800px" height="8000px">
<title>SVG Geometry Properties: parsing rx with invalid values</title> <title>SVG Geometry Properties: parsing ry with invalid values</title>
<metadata> <metadata>
<h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#RY"/> <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#RY"/>
<h:meta name="assert" content="rx supports only the grammar '&lt;length-percentage&gt; | auto'."/> <h:meta name="assert" content="ry supports only the grammar '&lt;length-percentage&gt; | auto'."/>
</metadata> </metadata>
<g id="target"></g> <g id="target"></g>
<h:script src="/resources/testharness.js"/> <h:script src="/resources/testharness.js"/>
@ -13,10 +13,10 @@
<h:script src="/css/support/parsing-testcommon.js"/> <h:script src="/css/support/parsing-testcommon.js"/>
<script><![CDATA[ <script><![CDATA[
test_invalid_value("rx", "10"); test_invalid_value("ry", "10");
test_invalid_value("rx", "none"); test_invalid_value("ry", "none");
test_invalid_value("rx", "10px 20px"); test_invalid_value("ry", "10px 20px");
test_invalid_value("rx", "-1px"); test_invalid_value("ry", "-1px");
]]></script> ]]></script>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 798 B

After

Width:  |  Height:  |  Size: 798 B

Before After
Before After

View file

@ -2,10 +2,10 @@
<svg xmlns="http://www.w3.org/2000/svg" <svg xmlns="http://www.w3.org/2000/svg"
xmlns:h="http://www.w3.org/1999/xhtml" xmlns:h="http://www.w3.org/1999/xhtml"
width="800px" height="8000px"> width="800px" height="8000px">
<title>SVG Geometry Properties: parsing rx with valid values</title> <title>SVG Geometry Properties: parsing ry with valid values</title>
<metadata> <metadata>
<h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#RY"/> <h:link rel="help" href="https://svgwg.org/svg2-draft/geometry.html#RY"/>
<h:meta name="assert" content="rx supports the full grammar '&lt;length-percentage&gt; | auto'."/> <h:meta name="assert" content="ry supports the full grammar '&lt;length-percentage&gt; | auto'."/>
</metadata> </metadata>
<g id="target"></g> <g id="target"></g>
<h:script src="/resources/testharness.js"/> <h:script src="/resources/testharness.js"/>
@ -13,13 +13,13 @@
<h:script src="/css/support/parsing-testcommon.js"/> <h:script src="/css/support/parsing-testcommon.js"/>
<script><![CDATA[ <script><![CDATA[
test_valid_value("rx", "auto"); test_valid_value("ry", "auto");
test_valid_value("rx", "0", "0px"); test_valid_value("ry", "0", "0px");
test_valid_value("rx", "1px"); test_valid_value("ry", "1px");
test_valid_value("rx", "calc(2em + 3ex)"); test_valid_value("ry", "calc(2em + 3ex)");
test_valid_value("rx", "4%"); test_valid_value("ry", "4%");
test_valid_value("rx", "5vh"); test_valid_value("ry", "5vh");
]]></script> ]]></script>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 861 B

After

Width:  |  Height:  |  Size: 861 B

Before After
Before After

View file

View file

@ -1,3 +1,4 @@
#!/bin/bash
set -ex set -ex
SCRIPT_DIR=$(cd $(dirname "$0") && pwd -P) SCRIPT_DIR=$(cd $(dirname "$0") && pwd -P)

View file

@ -1,3 +1,4 @@
#!/bin/bash
set -ex set -ex
SCRIPT_DIR=$(cd $(dirname "$0") && pwd -P) SCRIPT_DIR=$(cd $(dirname "$0") && pwd -P)

View file

@ -1,3 +1,4 @@
#!/bin/bash
set -ex set -ex
SCRIPT_DIR=$(cd $(dirname "$0") && pwd -P) SCRIPT_DIR=$(cd $(dirname "$0") && pwd -P)

View file

@ -1,5 +1,3 @@
#!/bin/bash
hosts_fixup() { hosts_fixup() {
echo "travis_fold:start:hosts_fixup" echo "travis_fold:start:hosts_fixup"
echo "Rewriting hosts file" echo "Rewriting hosts file"

View file

@ -1,3 +1,5 @@
#!/bin/bash
# This script is embedded in the docker image, and so the image must be updated when changes # This script is embedded in the docker image, and so the image must be updated when changes
# to the script are made. To do this, assuming you have docker installed: # to the script are made. To do this, assuming you have docker installed:
# In tools/docker/ : # In tools/docker/ :
@ -8,7 +10,6 @@
# Update the `image` specified in the project's .taskcluster.yml file # Update the `image` specified in the project's .taskcluster.yml file
#!/bin/bash
set -ex set -ex
REMOTE=${1:-https://github.com/web-platform-tests/wpt} REMOTE=${1:-https://github.com/web-platform-tests/wpt}

0
tests/wpt/web-platform-tests/tools/manifest/update.py Normal file → Executable file
View file

View file

@ -1,5 +1,3 @@
#!/usr/bin/env python
#
# Copyright 2011, Google Inc. # Copyright 2011, Google Inc.
# All rights reserved. # All rights reserved.
# #

View file

@ -5,10 +5,13 @@ import shutil
import stat import stat
import subprocess import subprocess
import tempfile import tempfile
import urlparse
from abc import ABCMeta, abstractmethod from abc import ABCMeta, abstractmethod
from datetime import datetime, timedelta from datetime import datetime, timedelta
from distutils.spawn import find_executable from distutils.spawn import find_executable
import requests
from utils import call, get, untar, unzip from utils import call, get, untar, unzip
uname = platform.uname() uname = platform.uname()
@ -93,30 +96,28 @@ class Firefox(Browser):
def install(self, dest=None, channel="nightly"): def install(self, dest=None, channel="nightly"):
"""Install Firefox.""" """Install Firefox."""
branch = {
"nightly": "mozilla-central",
"beta": "mozilla-beta",
"stable": "mozilla-stable"
}
scraper = {
"nightly": "daily",
"beta": "release",
"stable": "release"
}
version = {
"stable": "latest",
"beta": "latest-beta",
"nightly": "latest"
}
if channel not in branch:
raise ValueError("Unrecognised release channel: %s" % channel)
from mozdownload import FactoryScraper
import mozinstall import mozinstall
if self.platform is None: product = {
raise ValueError("Unable to construct a valid Firefox package name for current platform") "nightly": "firefox-nightly-latest-ssl",
"beta": "firefox-beta-latest-ssl",
"stable": "firefox-beta-latest-ssl"
}
os_builds = {
("linux", "x86"): "linux",
("linux", "x86_64"): "linux64",
("win", "x86"): "win",
("win", "x86_64"): "win64",
("macos", "x86_64"): "osx",
}
os_key = (self.platform, uname[4])
if channel not in product:
raise ValueError("Unrecognised release channel: %s" % channel)
if os_key not in os_builds:
raise ValueError("Unsupported platform: %s %s" % os_key)
if dest is None: if dest is None:
# os.getcwd() doesn't include the venv path # os.getcwd() doesn't include the venv path
@ -124,17 +125,35 @@ class Firefox(Browser):
dest = os.path.join(dest, "browsers", channel) dest = os.path.join(dest, "browsers", channel)
scraper = FactoryScraper(scraper[channel], if not os.path.exists(dest):
branch=branch[channel], os.makedirs(dest)
version=version[channel],
destination=dest)
self.logger.info("Downloading Firefox from %s" % scraper.url) url = "https://download.mozilla.org/?product=%s&os=%s&lang=en-US" % (product[channel],
os_builds[os_key])
self.logger.info("Downloading Firefox from %s" % url)
resp = requests.get(url)
filename = scraper.download() filename = None
content_disposition = resp.headers.get('content-disposition')
if content_disposition:
filenames = re.findall("filename=(.+)", content_disposition)
if filenames:
filename = filenames[0]
if not filename:
filename = urlparse.urlsplit(resp.url).path.rsplit("/", 1)[1]
if not filename:
filename = "firefox.tar.bz2"
installer_path = os.path.join(dest, filename)
with open(installer_path, "w") as f:
f.write(resp.content)
try: try:
mozinstall.install(filename, dest) mozinstall.install(installer_path, dest)
except mozinstall.mozinstall.InstallError: except mozinstall.mozinstall.InstallError:
if self.platform == "macos" and os.path.exists(os.path.join(dest, self.application_name.get(channel, "Firefox Nightly.app"))): if self.platform == "macos" and os.path.exists(os.path.join(dest, self.application_name.get(channel, "Firefox Nightly.app"))):
# mozinstall will fail if nightly is already installed in the venv because # mozinstall will fail if nightly is already installed in the venv because
@ -144,7 +163,7 @@ class Firefox(Browser):
else: else:
raise raise
os.remove(filename) os.remove(installer_path)
return self.find_binary_path(dest) return self.find_binary_path(dest)
def find_binary_path(self,path=None, channel="nightly"): def find_binary_path(self,path=None, channel="nightly"):

View file

@ -1,5 +1,5 @@
marionette_driver==2.7.0 marionette_driver==2.7.0
mozprofile==2.1.0 mozprofile==2.2.0
mozprocess==1.0.0 mozprocess==1.0.0
mozcrash == 1.0 mozcrash == 1.0
mozrunner==7.3.0 mozrunner==7.3.0

View file

View file

@ -26,7 +26,7 @@
// Experimentally determined thresholds. DO NOT relax these values // Experimentally determined thresholds. DO NOT relax these values
// to far from these values to make the tests pass. // to far from these values to make the tests pass.
const errorThreshold = 9.0957e-5; const errorThreshold = 9.0957e-5;
const snrThreshold = 85.586; const snrThreshold = 85.580;
// Informative message // Informative message
should(sampleRate, 'Test 1: context.sampleRate') should(sampleRate, 'Test 1: context.sampleRate')