mirror of
https://github.com/servo/servo.git
synced 2025-06-28 19:13:41 +01:00
Update web-platform-tests to revision 1cb9daef513ee0c7e82a6689a6248946d0c580c0
This commit is contained in:
parent
b9404fcd48
commit
f397fef6e3
159 changed files with 2043 additions and 673 deletions
|
@ -4,7 +4,7 @@
|
|||
expected: TIMEOUT
|
||||
|
||||
[Opening a blob URL in a new window immediately before revoking it works.]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[Fetching a blob URL immediately before revoking it works in an iframe.]
|
||||
expected: FAIL
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[background-attachment-350.html]
|
||||
expected: FAIL
|
|
@ -26,3 +26,6 @@
|
|||
[A transition with replaced keyframes animating nothing still exhibits normal reversing behavior (reversing from the base value).]
|
||||
expected: FAIL
|
||||
|
||||
[A transition with replaced kefyrames and composite 'add' exhibits normal reversing behavior, and the effect is not double counted when calculating the before change style]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[CaretPosition-001.html]
|
||||
[Element at (400, 100)]
|
||||
expected: FAIL
|
||||
|
|
@ -318,15 +318,15 @@
|
|||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
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;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -53,6 +53,3 @@
|
|||
[combined text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript x/x]
|
||||
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
|
||||
|
||||
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_3.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
[iframe_sandbox_popups_escaping-2.html]
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[form-double-submit-3.html]
|
||||
[<button> should have the same double-submit protection as <input type=submit>]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[iframe_005.html]
|
||||
[document.write external script into iframe write back into parent]
|
||||
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
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[018.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, javascript:]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[WorkerGlobalScope-close.html]
|
||||
[Test sending a message after closing.]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[Worker-constructor.html]
|
||||
expected: ERROR
|
|
@ -1,4 +1,5 @@
|
|||
[003.html]
|
||||
expected: ERROR
|
||||
[shared]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
expected: FAIL
|
||||
|
||||
[Opening a blob URL in a new window immediately before revoking it works.]
|
||||
expected: FAIL
|
||||
expected: TIMEOUT
|
||||
|
||||
[Opening a blob URL in a noopener about:blank window immediately before revoking it works.]
|
||||
expected: TIMEOUT
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +0,0 @@
|
|||
[hit-test-floats-002.html]
|
||||
[Hit test float]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[background-attachment-350.html]
|
||||
expected: FAIL
|
|
@ -26,3 +26,6 @@
|
|||
[A transition with replaced keyframes animating nothing still exhibits normal reversing behavior (reversing from the base value).]
|
||||
expected: FAIL
|
||||
|
||||
[A transition with replaced kefyrames and composite 'add' exhibits normal reversing behavior, and the effect is not double counted when calculating the before change style]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[CaretPosition-001.html]
|
||||
[Element at (400, 100)]
|
||||
expected: FAIL
|
||||
|
|
@ -318,15 +318,15 @@
|
|||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
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;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -53,6 +53,3 @@
|
|||
[combined text/javascript ]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript x/x]
|
||||
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
|
||||
|
||||
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_3.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
[iframe_sandbox_popups_escaping-2.html]
|
||||
expected: CRASH
|
||||
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
|
||||
expected: TIMEOUT
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[iframe_sandbox_popups_nonescaping-1.html]
|
||||
type: testharness
|
||||
expected: CRASH
|
||||
expected: TIMEOUT
|
||||
[Check that popups from a sandboxed iframe do not escape the sandbox]
|
||||
expected: FAIL
|
||||
expected: NOTRUN
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[form-double-submit-3.html]
|
||||
[<button> should have the same double-submit protection as <input type=submit>]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[iframe_005.html]
|
||||
[document.write external script into iframe write back into parent]
|
||||
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
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
[017.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, about:blank]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[018.html]
|
||||
expected: TIMEOUT
|
||||
[origin of the script that invoked the method, javascript:]
|
||||
expected: TIMEOUT
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[WorkerGlobalScope-close.html]
|
||||
[Test sending a message after closing.]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[Worker-constructor.html]
|
||||
expected: ERROR
|
|
@ -1,5 +1,6 @@
|
|||
[003.html]
|
||||
type: testharness
|
||||
expected: ERROR
|
||||
[shared]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
// META: script=support-promises.js
|
||||
|
||||
promise_test(async t => {
|
||||
const db = await createDatabase(t, db => {
|
||||
const store = db.createObjectStore('store');
|
||||
store.createIndex('index', 'value');
|
||||
store.put({value: 1}, 1);
|
||||
store.put({value: 2}, 2);
|
||||
store.put({value: 3}, 3);
|
||||
});
|
||||
|
||||
{
|
||||
// Iterate over all index entries until an upper bound is reached.
|
||||
// On each record found, increment the value used as the index
|
||||
// key, which will make it show again up later in the iteration.
|
||||
const tx = db.transaction('store', 'readwrite');
|
||||
const range = IDBKeyRange.upperBound(9);
|
||||
const index = tx.objectStore('store').index('index');
|
||||
const request = index.openCursor(range);
|
||||
request.onsuccess = t.step_func(e => {
|
||||
const cursor = e.target.result;
|
||||
if (!cursor)
|
||||
return;
|
||||
|
||||
const record = cursor.value;
|
||||
record.value += 1;
|
||||
cursor.update(record);
|
||||
|
||||
cursor.continue();
|
||||
});
|
||||
|
||||
await promiseForTransaction(t, tx);
|
||||
}
|
||||
|
||||
{
|
||||
const tx = db.transaction('store', 'readonly');
|
||||
const results = await promiseForRequest(t, tx.objectStore('store').getAll());
|
||||
assert_array_equals(
|
||||
results.map(record => record.value),
|
||||
[10, 10, 10],
|
||||
'Values should all be incremented until bound reached');
|
||||
}
|
||||
}, 'Index cursor - indexed values updated during iteration');
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that display member plus media feature is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#display-member" />
|
||||
<link rel="help" href="https://w3c.github.io/manifest/#the-display-mode-media-feature" />
|
||||
<link rel="manifest" href="display-member-media-feature.webmanifest" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<h1>Testing support for display member plus media feature</h1>
|
||||
<style>
|
||||
.fail {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
@media all and (display-mode: standalone) {
|
||||
body {
|
||||
background-color: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const standalone = matchMedia("(display-mode: standalone)");
|
||||
|
||||
standalone.onchange = () => {
|
||||
if (standalone.matches) {
|
||||
document.body.classList.remove("fail");
|
||||
}
|
||||
}
|
||||
|
||||
if (!standalone.matches) {
|
||||
document.body.classList.add("fail");
|
||||
}
|
||||
</script>
|
||||
<p>
|
||||
To pass, the background color must be green after installing.
|
||||
</p>
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"display": "standalone"
|
||||
}
|
BIN
tests/wpt/web-platform-tests/appmanifest/icons-member/fail.png
Normal file
BIN
tests/wpt/web-platform-tests/appmanifest/icons-member/fail.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that icons member is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#icons-member" />
|
||||
<link rel="manifest" href="icons-member-last-matching.webmanifest" />
|
||||
<h1>Testing support for icons member</h1>
|
||||
<p>
|
||||
To pass, the icon must show a white check mark on a green background.
|
||||
</p>
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"icons": [{
|
||||
"src": "fail.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
}, {
|
||||
"src": "pass.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
}]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that icons member is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#icons-member" />
|
||||
<link rel="manifest" href="icons-member.webmanifest" />
|
||||
<h1>Testing support for icons member</h1>
|
||||
<p>
|
||||
To pass, the icon should must a white check mark on a green background.
|
||||
</p>
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that icons member is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#icons-member" />
|
||||
<link rel="manifest" href="icons-member-next-appropriate.webmanifest" />
|
||||
<h1>Testing support for icons member</h1>
|
||||
<p>
|
||||
To pass, the icon must show a white check mark on a green background.
|
||||
</p>
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"icons": [{
|
||||
"src": "pass.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
}, {
|
||||
"src": "icons-member-manual.html",
|
||||
"sizes": "256x256"
|
||||
}]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"icons": [{
|
||||
"src": "pass.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
}]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
BIN
tests/wpt/web-platform-tests/appmanifest/icons-member/pass.png
Normal file
BIN
tests/wpt/web-platform-tests/appmanifest/icons-member/pass.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that orientation member with landscape value is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#orientation-member" />
|
||||
<link rel="manifest" href="orientation-member-landscape.webmanifest" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<h1>Testing support for orientation member with "landscape" value</h1>
|
||||
<style>
|
||||
@media all and (orientation: landscape) {
|
||||
body {
|
||||
background-color: green;
|
||||
}
|
||||
}
|
||||
@media all and (orientation: portrait) {
|
||||
body {
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<p>
|
||||
Please set the phone orientation to portrait.
|
||||
</p>
|
||||
<p>
|
||||
To pass, after installing the display orientation must be landscape and the background must be green.
|
||||
</p>
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"display": "standalone",
|
||||
"orientation": "landscape"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that orientation member with portrait value is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#orientation-member" />
|
||||
<link rel="manifest" href="orientation-member-portrait.webmanifest" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<h1>Testing support for orientation member with "portrait" value</h1>
|
||||
<style>
|
||||
@media all and (orientation: portrait) {
|
||||
body {
|
||||
background-color: green;
|
||||
}
|
||||
}
|
||||
@media all and (orientation: landscape) {
|
||||
body {
|
||||
background-color: red;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<p>
|
||||
Please set the phone orientation to landscape.
|
||||
</p>
|
||||
<p>
|
||||
To pass, after installing the display orientation must be portrait and the background must be green.
|
||||
</p>
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"display": "standalone",
|
||||
"orientation": "portrait"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that theme_color member is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#theme_color-member" />
|
||||
<link rel="manifest" href="theme_color-member-red.webmanifest" />
|
||||
<link rel="manifest" href="theme_color-member-hsl.webmanifest" />
|
||||
<h1>Testing support for theme_name member</h1>
|
||||
<p>
|
||||
To pass, the theme_color should be red.
|
||||
To pass, the theme_color must be green.
|
||||
</p>
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"theme_color": "hsl(120 100% 50%)"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that theme_color member is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#theme_color-member" />
|
||||
<link rel="manifest" href="theme_color-member-named.webmanifest" />
|
||||
<h1>Testing support for theme_name member</h1>
|
||||
<p>
|
||||
To pass, the theme_color must be green.
|
||||
</p>
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"theme_color": "green"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"theme_color": "red"
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that theme_color member is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#theme_color-member" />
|
||||
<link rel="manifest" href="theme_color-member-rgb.webmanifest" />
|
||||
<h1>Testing support for theme_name member</h1>
|
||||
<p>
|
||||
To pass, the theme_color must be green.
|
||||
</p>
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"theme_color": "rgb(0 255 0)"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that theme_color member is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#theme_color-member" />
|
||||
<link rel="manifest" href="theme_color-member-rgbhex3.webmanifest" />
|
||||
<h1>Testing support for theme_name member</h1>
|
||||
<p>
|
||||
To pass, the theme_color must be green.
|
||||
</p>
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"theme_color": "#0F0"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that theme_color member is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#theme_color-member" />
|
||||
<link rel="manifest" href="theme_color-member-rgbhex6.webmanifest" />
|
||||
<h1>Testing support for theme_name member</h1>
|
||||
<p>
|
||||
To pass, the theme_color must be green.
|
||||
</p>
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"theme_color": "#00FF00"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Test that theme_color member is supported</title>
|
||||
<link rel="help" href="https://w3c.github.io/manifest#theme_color-member" />
|
||||
<link rel="manifest" href="theme_color-member-rgblegacy.webmanifest" />
|
||||
<h1>Testing support for theme_name member</h1>
|
||||
<p>
|
||||
To pass, the theme_color must be green.
|
||||
</p>
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"theme_color": "rgb(0, 255, 0)"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Content-Type: application/manifest+json; charset=utf-8
|
|
@ -7,6 +7,7 @@ function get_host_info() {
|
|||
var HTTP_PORT = '{{ports[http][0]}}';
|
||||
var HTTP_PORT2 = '{{ports[http][1]}}';
|
||||
var HTTPS_PORT = '{{ports[https][0]}}';
|
||||
var HTTPS_PORT2 = '{{ports[https][1]}}';
|
||||
var PROTOCOL = self.location.protocol;
|
||||
var IS_HTTPS = (PROTOCOL == "https:");
|
||||
var HTTP_PORT_ELIDED = HTTP_PORT == "80" ? "" : (":" + HTTP_PORT);
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<!doctype html>
|
||||
<html class="reftest-wait">
|
||||
<title>CSS Animations Test: Cancel animation for target moving out of flat tree and style invalidation</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-animations/#eventdef-animationevent-animationcancel">
|
||||
<link rel="help" href="https://crbug.com/1093747">
|
||||
<link rel="match" href="../reference/pass_if_pass_below.html">
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<style>
|
||||
@keyframes anim {
|
||||
from { color: red; }
|
||||
to { color: green; }
|
||||
}
|
||||
#anim { animation: anim 100s; }
|
||||
.none { display: none; }
|
||||
</style>
|
||||
<p>Test passes if there is the word "PASS" below.</p>
|
||||
<div id="host"><span id="anim">FAIL</span></div>
|
||||
<div id="dirty" class="none">PASS</div>
|
||||
<script>
|
||||
const root = host.attachShadow({mode:"open"});
|
||||
root.innerHTML = "<slot />";
|
||||
requestAnimationFrame(() => {
|
||||
root.firstChild.name = "skip-slot";
|
||||
dirty.className = "";
|
||||
takeScreenshot();
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,63 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
|
||||
<title>CSS Background and Borders Test: 'background-attachment: local' and 'overflow: hidden'</title>
|
||||
|
||||
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
|
||||
<link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-attachment">
|
||||
<link rel="match" href="reference/ref-if-there-is-no-red.xht">
|
||||
|
||||
<!--
|
||||
|
||||
More info:
|
||||
|
||||
Re: [css3-background] background-attachment: local
|
||||
http://lists.w3.org/Archives/Public/www-style/2013May/0542.html
|
||||
|
||||
-->
|
||||
|
||||
<meta content="" name="flags">
|
||||
<meta content="This test checks that when an element has 'background-attachment: local', then the background image is fixed with regard to what is the element's scrollable area and not to its viewport. In this test, what would be the scrollable area for the div element is where the red square is and such area is clipped due to 'overflow: hidden'." name="assert">
|
||||
|
||||
<style>
|
||||
div
|
||||
{
|
||||
background-attachment: local;
|
||||
background-image: url("support/100x100-red.png");
|
||||
background-position: bottom right;
|
||||
background-repeat: no-repeat;
|
||||
font-size: 100px;
|
||||
line-height: 1;
|
||||
height: 100px;
|
||||
overflow: hidden;
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
|
||||
<p>Test passes if there is <strong>no red</strong>.
|
||||
|
||||
<div id="target"> <br> </div>
|
||||
|
||||
<!--
|
||||
|
||||
+-----------------------+
|
||||
|+----------+ |
|
||||
|| +------+ | |
|
||||
|| | red | | | <-- bottom right of scrolling box
|
||||
|| |square| | | when background-image dimensions
|
||||
|| | | | | are the same as the element's
|
||||
|| +------+ | | viewport dimensions
|
||||
+----------+ |
|
||||
| |
|
||||
| |
|
||||
| +------+|
|
||||
| | red || <-- bottom right of scrollable area
|
||||
| |square|| which is outside of the viewport
|
||||
| | || area and which is clipped due
|
||||
| +------+| to 'overflow: hidden'
|
||||
+-----------------------+
|
||||
|
||||
-->
|
Binary file not shown.
After Width: | Height: | Size: 510 B |
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE HTML>
|
||||
|
||||
<h2>Test counter(list-item), using generated content</h2>
|
||||
|
||||
<div style="float: left; width: 200px">
|
||||
|
||||
Ordered lists
|
||||
|
||||
<ol>
|
||||
<li>1 a 1</li>
|
||||
<li>2 b 2</li>
|
||||
<li>3 c 3</li>
|
||||
</ol>
|
||||
|
||||
<ol>
|
||||
<li value="30">30 a 30</li>
|
||||
<li value="31">31 b 31</li>
|
||||
<li value="32">32 c 32</li>
|
||||
</ol>
|
||||
|
||||
<ol>
|
||||
<li>1 a 1</li>
|
||||
<li>2 b 2</li>
|
||||
<li value="30">30 c 30</li>
|
||||
<li value="31">31 d 31</li>
|
||||
<li value="35">35 e 35</li>
|
||||
<li value="36">36 f 36</li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="float: left; width: 200px">
|
||||
|
||||
Reversed ordered lists
|
||||
|
||||
<ol>
|
||||
<li value="3">3 a 3</li>
|
||||
<li value="2">2 b 2</li>
|
||||
<li value="1">1 c 1</li>
|
||||
</ol>
|
||||
|
||||
<ol>
|
||||
<li value="30">30 a 30</li>
|
||||
<li value="29">29 b 29</li>
|
||||
<li value="28">28 c 28</li>
|
||||
</ol>
|
||||
|
||||
<ol>
|
||||
<li value="6">6 a 6</li>
|
||||
<li value="5">5 b 5</li>
|
||||
<li value="30">30 c 30</li>
|
||||
<li value="29">29 d 29</li>
|
||||
<li value="35">35 e 35</li>
|
||||
<li value="34">34 f 34</li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="float: left; width: 200px">
|
||||
|
||||
Unordered lists
|
||||
|
||||
<ul>
|
||||
<li>1 a 1</li>
|
||||
<li>2 b 2</li>
|
||||
<li>3 c 3</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>1 a 1</li>
|
||||
<li>2 b 2</li>
|
||||
<li>30 c 30</li>
|
||||
<li>31 d 31</li>
|
||||
<li>35 e 35</li>
|
||||
<li>36 f 36</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,89 @@
|
|||
<!DOCTYPE HTML>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-lists/#list-item-counter">
|
||||
<link rel="match" href="counter-list-item-ref.html">
|
||||
|
||||
<style>
|
||||
li:before {
|
||||
content: counter(list-item) " ";
|
||||
}
|
||||
li:after {
|
||||
content: " " counter(list-item);
|
||||
}
|
||||
</style>
|
||||
|
||||
<h2>Test counter(list-item), using generated content</h2>
|
||||
|
||||
<div style="float: left; width: 200px">
|
||||
|
||||
Ordered lists
|
||||
|
||||
<ol>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li>c</li>
|
||||
</ol>
|
||||
|
||||
<ol start="30">
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li>c</li>
|
||||
</ol>
|
||||
|
||||
<ol>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li value="30">c</li>
|
||||
<li>d</li>
|
||||
<li value="35">e</li>
|
||||
<li>f</li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="float: left; width: 200px">
|
||||
|
||||
Reversed ordered lists
|
||||
|
||||
<ol reversed>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li>c</li>
|
||||
</ol>
|
||||
|
||||
<ol start="30" reversed>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li>c</li>
|
||||
</ol>
|
||||
|
||||
<ol reversed>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li value="30">c</li>
|
||||
<li>d</li>
|
||||
<li value="35">e</li>
|
||||
<li>f</li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
|
||||
<div style="float: left; width: 200px">
|
||||
|
||||
Unordered lists
|
||||
|
||||
<ul>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li>c</li>
|
||||
</ul>
|
||||
|
||||
<ul>
|
||||
<li>a</li>
|
||||
<li>b</li>
|
||||
<li value="30">c</li>
|
||||
<li>d</li>
|
||||
<li value="35">e</li>
|
||||
<li>f</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
|
@ -1,4 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<meta name="viewport" content="user-scalable=no"/>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-type" />
|
||||
<meta name="viewport" content="user-scalable=no">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap/#scroll-snap-type" />
|
||||
|
||||
<meta name="viewport" content="user-scalable=no">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-type" />
|
||||
<meta name="viewport" content="user-scalable=no">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
Adding a scrollable element should make it start capturing snap points.
|
||||
</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap/#captures-snap-positions"/>
|
||||
<meta name="viewport" content="user-scalable=no">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
scrollable), then its currently captured snap areas must be reassigned.
|
||||
</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap/#captures-snap-positions"/>
|
||||
<meta name="viewport" content="user-scalable=no">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Decoration Test: text-underline-offset matches offsets for variable font underline metrics</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#underline-offset">
|
||||
<meta name="assert" content="text-underline-offset in pixels matches variable metrics">
|
||||
<link rel="author" title="Dominik Röttsches" href="mailto:drott@chromium.org">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: underline-variable;
|
||||
src: url(../resources/UnderlineTest-VF.ttf);
|
||||
}
|
||||
|
||||
.test {
|
||||
text-underline-position: from-font;
|
||||
font-size: 64px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.close_underline {
|
||||
text-decoration: underline;
|
||||
font-family: underline-variable, sans-serif;
|
||||
font-variation-settings: 'UNDO' 200;
|
||||
}
|
||||
|
||||
.far_underline {
|
||||
text-decoration: underline;
|
||||
font-family: underline-variable, sans-serif;
|
||||
font-variation-settings: 'UNDO' 1000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if the underlines match the reference.</p>
|
||||
<div class="test"><span class="close_underline">aagaa</span></div>
|
||||
<div class="test"><span class="far_underline">aagaa</span></div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,79 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Decoration Test: Offset on decorating element</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property"/>
|
||||
<meta name="assert" content="text-underline-offsets affects all decorations originating from this element."/>
|
||||
<link rel="author" title="Dominik Röttsches" href="mailto:drott@chromium.org"/>
|
||||
<style>
|
||||
.test {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.underline {
|
||||
text-decoration: underline;
|
||||
text-underline-position: from-font;
|
||||
}
|
||||
|
||||
.offset_outer_9 {
|
||||
text-underline-offset: 90px;
|
||||
text-decoration-color: #ff3366;
|
||||
}
|
||||
.offset_outer_8 {
|
||||
text-underline-offset: 80px;
|
||||
text-decoration-color: #ff6633;
|
||||
}
|
||||
|
||||
.offset_outer_7 {
|
||||
text-underline-offset: 70px;
|
||||
text-decoration-color: #FFCC33;
|
||||
}
|
||||
|
||||
.offset_outer_6 {
|
||||
text-underline-offset: 60px;
|
||||
text-decoration-color: #33FF66;
|
||||
}
|
||||
|
||||
.offset_outer_5 {
|
||||
text-underline-offset: 50px;
|
||||
text-decoration-color: #33FFCC;
|
||||
}
|
||||
|
||||
.offset_outer_4 {
|
||||
text-underline-offset: 40px;
|
||||
text-decoration-color: #33CCFF;
|
||||
}
|
||||
|
||||
.offset_outer_3 {
|
||||
text-underline-offset: 30px;
|
||||
text-decoration-color: #3366FF;
|
||||
}
|
||||
|
||||
.offset_outer_2 {
|
||||
text-underline-offset: 20px;
|
||||
text-decoration-color: #6633FF;
|
||||
}
|
||||
|
||||
.offset_outer_1 {
|
||||
text-underline-offset: 10px;
|
||||
text-decoration-color: #CC33FF;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if there is one more underline under each X, growing up in steps, with red being the furthest away
|
||||
and a single one, purple being the closest with 8 other underlines under it.</p>
|
||||
<div class="test">
|
||||
<span class="underline offset_outer_9">X<span class="underline offset_outer_8">X<span class="underline offset_outer_7">X<span class="underline offset_outer_6">X<span class="underline offset_outer_5">X<span class="underline offset_outer_4">X<span class="underline offset_outer_3">X<span class="underline offset_outer_2">X<span class="underline offset_outer_1">X</span></span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Text Decoration Test: text-underline-offset matches offsets for variable font underline metrics</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#underline-offset">
|
||||
<meta name="assert" content="text-underline-offset in pixels matches variable metrics">
|
||||
<link rel="author" title="Dominik Röttsches" href="mailto:drott@chromium.org">
|
||||
<link rel="match" href="reference/text-underline-offset-variable-ref.html">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: underline-variable;
|
||||
src: url(resources/UnderlineTest-VF.ttf);
|
||||
}
|
||||
|
||||
.test {
|
||||
text-underline-position: from-font;
|
||||
font-size: 64px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.close_underline {
|
||||
text-decoration: underline;
|
||||
font-family: underline-variable, sans-serif;
|
||||
text-underline-offset: -2.5px;
|
||||
}
|
||||
|
||||
.far_underline {
|
||||
text-decoration: underline;
|
||||
font-family: underline-variable, sans-serif;
|
||||
text-underline-offset: 4.6px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if the underlines match the reference.</p>
|
||||
<div class="test"><span class="close_underline">aagaa</span></div>
|
||||
<div class="test"><span class="far_underline">aagaa</span></div>
|
||||
</body>
|
||||
</html>
|
|
@ -112,26 +112,25 @@ test(t => {
|
|||
|
||||
div.style.left = '0px';
|
||||
getComputedStyle(div).transitionProperty;
|
||||
div.style.transition = 'left 100s';
|
||||
div.style.transition = 'left 100s ease-in';
|
||||
div.style.left = '100px';
|
||||
|
||||
const transition = div.getAnimations()[0];
|
||||
|
||||
// Seek to the middle and get the portion.
|
||||
//
|
||||
// We deliberately DON'T set transition-timing-function to linear so that we
|
||||
// can test that it is applied correctly.
|
||||
// Seek to the middle. Note, this is not equivalent to 50% progress since the
|
||||
// timing-function is non-linear.
|
||||
transition.currentTime = 50 * MS_PER_SEC;
|
||||
const portion = transition.effect.getComputedTiming().progress;
|
||||
|
||||
// Reverse transition
|
||||
// Reverse the transition.
|
||||
div.style.left = '0px';
|
||||
const reversedTransition = div.getAnimations()[0];
|
||||
|
||||
// If the transition reversing behavior does not advange the previous transition
|
||||
// to the time set by currentTime, start and end values will both be 0px and
|
||||
// no transition will be produced.
|
||||
assert_not_equals(reversedTransition, undefined, "A reversed transition is produced");
|
||||
// If the transition reversing behavior does not advance the previous
|
||||
// transition to the time set by currentTime, start and end values will both
|
||||
// be 0px and no transition will be produced.
|
||||
assert_not_equals(reversedTransition, undefined,
|
||||
"A reversed transition is produced");
|
||||
|
||||
const expectedDuration = 100 * MS_PER_SEC * portion;
|
||||
assert_approx_equals(
|
||||
|
@ -140,6 +139,7 @@ test(t => {
|
|||
1,
|
||||
"The reversed transition has correctly reduced duration"
|
||||
);
|
||||
}, "Transition reversing behavior respects currentTime and uses the transition's current position.");
|
||||
}, "Transition reversing behavior respects currentTime and uses the " +
|
||||
"transition's current position.");
|
||||
|
||||
</script>
|
||||
|
|
|
@ -90,7 +90,7 @@ promise_test(async t => {
|
|||
const new_transition = div.getAnimations()[0];
|
||||
await new_transition.ready;
|
||||
|
||||
assert_equals(getComputedStyle(div).left, '0px');
|
||||
assert_equals(getComputedStyle(div).left, '100px');
|
||||
}, 'After setting a transition\'s effect to null, a new transition can be started');
|
||||
|
||||
// This is a regression test for https://crbug.com/992668, where Chromium would
|
||||
|
|
|
@ -96,18 +96,21 @@ retarget_test("A transition with replaced keyframes animating nothing " +
|
|||
|
||||
test(t => {
|
||||
const div = addDiv(t);
|
||||
// initial conditions
|
||||
|
||||
// Initialize the style.
|
||||
div.style.left = '100px';
|
||||
div.style.top = '100px';
|
||||
div.style.transition = 'left 100s linear, top 100s linear';
|
||||
getComputedStyle(div).left;
|
||||
|
||||
// start some transitions
|
||||
// Start some transitions.
|
||||
div.style.left ='200px';
|
||||
div.style.top = '200px';
|
||||
const transitions = div.getAnimations();
|
||||
|
||||
// hand control of the left property over to top's transition
|
||||
// Hand control of the left property over to top's transition. The composite
|
||||
// ordering of the animations is 'left' then 'top' since the transitions were
|
||||
// generated in the same transition generation and follow Unicode ordering.
|
||||
assert_equals(transitions[0].transitionProperty, 'left');
|
||||
transitions[0].effect.setKeyframes({});
|
||||
transitions[1].effect.setKeyframes([
|
||||
|
@ -115,26 +118,60 @@ test(t => {
|
|||
{left: '400px', top: '200px'}])
|
||||
getComputedStyle(div).left;
|
||||
|
||||
// these form a single style change, equivalent to setting times and then setting left
|
||||
// These updates form a single style change, equivalent to setting times and
|
||||
// then setting left.
|
||||
transitions[0].currentTime = 50 * MS_PER_SEC;
|
||||
div.style.left ='100px';
|
||||
transitions[1].currentTime = 60 * MS_PER_SEC;
|
||||
|
||||
const reversedTransition = div.getAnimations()[1]
|
||||
// As there was a style change event, the new 'left' transition now has a
|
||||
// higher value for the transition generation than the 'top' transition,
|
||||
// reversing the order of the transitions returned by getAnimations.
|
||||
const reversedTransition = div.getAnimations()[1];
|
||||
assert_equals(reversedTransition.transitionProperty, 'left',
|
||||
"A reversed transition on left is produced");
|
||||
|
||||
assert_approx_equals(
|
||||
reversedTransition.effect.getComputedTiming().activeDuration,
|
||||
50 * MS_PER_SEC, 1,
|
||||
"The reversed transition has correctly reduced duration (based on the original left transition)."
|
||||
);
|
||||
"The reversed transition has correctly reduced duration (based on the " +
|
||||
"original left transition).");
|
||||
|
||||
assert_equals(reversedTransition.effect.getKeyframes()[0].left, '280px',
|
||||
"The reversed transition gets its start value from the other transition controlling left");
|
||||
"The reversed transition gets its start value from the other " +
|
||||
"transition controlling left");
|
||||
|
||||
}, "A transition with replaced keyframes animating nothing on a property being controlled by another " +
|
||||
"modified transition exhibits normal reversing behavior and reverses from the other " +
|
||||
"transition's current value.");
|
||||
}, "A transition with replaced keyframes animating nothing on a property " +
|
||||
"being controlled by another modified transition exhibits normal " +
|
||||
"reversing behavior and reverses from the other transition's current " +
|
||||
"value.");
|
||||
|
||||
test(t => {
|
||||
const div = addDiv(t);
|
||||
|
||||
// Initialize the style.
|
||||
div.style.left = '100px';
|
||||
div.style.transition = 'left 100s linear';
|
||||
getComputedStyle(div).left;
|
||||
|
||||
// Start the transtion.
|
||||
div.style.left ='200px';
|
||||
const transition = div.getAnimations()[0];
|
||||
|
||||
// Update the keyframes and advance to the midpoint of the animation.
|
||||
transition.effect.setKeyframes([
|
||||
{ offset: 0, left: '-50px', composite: 'add', easing: 'linear'}]);
|
||||
transition.currentTime = 50 * MS_PER_SEC;
|
||||
assert_equals(getComputedStyle(div).left, '175px',
|
||||
'The computed style is based on the updated keyframes');
|
||||
|
||||
div.style.left = '100px';
|
||||
const reversedTransition = div.getAnimations()[0];
|
||||
assert_equals(reversedTransition.effect.getKeyframes()[0].left, '175px',
|
||||
'The start value matches the \'before change\' value');
|
||||
|
||||
}, 'A transition with replaced kefyrames and composite \'add\' exhibits ' +
|
||||
'normal reversing behavior, and the effect is not double counted when ' +
|
||||
'calculating the before change style');
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<!DOCTYPE HTML>
|
||||
<meta name="viewport" content="user-scalable=no">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<title>Check End Position of scrollIntoView of shadow elements</title>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE HTML>
|
||||
<title>scrollIntoView on an SVG shape element</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview">
|
||||
<meta name="viewport" content="user-scalable=no">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<svg width="8000" height="8000">
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<script>
|
||||
function createRangeWithUnparentedContainerOfSingleElement() {
|
||||
const range = document.createRange();
|
||||
const container = document.createElement("container");
|
||||
const element = document.createElement("element");
|
||||
container.appendChild(element);
|
||||
range.selectNode(element);
|
||||
return range;
|
||||
}
|
||||
function nestRangeInOuterContainer(range) {
|
||||
range.startContainer.ownerDocument.createElement("outer").appendChild(range.startContainer);
|
||||
}
|
||||
function moveNodeToNewlyCreatedDocumentWithAppendChild(node) {
|
||||
document.implementation.createDocument(null, null).appendChild(node);
|
||||
}
|
||||
|
||||
//Tests removing only element
|
||||
test(()=>{
|
||||
const range = createRangeWithUnparentedContainerOfSingleElement();
|
||||
range.startContainer.removeChild(range.startContainer.firstChild);
|
||||
assert_equals(range.endOffset, 0);
|
||||
}, "Range in document: Removing the only element in the range must collapse the range");
|
||||
|
||||
|
||||
//Tests removing only element after parented container moved to another document
|
||||
test(()=>{
|
||||
const range = createRangeWithUnparentedContainerOfSingleElement();
|
||||
nestRangeInOuterContainer(range);
|
||||
moveNodeToNewlyCreatedDocumentWithAppendChild(range.startContainer);
|
||||
assert_equals(range.endOffset, 0);
|
||||
}, "Parented range container moved to another document with appendChild: Moving the element to the other document must collapse the range");
|
||||
|
||||
//Tests removing only element after parentless container moved oo another document
|
||||
test(()=>{
|
||||
const range = createRangeWithUnparentedContainerOfSingleElement();
|
||||
moveNodeToNewlyCreatedDocumentWithAppendChild(range.startContainer);
|
||||
range.startContainer.removeChild(range.startContainer.firstChild);
|
||||
assert_equals(range.endOffset, 0);
|
||||
}, "Parentless range container moved to another document with appendChild: Removing the only element in the range must collapse the range");
|
||||
|
||||
//Tests removing only element after parentless container of container moved to another document
|
||||
test(()=>{
|
||||
const range = createRangeWithUnparentedContainerOfSingleElement();
|
||||
nestRangeInOuterContainer(range);
|
||||
moveNodeToNewlyCreatedDocumentWithAppendChild(range.startContainer.parentNode);
|
||||
range.startContainer.removeChild(range.startContainer.firstChild);
|
||||
assert_equals(range.endOffset, 0);
|
||||
}, "Range container's parentless container moved to another document with appendChild: Removing the only element in the range must collapse the range");
|
||||
</script>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue