mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
Update web-platform-tests to revision 6087baf4a83e7953112242be9fd6e719797ebdf6
This commit is contained in:
parent
3c19cd49ec
commit
6c2d26eb4b
76 changed files with 3020 additions and 345 deletions
|
@ -98,15 +98,26 @@ tasks:
|
|||
each(browser):
|
||||
$map:
|
||||
- name: wpt-${browser.name}-${browser.channel}-stability
|
||||
checkout: FETCH_HEAD
|
||||
diff_range: HEAD^
|
||||
description: >-
|
||||
Verify that all tests affected by a pull request are stable
|
||||
when executed in ${browser.name}.
|
||||
extra_args: '--verify'
|
||||
- name: wpt-${browser.name}-${browser.channel}-results
|
||||
checkout: FETCH_HEAD
|
||||
diff_range: HEAD^
|
||||
description: >-
|
||||
Collect results for all tests affected by a pull request in
|
||||
${browser.name}.
|
||||
extra_args: '--no-fail-on-unexpected --log-wptreport=../artifacts/wpt_report.json'
|
||||
- name: wpt-${browser.name}-${browser.channel}-results-without-changes
|
||||
checkout: FETCH_HEAD^
|
||||
diff_range: FETCH_HEAD
|
||||
description: >-
|
||||
Collect results for all tests affected by a pull request in
|
||||
${browser.name} but without the changes in the PR.
|
||||
extra_args: '--no-fail-on-unexpected --log-wptreport=../artifacts/wpt_report.json'
|
||||
each(operation):
|
||||
taskId: {$eval: 'as_slugid(operation.name)'}
|
||||
taskGroupId: {$eval: 'as_slugid("task group")'}
|
||||
|
@ -125,7 +136,7 @@ tasks:
|
|||
owner: ${event.pull_request.user.login}@users.noreply.github.com
|
||||
source: ${event.repository.url}
|
||||
payload:
|
||||
image: hexcles/web-platform-tests:0.23
|
||||
image: harjgam/web-platform-tests:0.25
|
||||
maxRunTime: 7200
|
||||
artifacts:
|
||||
public/results:
|
||||
|
@ -145,12 +156,12 @@ tasks:
|
|||
~/start.sh
|
||||
${event.repository.clone_url}
|
||||
refs/pull/${event.number}/merge
|
||||
FETCH_HEAD
|
||||
${operation.checkout}
|
||||
${browser.name}
|
||||
${browser.channel};
|
||||
cd ~/web-platform-tests;
|
||||
./tools/ci/taskcluster-run.py
|
||||
--commit-range HEAD^
|
||||
--commit-range ${operation.diff_range}
|
||||
${browser.name}
|
||||
--
|
||||
--channel=${browser.channel}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
*/
|
||||
|
||||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, async db => {
|
||||
await createBooksStore(testCase, db);
|
||||
const db = await createDatabase(testCase, db => {
|
||||
createBooksStore(testCase, db);
|
||||
});
|
||||
const txn = db.transaction(['books'], 'readwrite');
|
||||
const objectStore = txn.objectStore('books');
|
||||
|
@ -43,7 +43,7 @@ promise_test(async testCase => {
|
|||
|
||||
// Upgrade the versionDB database and explicitly commit its versionchange
|
||||
// transaction.
|
||||
db = await migrateDatabase(testCase, 2, async (db, txn) => {
|
||||
db = await migrateDatabase(testCase, 2, (db, txn) => {
|
||||
txn.commit();
|
||||
});
|
||||
assert_equals(2, db.version,
|
||||
|
@ -55,8 +55,8 @@ promise_test(async testCase => {
|
|||
|
||||
|
||||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, async db => {
|
||||
await createBooksStore(testCase, db);
|
||||
const db = await createDatabase(testCase, db => {
|
||||
createBooksStore(testCase, db);
|
||||
});
|
||||
const txn = db.transaction(['books'], 'readwrite');
|
||||
const objectStore = txn.objectStore('books');
|
||||
|
@ -69,8 +69,8 @@ promise_test(async testCase => {
|
|||
|
||||
|
||||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, async db => {
|
||||
await createBooksStore(testCase, db);
|
||||
const db = await createDatabase(testCase, db => {
|
||||
createBooksStore(testCase, db);
|
||||
});
|
||||
const txn = db.transaction(['books'], 'readwrite');
|
||||
const objectStore = txn.objectStore('books');
|
||||
|
@ -88,8 +88,8 @@ promise_test(async testCase => {
|
|||
|
||||
|
||||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, async db => {
|
||||
await createBooksStore(testCase, db);
|
||||
const db = await createDatabase(testCase, db => {
|
||||
createBooksStore(testCase, db);
|
||||
});
|
||||
const txn = db.transaction(['books'], 'readwrite');
|
||||
const objectStore = txn.objectStore('books');
|
||||
|
@ -110,8 +110,8 @@ promise_test(async testCase => {
|
|||
|
||||
|
||||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, async db => {
|
||||
await createBooksStore(testCase, db);
|
||||
const db = await createDatabase(testCase, db => {
|
||||
createBooksStore(testCase, db);
|
||||
});
|
||||
const txn = db.transaction(['books'], 'readwrite');
|
||||
const objectStore = txn.objectStore('books');
|
||||
|
@ -124,8 +124,8 @@ promise_test(async testCase => {
|
|||
|
||||
|
||||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, async db => {
|
||||
await createBooksStore(testCase, db);
|
||||
const db = await createDatabase(testCase, db => {
|
||||
createBooksStore(testCase, db);
|
||||
});
|
||||
const txn = db.transaction(['books'], 'readwrite');
|
||||
const objectStore = txn.objectStore('books');
|
||||
|
@ -138,8 +138,8 @@ promise_test(async testCase => {
|
|||
|
||||
|
||||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, async db => {
|
||||
await createBooksStore(testCase, db);
|
||||
const db = await createDatabase(testCase, db => {
|
||||
createBooksStore(testCase, db);
|
||||
});
|
||||
const txn = db.transaction(['books'], 'readwrite');
|
||||
const objectStore = txn.objectStore('books');
|
||||
|
@ -162,8 +162,8 @@ promise_test(async testCase => {
|
|||
|
||||
|
||||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, async db => {
|
||||
await createBooksStore(testCase, db);
|
||||
const db = await createDatabase(testCase, db => {
|
||||
createBooksStore(testCase, db);
|
||||
});
|
||||
const txn = db.transaction(['books'], 'readwrite');
|
||||
const objectStore = txn.objectStore('books');
|
||||
|
@ -179,3 +179,79 @@ promise_test(async testCase => {
|
|||
releaseTxnFunction();
|
||||
db.close();
|
||||
}, 'Calling txn.commit() when txn is inactive should throw.');
|
||||
|
||||
|
||||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, db => {
|
||||
createBooksStore(testCase, db);
|
||||
createNotBooksStore(testCase, db);
|
||||
});
|
||||
// Txn1 should commit before txn2, even though txn2 uses commit().
|
||||
const txn1 = db.transaction(['books'], 'readwrite');
|
||||
const objectStore1 = txn1.objectStore('books');
|
||||
const putRequest1 = objectStore1.put({isbn:'one', title:'title1'});
|
||||
const releaseTxnFunction = keepAlive(testCase, txn1, 'books');
|
||||
|
||||
const txn2 = db.transaction(['books'], 'readwrite');
|
||||
const objectStore2 = txn2.objectStore('books');
|
||||
const putRequest2 = objectStore2.put({isbn:'one', title:'title2'});
|
||||
txn2.commit();
|
||||
|
||||
// Exercise the IndexedDB transaction ordering by executing one with a
|
||||
// different scope.
|
||||
const txn3 = db.transaction(['not_books'], 'readwrite');
|
||||
const objectStore3 = txn3.objectStore('not_books');
|
||||
objectStore3.put({'title': 'not_title'}, 'key');
|
||||
txn3.oncomplete = function() {
|
||||
releaseTxnFunction();
|
||||
}
|
||||
await Promise.all([promiseForTransaction(testCase, txn1),
|
||||
promiseForTransaction(testCase, txn2)]);
|
||||
|
||||
// Read the data back to verify that txn2 executed last.
|
||||
const txn4 = db.transaction(['books'], 'readonly');
|
||||
const objectStore4 = txn4.objectStore('books');
|
||||
const getRequest4 = objectStore4.get('one');
|
||||
await promiseForTransaction(testCase, txn4);
|
||||
assert_equals(getRequest4.result.title, 'title2');
|
||||
db.close();
|
||||
}, 'Transactions with same scope should stay in program order, even if one '
|
||||
+ 'calls commit.');
|
||||
|
||||
|
||||
promise_test(async testCase => {
|
||||
const db = await createDatabase(testCase, db => {
|
||||
createBooksStore(testCase, db);
|
||||
});
|
||||
// Txn1 creates the book 'one' so the 'add()' below fails.
|
||||
const txn1 = db.transaction(['books'], 'readwrite');
|
||||
const objectStore1 = txn1.objectStore('books');
|
||||
const putRequest1 = objectStore1.add({isbn:'one', title:'title1'});
|
||||
txn1.commit();
|
||||
await promiseForTransaction(testCase, txn1);
|
||||
|
||||
// Txn2 should abort, because the 'add' call is invalid, and commit() was
|
||||
// called.
|
||||
const txn2 = db.transaction(['books'], 'readwrite');
|
||||
const objectStore2 = txn2.objectStore('books');
|
||||
objectStore2.put({isbn:'two', title:'title2'});
|
||||
const addRequest2 = objectStore2.add({isbn:'one', title:'title2'});
|
||||
txn2.commit();
|
||||
txn2.oncomplete = assert_unreached(
|
||||
'Transaction with invalid "add" call should not be completed.');
|
||||
|
||||
var addWatcher = requestWatcher(testCase, addRequest2);
|
||||
var txnWatcher = transactionWatcher(testCase, txn2);
|
||||
await Promise.all([addWatcher.wait_for('error'),
|
||||
txnWatcher.wait_for('error', 'abort')]);
|
||||
|
||||
// Read the data back to verify that txn2 was aborted.
|
||||
const txn3 = db.transaction(['books'], 'readonly');
|
||||
const objectStore3 = txn3.objectStore('books');
|
||||
const getRequest1 = objectStore3.get('one');
|
||||
const getRequest2 = objectStore3.count('two');
|
||||
await promiseForTransaction(testCase, txn3);
|
||||
assert_equals(getRequest1.result.title, 'title1');
|
||||
assert_equals(getRequest2.result, 0);
|
||||
db.close();
|
||||
}, 'Transactions that explicitly commit and have errors should abort.');
|
||||
|
|
|
@ -40,7 +40,7 @@ function performChromiumSetup() {
|
|||
}
|
||||
return loadScripts([
|
||||
`${prefix}/mojo_bindings.js`,
|
||||
`${prefix}/mojo_layouttest_test.mojom.js`,
|
||||
`${prefix}/mojo_web_test_helper_test.mojom.js`,
|
||||
`${prefix}/uuid.mojom.js`,
|
||||
`${prefix}/fake_bluetooth.mojom.js`,
|
||||
`${prefix}/fake_bluetooth_chooser.mojom.js`,
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta http-equiv="content-security-policy" content="script-src 'self' 'nonce-abc'">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<iframe src="support/frame-with-csp.sub.html?csp=script-src%20'self'%20'unsafe-inline'"></iframe>
|
||||
<script nonce='abc'>
|
||||
var t = async_test("Should not have executed the javascript url");
|
||||
const iframe = document.querySelector("iframe");
|
||||
iframe.addEventListener('load', () => {
|
||||
window.onmessage = t.step_func(function(e) {
|
||||
if (e.data == "executed")
|
||||
assert_true(false, "Javascript url executed");
|
||||
});
|
||||
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||
assert_equals(e.blockedURI, 'inline');
|
||||
}));
|
||||
iframe.contentWindow.location.href = 'javascript:parent.postMessage(\'executed\', \'*\')'
|
||||
});
|
||||
</script>
|
||||
</body>
|
|
@ -1,6 +1,7 @@
|
|||
<!doctype html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior">
|
||||
|
||||
<style>
|
||||
.outer {
|
|
@ -0,0 +1,73 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="htb-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
width: 400px;
|
||||
margin: 16px 0;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,73 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="htb-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
width: 400px;
|
||||
margin: 16px 0;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
.container {
|
||||
background: green;
|
||||
height: 16px;
|
||||
border: solid black 3px;
|
||||
width: 400px;
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
.large { height: 32px; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container large"></div>
|
|
@ -0,0 +1,73 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="htb-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
width: 400px;
|
||||
margin: 16px 0;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,73 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="htb-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
width: 400px;
|
||||
margin: 16px 0;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="vlr-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
body { writing-mode: vertical-lr; }
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
height: 400px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="vlr-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
body { writing-mode: vertical-lr; }
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
height: 400px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
body { writing-mode: vertical-lr; }
|
||||
.container {
|
||||
background: green;
|
||||
width: 16px;
|
||||
border: solid black 3px;
|
||||
height: 400px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
|
||||
.large { width: 32px; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container large"></div>
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="vlr-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
body { writing-mode: vertical-lr; }
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
height: 400px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="vlr-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
body { writing-mode: vertical-lr; }
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
height: 400px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="vrl-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
body { writing-mode: vertical-rl; }
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
height: 400px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="vrl-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
body { writing-mode: vertical-rl; }
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
height: 400px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container ltr indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
body { writing-mode: vertical-rl; }
|
||||
.container {
|
||||
background: green;
|
||||
width: 16px;
|
||||
border: solid black 3px;
|
||||
height: 400px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
|
||||
.large { width: 32px; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container"></div>
|
||||
|
||||
<div class="container large"></div>
|
||||
|
||||
<div class="container large"></div>
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="vrl-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
body { writing-mode: vertical-rl; }
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
height: 400px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="ltr cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="ltr">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css2/visudet.html#abs-non-replaced-width" />
|
||||
<link rel="match" href="vrl-ref.html">
|
||||
<meta name="assert" content="This test checks the static position of an out of flow absolute positioned element, under various conditions." />
|
||||
<style>
|
||||
body { writing-mode: vertical-rl; }
|
||||
.container {
|
||||
position: relative;
|
||||
background: green;
|
||||
color: green;
|
||||
font: 16px/1 Ahem;
|
||||
border: solid black 3px;
|
||||
height: 400px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
.red { color: red; }
|
||||
.cb { position: relative; }
|
||||
.rtl { direction: rtl; }
|
||||
.ltr { direction: ltr; }
|
||||
.inline { display: inline; }
|
||||
.abs { position: absolute; }
|
||||
|
||||
.indent { text-indent: 20px; }
|
||||
* { text-indent: initial; }
|
||||
</style>
|
||||
|
||||
There should be no red.
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
XXX<span class="rtl cb">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs inline">XXXXX</div><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
||||
|
||||
<div class="container rtl indent">
|
||||
<span class="cb">XXX<span class="rtl">XX<div class="abs block">XXXXX</div><br><span class="red">XXXXX</span></span></span>
|
||||
</div>
|
|
@ -23,7 +23,7 @@
|
|||
top: 100px;
|
||||
}
|
||||
.box2outside {
|
||||
background: #000080;
|
||||
background: #000088;
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
|
@ -31,7 +31,7 @@
|
|||
top: 150px;
|
||||
}
|
||||
.box2inside {
|
||||
background: #8040ff;
|
||||
background: #773bff;
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
left: 50px;
|
||||
top: 50px;
|
||||
backdrop-filter: invert(1);
|
||||
opacity: 0.5;
|
||||
background: blue;
|
||||
background: #00f8;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>backdrop-filter: Basic operation of filter with opacity</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<p>Expected: Just a single grey box.</p>
|
||||
</div>
|
||||
<div class="colorbox"></div>
|
||||
|
||||
|
||||
<style>
|
||||
.colorbox {
|
||||
position: absolute;
|
||||
background: #808080;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
left: 10px;
|
||||
top: 100px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>backdrop-filter: Basic operation of filter with opacity</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="backdrop-filter-basic-opacity-2-ref.html">
|
||||
|
||||
<div>
|
||||
<p>Expected: Just a single grey box.</p>
|
||||
</div>
|
||||
<div class="box colorbox"></div>
|
||||
<div class="box filterbox"></div>
|
||||
|
||||
<style>
|
||||
.box {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
left: 10px;
|
||||
top: 100px;
|
||||
}
|
||||
.colorbox {
|
||||
background: green;
|
||||
}
|
||||
.filterbox {
|
||||
backdrop-filter: invert(1);
|
||||
opacity: 0.5;
|
||||
/* An invert backdrop-filter with opacity 0.5 should always give a grey
|
||||
result. It will always mix the background color with its inverse, in
|
||||
equal proportion.*/
|
||||
}
|
||||
</style>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
<title>backdrop-filter: Clip the filter at border box of element</title>
|
||||
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="backdrop-filter-paint-order-ref.html">
|
||||
<link rel="match" href="backdrop-filter-clip-rect-ref.html">
|
||||
|
||||
<div>
|
||||
<p>Expected: A green box, blurred inside the short, wide white box with a<br>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
|
||||
<div class="box"></div>
|
||||
<div style="position:absolute;top:100px;">
|
||||
<div style="position:absolute;top:100px;will-change:transform;">
|
||||
<p>Expected above: A pure white box with a blue border.<br>
|
||||
No dark/black should be observed within the white box.</p>
|
||||
</div>
|
||||
|
@ -20,6 +20,5 @@
|
|||
left: 0px;
|
||||
border: 1px solid blue;
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<link rel="match" href="backdrop-filter-edge-pixels-ref.html">
|
||||
|
||||
<div class="box"></div>
|
||||
<div style="position:absolute;top:100px;">
|
||||
<div style="position:absolute;top:100px;will-change:transform;">
|
||||
<p>Expected above: A pure white box with a blue border.<br>
|
||||
No dark/black should be observed within the white box.</p>
|
||||
</div>
|
||||
|
|
|
@ -5,28 +5,31 @@
|
|||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="backdrop-filter-isolation-ref.html">
|
||||
|
||||
<div class="outside">
|
||||
<div class="stacking-context">
|
||||
<div class="filter">
|
||||
<div>
|
||||
<p>Expected: Two green boxes overlapped by a yellow box. The overlapped region<br>
|
||||
of the right-hand box ONLY should be inverted (pink).</p>
|
||||
</div>
|
||||
<div class="box outside">
|
||||
<div class="box stacking-context">
|
||||
<div class="box filter">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<style>
|
||||
div {
|
||||
.box {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: green;
|
||||
}
|
||||
.outside {
|
||||
top: 10px;
|
||||
top: 110px;
|
||||
left: 10px;
|
||||
}
|
||||
.stacking-context {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
top: 110px;
|
||||
left: 130px;
|
||||
}
|
||||
.filter {
|
||||
|
@ -34,9 +37,8 @@ div {
|
|||
height: 160px;
|
||||
top: 30px;
|
||||
left: -90px;
|
||||
opacity: 0.3;
|
||||
backdrop-filter: invert(1);
|
||||
background: yellow;
|
||||
background: #ff08;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -5,23 +5,26 @@
|
|||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="backdrop-filter-isolation-ref.html">
|
||||
|
||||
<div class="outside">
|
||||
<div class="stacking-context">
|
||||
<div class="filter">
|
||||
<div>
|
||||
<p>Expected: Two green boxes overlapped by a yellow box. The overlapped region<br>
|
||||
of the right-hand box ONLY should be inverted (pink).</p>
|
||||
</div>
|
||||
<div class="box outside">
|
||||
<div class="box stacking-context">
|
||||
<div class="box filter">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<style>
|
||||
div {
|
||||
.box {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: green;
|
||||
}
|
||||
.outside {
|
||||
top: 10px;
|
||||
top: 110px;
|
||||
left: 10px;
|
||||
}
|
||||
.stacking-context {
|
||||
|
@ -34,9 +37,8 @@ div {
|
|||
height: 160px;
|
||||
top: 30px;
|
||||
left: -90px;
|
||||
opacity: 0.3;
|
||||
backdrop-filter: invert(1);
|
||||
background: yellow;
|
||||
background: #ff08;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -5,23 +5,26 @@
|
|||
|
||||
|
||||
|
||||
<div class="outside">
|
||||
<div class="stacking-context">
|
||||
<div class="filter">
|
||||
<div>
|
||||
<p>Expected: Two green boxes overlapped by a yellow box. The overlapped region<br>
|
||||
of the right-hand box ONLY should be inverted (pink).</p>
|
||||
</div>
|
||||
<div class="box outside">
|
||||
<div class="box stacking-context">
|
||||
<div class="box filter">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="background:#ffa5b2;width:70px;height:70px;top:40px;left:130px;"></div>
|
||||
|
||||
<div class="box overlay"></div>
|
||||
<style>
|
||||
div {
|
||||
.box {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: green;
|
||||
}
|
||||
.outside {
|
||||
top: 10px;
|
||||
top: 110px;
|
||||
left: 10px;
|
||||
}
|
||||
.stacking-context {
|
||||
|
@ -34,9 +37,15 @@ div {
|
|||
height: 160px;
|
||||
top: 30px;
|
||||
left: -90px;
|
||||
opacity: 0.3;
|
||||
will-change: transform;
|
||||
background: yellow;
|
||||
background: #ff08;
|
||||
}
|
||||
.overlay {
|
||||
background:#ffc377;
|
||||
width:70px;
|
||||
height:70px;
|
||||
top:140px;
|
||||
left:130px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -5,23 +5,26 @@
|
|||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
|
||||
<link rel="match" href="backdrop-filter-isolation-ref.html">
|
||||
|
||||
<div class="outside">
|
||||
<div class="stacking-context">
|
||||
<div class="filter">
|
||||
<div>
|
||||
<p>Expected: Two green boxes overlapped by a yellow box. The overlapped region<br>
|
||||
of the right-hand box ONLY should be inverted (pink).</p>
|
||||
</div>
|
||||
<div class="box outside">
|
||||
<div class="box stacking-context">
|
||||
<div class="box filter">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<style>
|
||||
div {
|
||||
.box {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: green;
|
||||
}
|
||||
.outside {
|
||||
top: 10px;
|
||||
top: 110px;
|
||||
left: 10px;
|
||||
}
|
||||
.stacking-context {
|
||||
|
@ -34,9 +37,8 @@ div {
|
|||
height: 160px;
|
||||
top: 30px;
|
||||
left: -90px;
|
||||
opacity: 0.3;
|
||||
backdrop-filter: invert(1);
|
||||
background: yellow;
|
||||
background: #ff08;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -3,16 +3,19 @@
|
|||
// (https://github.com/tidoust/reffy-reports)
|
||||
// Source: Event Timing API (https://wicg.github.io/event-timing/)
|
||||
|
||||
[Exposed=Window]
|
||||
interface PerformanceEventTiming : PerformanceEntry {
|
||||
readonly attribute DOMHighResTimeStamp processingStart;
|
||||
readonly attribute DOMHighResTimeStamp processingEnd;
|
||||
readonly attribute boolean cancelable;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
interface EventCounts {
|
||||
readonly maplike<DOMString, unsigned long>;
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
partial interface Performance {
|
||||
readonly attribute EventCounts eventCounts;
|
||||
[SameObject] readonly attribute EventCounts eventCounts;
|
||||
};
|
||||
|
|
|
@ -30,9 +30,13 @@ partial interface Navigator {
|
|||
|
||||
typedef (DOMString or ArrayBuffer or NFCMessage) NFCMessageSource;
|
||||
|
||||
[Constructor(), SecureContext, Exposed=Window]
|
||||
interface NFCWriter {
|
||||
Promise<void> push(NFCMessageSource message, optional NFCPushOptions options);
|
||||
};
|
||||
|
||||
[SecureContext]
|
||||
interface NFC {
|
||||
Promise<void> push(NFCMessageSource message, optional NFCPushOptions options);
|
||||
Promise<void> watch(MessageCallback callback, optional NFCWatchOptions options);
|
||||
};
|
||||
|
||||
|
|
|
@ -75,22 +75,22 @@ enum RTCIceGatheringState {
|
|||
};
|
||||
|
||||
enum RTCPeerConnectionState {
|
||||
"closed",
|
||||
"failed",
|
||||
"disconnected",
|
||||
"new",
|
||||
"connecting",
|
||||
"connected",
|
||||
"disconnected",
|
||||
"failed",
|
||||
"closed"
|
||||
"connected"
|
||||
};
|
||||
|
||||
enum RTCIceConnectionState {
|
||||
"closed",
|
||||
"failed",
|
||||
"disconnected",
|
||||
"new",
|
||||
"checking",
|
||||
"connected",
|
||||
"completed",
|
||||
"disconnected",
|
||||
"failed",
|
||||
"closed"
|
||||
"connected"
|
||||
};
|
||||
|
||||
[ Constructor(optional RTCConfiguration configuration), Exposed=Window]
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>SourceBuffer handling of invalid codecs in the initialization segment</title>
|
||||
<link rel="author" title="Alicia Boya García" href="mailto:aboya@igalia.com">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="mediasource-util.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
function testInvalidCodec(test, mediaElement, mediaSource, mediaType, url) {
|
||||
assert_true(MediaSource.isTypeSupported(mediaType), `Media type not supported in this browser: isTypeSupported('${mediaType}')`);
|
||||
|
||||
MediaSourceUtil.loadBinaryData(test, url, (mediaData) => {
|
||||
_testInvalidCodecWithData(test, mediaElement, mediaSource, mediaType, mediaData);
|
||||
});
|
||||
}
|
||||
|
||||
function _testInvalidCodecWithData(test, mediaElement, mediaSource, mediaType, mediaData) {
|
||||
const sourceBuffer = mediaSource.addSourceBuffer(mediaType);
|
||||
sourceBuffer.appendBuffer(mediaData);
|
||||
test.expectEvent(sourceBuffer, 'error', 'Append ended with error');
|
||||
test.waitForExpectedEvents(() => {
|
||||
test.done();
|
||||
})
|
||||
}
|
||||
|
||||
// These test cases provide a typical media MIME type, but the actual files have been mangled to declare a different,
|
||||
// unsupported, fictitious codec (MP4 fourcc: 'zzzz', WebM codec id 'V_ZZZ'). The browser should report a parsing
|
||||
// error.
|
||||
|
||||
mediasource_test((test, mediaElement, mediaSource) => {
|
||||
testInvalidCodec(test, mediaElement, mediaSource, 'video/mp4;codecs="avc1.4D4001"', 'mp4/invalid-codec.mp4');
|
||||
}, 'Test an MP4 with an invalid codec results in an error.');
|
||||
|
||||
mediasource_test((test, mediaElement, mediaSource) => {
|
||||
testInvalidCodec(test, mediaElement, mediaSource, 'video/webm; codecs="vp8"', 'webm/invalid-codec.webm');
|
||||
}, 'Test a WebM with an invalid codec results in an error.');
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
BIN
tests/wpt/web-platform-tests/media-source/mp4/invalid-codec.mp4
Normal file
BIN
tests/wpt/web-platform-tests/media-source/mp4/invalid-codec.mp4
Normal file
Binary file not shown.
Binary file not shown.
|
@ -41,6 +41,10 @@ function onload_test() {
|
|||
const entry = entries[1];
|
||||
test_equals(entry.fetchStart, entry.connectStart, 'connectStart and fetchStart should be the same');
|
||||
test_equals(entry.fetchStart, entry.connectEnd, 'connectEnd and fetchStart should be the same');
|
||||
test_equals(entry.fetchStart, entry.secureConnectionStart, 'secureConnectStart and fetchStart should be the same');
|
||||
test_equals(entry.fetchStart, entry.domainLookupStart, 'domainLookupStart and fetchStart should be the same')
|
||||
test_equals(entry.fetchStart, entry.domainLookupEnd, 'domainLookupEnd and fetchStart should be the same')
|
||||
|
||||
}
|
||||
|
||||
done();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
'use strict';
|
||||
|
||||
(function() {
|
||||
var mojomId = 'content/test/data/mojo_layouttest_test.mojom';
|
||||
var mojomId = 'content/test/data/mojo_web_test_helper_test.mojom';
|
||||
if (mojo.internal.isMojomLoaded(mojomId)) {
|
||||
console.warn('The following mojom is loaded multiple times: ' + mojomId);
|
||||
return;
|
||||
|
@ -23,23 +23,23 @@
|
|||
|
||||
|
||||
|
||||
function MojoLayoutTestHelper_Reverse_Params(values) {
|
||||
function MojoWebTestHelper_Reverse_Params(values) {
|
||||
this.initDefaults_();
|
||||
this.initFields_(values);
|
||||
}
|
||||
|
||||
|
||||
MojoLayoutTestHelper_Reverse_Params.prototype.initDefaults_ = function() {
|
||||
MojoWebTestHelper_Reverse_Params.prototype.initDefaults_ = function() {
|
||||
this.message = null;
|
||||
};
|
||||
MojoLayoutTestHelper_Reverse_Params.prototype.initFields_ = function(fields) {
|
||||
MojoWebTestHelper_Reverse_Params.prototype.initFields_ = function(fields) {
|
||||
for(var field in fields) {
|
||||
if (this.hasOwnProperty(field))
|
||||
this[field] = fields[field];
|
||||
}
|
||||
};
|
||||
|
||||
MojoLayoutTestHelper_Reverse_Params.validate = function(messageValidator, offset) {
|
||||
MojoWebTestHelper_Reverse_Params.validate = function(messageValidator, offset) {
|
||||
var err;
|
||||
err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -53,7 +53,7 @@
|
|||
return err;
|
||||
|
||||
|
||||
// validate MojoLayoutTestHelper_Reverse_Params.message
|
||||
// validate MojoWebTestHelper_Reverse_Params.message
|
||||
err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
@ -61,40 +61,40 @@
|
|||
return validator.validationError.NONE;
|
||||
};
|
||||
|
||||
MojoLayoutTestHelper_Reverse_Params.encodedSize = codec.kStructHeaderSize + 8;
|
||||
MojoWebTestHelper_Reverse_Params.encodedSize = codec.kStructHeaderSize + 8;
|
||||
|
||||
MojoLayoutTestHelper_Reverse_Params.decode = function(decoder) {
|
||||
MojoWebTestHelper_Reverse_Params.decode = function(decoder) {
|
||||
var packed;
|
||||
var val = new MojoLayoutTestHelper_Reverse_Params();
|
||||
var val = new MojoWebTestHelper_Reverse_Params();
|
||||
var numberOfBytes = decoder.readUint32();
|
||||
var version = decoder.readUint32();
|
||||
val.message = decoder.decodeStruct(codec.String);
|
||||
return val;
|
||||
};
|
||||
|
||||
MojoLayoutTestHelper_Reverse_Params.encode = function(encoder, val) {
|
||||
MojoWebTestHelper_Reverse_Params.encode = function(encoder, val) {
|
||||
var packed;
|
||||
encoder.writeUint32(MojoLayoutTestHelper_Reverse_Params.encodedSize);
|
||||
encoder.writeUint32(MojoWebTestHelper_Reverse_Params.encodedSize);
|
||||
encoder.writeUint32(0);
|
||||
encoder.encodeStruct(codec.String, val.message);
|
||||
};
|
||||
function MojoLayoutTestHelper_Reverse_ResponseParams(values) {
|
||||
function MojoWebTestHelper_Reverse_ResponseParams(values) {
|
||||
this.initDefaults_();
|
||||
this.initFields_(values);
|
||||
}
|
||||
|
||||
|
||||
MojoLayoutTestHelper_Reverse_ResponseParams.prototype.initDefaults_ = function() {
|
||||
MojoWebTestHelper_Reverse_ResponseParams.prototype.initDefaults_ = function() {
|
||||
this.reversed = null;
|
||||
};
|
||||
MojoLayoutTestHelper_Reverse_ResponseParams.prototype.initFields_ = function(fields) {
|
||||
MojoWebTestHelper_Reverse_ResponseParams.prototype.initFields_ = function(fields) {
|
||||
for(var field in fields) {
|
||||
if (this.hasOwnProperty(field))
|
||||
this[field] = fields[field];
|
||||
}
|
||||
};
|
||||
|
||||
MojoLayoutTestHelper_Reverse_ResponseParams.validate = function(messageValidator, offset) {
|
||||
MojoWebTestHelper_Reverse_ResponseParams.validate = function(messageValidator, offset) {
|
||||
var err;
|
||||
err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
|
||||
if (err !== validator.validationError.NONE)
|
||||
|
@ -108,7 +108,7 @@
|
|||
return err;
|
||||
|
||||
|
||||
// validate MojoLayoutTestHelper_Reverse_ResponseParams.reversed
|
||||
// validate MojoWebTestHelper_Reverse_ResponseParams.reversed
|
||||
err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
|
||||
if (err !== validator.validationError.NONE)
|
||||
return err;
|
||||
|
@ -116,62 +116,62 @@
|
|||
return validator.validationError.NONE;
|
||||
};
|
||||
|
||||
MojoLayoutTestHelper_Reverse_ResponseParams.encodedSize = codec.kStructHeaderSize + 8;
|
||||
MojoWebTestHelper_Reverse_ResponseParams.encodedSize = codec.kStructHeaderSize + 8;
|
||||
|
||||
MojoLayoutTestHelper_Reverse_ResponseParams.decode = function(decoder) {
|
||||
MojoWebTestHelper_Reverse_ResponseParams.decode = function(decoder) {
|
||||
var packed;
|
||||
var val = new MojoLayoutTestHelper_Reverse_ResponseParams();
|
||||
var val = new MojoWebTestHelper_Reverse_ResponseParams();
|
||||
var numberOfBytes = decoder.readUint32();
|
||||
var version = decoder.readUint32();
|
||||
val.reversed = decoder.decodeStruct(codec.String);
|
||||
return val;
|
||||
};
|
||||
|
||||
MojoLayoutTestHelper_Reverse_ResponseParams.encode = function(encoder, val) {
|
||||
MojoWebTestHelper_Reverse_ResponseParams.encode = function(encoder, val) {
|
||||
var packed;
|
||||
encoder.writeUint32(MojoLayoutTestHelper_Reverse_ResponseParams.encodedSize);
|
||||
encoder.writeUint32(MojoWebTestHelper_Reverse_ResponseParams.encodedSize);
|
||||
encoder.writeUint32(0);
|
||||
encoder.encodeStruct(codec.String, val.reversed);
|
||||
};
|
||||
var kMojoLayoutTestHelper_Reverse_Name = 0;
|
||||
var kMojoWebTestHelper_Reverse_Name = 0;
|
||||
|
||||
function MojoLayoutTestHelperPtr(handleOrPtrInfo) {
|
||||
this.ptr = new bindings.InterfacePtrController(MojoLayoutTestHelper,
|
||||
function MojoWebTestHelperPtr(handleOrPtrInfo) {
|
||||
this.ptr = new bindings.InterfacePtrController(MojoWebTestHelper,
|
||||
handleOrPtrInfo);
|
||||
}
|
||||
|
||||
function MojoLayoutTestHelperAssociatedPtr(associatedInterfacePtrInfo) {
|
||||
function MojoWebTestHelperAssociatedPtr(associatedInterfacePtrInfo) {
|
||||
this.ptr = new associatedBindings.AssociatedInterfacePtrController(
|
||||
MojoLayoutTestHelper, associatedInterfacePtrInfo);
|
||||
MojoWebTestHelper, associatedInterfacePtrInfo);
|
||||
}
|
||||
|
||||
MojoLayoutTestHelperAssociatedPtr.prototype =
|
||||
Object.create(MojoLayoutTestHelperPtr.prototype);
|
||||
MojoLayoutTestHelperAssociatedPtr.prototype.constructor =
|
||||
MojoLayoutTestHelperAssociatedPtr;
|
||||
MojoWebTestHelperAssociatedPtr.prototype =
|
||||
Object.create(MojoWebTestHelperPtr.prototype);
|
||||
MojoWebTestHelperAssociatedPtr.prototype.constructor =
|
||||
MojoWebTestHelperAssociatedPtr;
|
||||
|
||||
function MojoLayoutTestHelperProxy(receiver) {
|
||||
function MojoWebTestHelperProxy(receiver) {
|
||||
this.receiver_ = receiver;
|
||||
}
|
||||
MojoLayoutTestHelperPtr.prototype.reverse = function() {
|
||||
return MojoLayoutTestHelperProxy.prototype.reverse
|
||||
MojoWebTestHelperPtr.prototype.reverse = function() {
|
||||
return MojoWebTestHelperProxy.prototype.reverse
|
||||
.apply(this.ptr.getProxy(), arguments);
|
||||
};
|
||||
|
||||
MojoLayoutTestHelperProxy.prototype.reverse = function(message) {
|
||||
var params = new MojoLayoutTestHelper_Reverse_Params();
|
||||
MojoWebTestHelperProxy.prototype.reverse = function(message) {
|
||||
var params = new MojoWebTestHelper_Reverse_Params();
|
||||
params.message = message;
|
||||
return new Promise(function(resolve, reject) {
|
||||
var builder = new codec.MessageV1Builder(
|
||||
kMojoLayoutTestHelper_Reverse_Name,
|
||||
codec.align(MojoLayoutTestHelper_Reverse_Params.encodedSize),
|
||||
kMojoWebTestHelper_Reverse_Name,
|
||||
codec.align(MojoWebTestHelper_Reverse_Params.encodedSize),
|
||||
codec.kMessageExpectsResponse, 0);
|
||||
builder.encodeStruct(MojoLayoutTestHelper_Reverse_Params, params);
|
||||
builder.encodeStruct(MojoWebTestHelper_Reverse_Params, params);
|
||||
var message = builder.finish();
|
||||
this.receiver_.acceptAndExpectResponse(message).then(function(message) {
|
||||
var reader = new codec.MessageReader(message);
|
||||
var responseParams =
|
||||
reader.decodeStruct(MojoLayoutTestHelper_Reverse_ResponseParams);
|
||||
reader.decodeStruct(MojoWebTestHelper_Reverse_ResponseParams);
|
||||
resolve(responseParams);
|
||||
}).catch(function(result) {
|
||||
reject(Error("Connection error: " + result));
|
||||
|
@ -179,14 +179,14 @@
|
|||
}.bind(this));
|
||||
};
|
||||
|
||||
function MojoLayoutTestHelperStub(delegate) {
|
||||
function MojoWebTestHelperStub(delegate) {
|
||||
this.delegate_ = delegate;
|
||||
}
|
||||
MojoLayoutTestHelperStub.prototype.reverse = function(message) {
|
||||
MojoWebTestHelperStub.prototype.reverse = function(message) {
|
||||
return this.delegate_ && this.delegate_.reverse && this.delegate_.reverse(message);
|
||||
}
|
||||
|
||||
MojoLayoutTestHelperStub.prototype.accept = function(message) {
|
||||
MojoWebTestHelperStub.prototype.accept = function(message) {
|
||||
var reader = new codec.MessageReader(message);
|
||||
switch (reader.messageName) {
|
||||
default:
|
||||
|
@ -194,21 +194,21 @@
|
|||
}
|
||||
};
|
||||
|
||||
MojoLayoutTestHelperStub.prototype.acceptWithResponder =
|
||||
MojoWebTestHelperStub.prototype.acceptWithResponder =
|
||||
function(message, responder) {
|
||||
var reader = new codec.MessageReader(message);
|
||||
switch (reader.messageName) {
|
||||
case kMojoLayoutTestHelper_Reverse_Name:
|
||||
var params = reader.decodeStruct(MojoLayoutTestHelper_Reverse_Params);
|
||||
case kMojoWebTestHelper_Reverse_Name:
|
||||
var params = reader.decodeStruct(MojoWebTestHelper_Reverse_Params);
|
||||
this.reverse(params.message).then(function(response) {
|
||||
var responseParams =
|
||||
new MojoLayoutTestHelper_Reverse_ResponseParams();
|
||||
new MojoWebTestHelper_Reverse_ResponseParams();
|
||||
responseParams.reversed = response.reversed;
|
||||
var builder = new codec.MessageV1Builder(
|
||||
kMojoLayoutTestHelper_Reverse_Name,
|
||||
codec.align(MojoLayoutTestHelper_Reverse_ResponseParams.encodedSize),
|
||||
kMojoWebTestHelper_Reverse_Name,
|
||||
codec.align(MojoWebTestHelper_Reverse_ResponseParams.encodedSize),
|
||||
codec.kMessageIsResponse, reader.requestID);
|
||||
builder.encodeStruct(MojoLayoutTestHelper_Reverse_ResponseParams,
|
||||
builder.encodeStruct(MojoWebTestHelper_Reverse_ResponseParams,
|
||||
responseParams);
|
||||
var message = builder.finish();
|
||||
responder.accept(message);
|
||||
|
@ -219,13 +219,13 @@
|
|||
}
|
||||
};
|
||||
|
||||
function validateMojoLayoutTestHelperRequest(messageValidator) {
|
||||
function validateMojoWebTestHelperRequest(messageValidator) {
|
||||
var message = messageValidator.message;
|
||||
var paramsClass = null;
|
||||
switch (message.getName()) {
|
||||
case kMojoLayoutTestHelper_Reverse_Name:
|
||||
case kMojoWebTestHelper_Reverse_Name:
|
||||
if (message.expectsResponse())
|
||||
paramsClass = MojoLayoutTestHelper_Reverse_Params;
|
||||
paramsClass = MojoWebTestHelper_Reverse_Params;
|
||||
break;
|
||||
}
|
||||
if (paramsClass === null)
|
||||
|
@ -233,13 +233,13 @@
|
|||
return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes());
|
||||
}
|
||||
|
||||
function validateMojoLayoutTestHelperResponse(messageValidator) {
|
||||
function validateMojoWebTestHelperResponse(messageValidator) {
|
||||
var message = messageValidator.message;
|
||||
var paramsClass = null;
|
||||
switch (message.getName()) {
|
||||
case kMojoLayoutTestHelper_Reverse_Name:
|
||||
case kMojoWebTestHelper_Reverse_Name:
|
||||
if (message.isResponse())
|
||||
paramsClass = MojoLayoutTestHelper_Reverse_ResponseParams;
|
||||
paramsClass = MojoWebTestHelper_Reverse_ResponseParams;
|
||||
break;
|
||||
}
|
||||
if (paramsClass === null)
|
||||
|
@ -247,18 +247,18 @@
|
|||
return paramsClass.validate(messageValidator, messageValidator.message.getHeaderNumBytes());
|
||||
}
|
||||
|
||||
var MojoLayoutTestHelper = {
|
||||
name: 'content.mojom.MojoLayoutTestHelper',
|
||||
var MojoWebTestHelper = {
|
||||
name: 'content.mojom.MojoWebTestHelper',
|
||||
kVersion: 0,
|
||||
ptrClass: MojoLayoutTestHelperPtr,
|
||||
proxyClass: MojoLayoutTestHelperProxy,
|
||||
stubClass: MojoLayoutTestHelperStub,
|
||||
validateRequest: validateMojoLayoutTestHelperRequest,
|
||||
validateResponse: validateMojoLayoutTestHelperResponse,
|
||||
ptrClass: MojoWebTestHelperPtr,
|
||||
proxyClass: MojoWebTestHelperProxy,
|
||||
stubClass: MojoWebTestHelperStub,
|
||||
validateRequest: validateMojoWebTestHelperRequest,
|
||||
validateResponse: validateMojoWebTestHelperResponse,
|
||||
};
|
||||
MojoLayoutTestHelperStub.prototype.validator = validateMojoLayoutTestHelperRequest;
|
||||
MojoLayoutTestHelperProxy.prototype.validator = validateMojoLayoutTestHelperResponse;
|
||||
exports.MojoLayoutTestHelper = MojoLayoutTestHelper;
|
||||
exports.MojoLayoutTestHelperPtr = MojoLayoutTestHelperPtr;
|
||||
exports.MojoLayoutTestHelperAssociatedPtr = MojoLayoutTestHelperAssociatedPtr;
|
||||
MojoWebTestHelperStub.prototype.validator = validateMojoWebTestHelperRequest;
|
||||
MojoWebTestHelperProxy.prototype.validator = validateMojoWebTestHelperResponse;
|
||||
exports.MojoWebTestHelper = MojoWebTestHelper;
|
||||
exports.MojoWebTestHelperPtr = MojoWebTestHelperPtr;
|
||||
exports.MojoWebTestHelperAssociatedPtr = MojoWebTestHelperAssociatedPtr;
|
||||
})();
|
|
@ -190,10 +190,7 @@
|
|||
|
||||
async_test("test should timeout (fail) with the default of 2 seconds").step(function(){});
|
||||
|
||||
async_test("test should timeout (fail) with a custom set timeout value of 1 second",
|
||||
{timeout:1000}).step(function(){});
|
||||
|
||||
async_test("async test that is never started, should have status Not Run", {timeout:1000});
|
||||
async_test("async test that is never started, should have status Not Run");
|
||||
|
||||
|
||||
test(function(t) {
|
||||
|
@ -344,9 +341,7 @@
|
|||
"status_string": "NOTRUN",
|
||||
"name": "async test that is never started, should have status Not Run",
|
||||
"message": null,
|
||||
"properties": {
|
||||
"timeout": 1000
|
||||
}
|
||||
"properties": {}
|
||||
},
|
||||
{
|
||||
"status_string": "PASS",
|
||||
|
@ -402,14 +397,6 @@
|
|||
"message": null,
|
||||
"properties": {}
|
||||
},
|
||||
{
|
||||
"status_string": "TIMEOUT",
|
||||
"name": "test should timeout (fail) with a custom set timeout value of 1 second",
|
||||
"message": "Test timed out",
|
||||
"properties": {
|
||||
"timeout": 1000
|
||||
}
|
||||
},
|
||||
{
|
||||
"status_string": "TIMEOUT",
|
||||
"name": "test should timeout (fail) with the default of 2 seconds",
|
||||
|
|
|
@ -1486,11 +1486,9 @@ policies and contribution forms [3].
|
|||
this.index = null;
|
||||
|
||||
this.properties = properties;
|
||||
var timeout = properties.timeout ? properties.timeout : settings.test_timeout;
|
||||
if (timeout !== null) {
|
||||
this.timeout_length = timeout * tests.timeout_multiplier;
|
||||
} else {
|
||||
this.timeout_length = null;
|
||||
this.timeout_length = settings.test_timeout;
|
||||
if (this.timeout_length !== null) {
|
||||
this.timeout_length *= tests.timeout_multiplier;
|
||||
}
|
||||
|
||||
this.message = null;
|
||||
|
|
306
tests/wpt/web-platform-tests/scroll-animations/current-time.html
Normal file
306
tests/wpt/web-platform-tests/scroll-animations/current-time.html
Normal file
|
@ -0,0 +1,306 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>ScrollTimeline current time algorithm</title>
|
||||
<link rel="help" href="https://wicg.github.io/scroll-animations/#current-time-algorithm">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script src="./resources/scrolltimeline-utils.js"></script>
|
||||
|
||||
<body></body>
|
||||
|
||||
<script>
|
||||
test(function() {
|
||||
const scroller = setupScrollTimelineTest();
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const blockScrollTimeline = new ScrollTimeline(
|
||||
{scrollSource: scroller, timeRange: scrollerSize, orientation: 'block'});
|
||||
const inlineScrollTimeline = new ScrollTimeline(
|
||||
{scrollSource: scroller, timeRange: scrollerSize, orientation: 'inline'});
|
||||
const horizontalScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'horizontal'
|
||||
});
|
||||
const verticalScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'vertical'
|
||||
});
|
||||
|
||||
// Unscrolled, all timelines should read a currentTime of 0.
|
||||
assert_equals(
|
||||
blockScrollTimeline.currentTime, 0, 'Unscrolled block timeline');
|
||||
assert_equals(
|
||||
inlineScrollTimeline.currentTime, 0, 'Unscrolled inline timeline');
|
||||
assert_equals(
|
||||
horizontalScrollTimeline.currentTime, 0,
|
||||
'Unscrolled horizontal timeline');
|
||||
assert_equals(
|
||||
verticalScrollTimeline.currentTime, 0, 'Unscrolled vertical timeline');
|
||||
|
||||
// Do some scrolling and make sure that the ScrollTimelines update.
|
||||
scroller.scrollTop = 50;
|
||||
scroller.scrollLeft = 75;
|
||||
|
||||
// As noted above timeRange is mapped such that currentTime should be the
|
||||
// scroll offset.
|
||||
assert_equals(blockScrollTimeline.currentTime, 50, 'Scrolled block timeline');
|
||||
assert_equals(
|
||||
inlineScrollTimeline.currentTime, 75, 'Scrolled inline timeline');
|
||||
assert_equals(
|
||||
horizontalScrollTimeline.currentTime, 75, 'Scrolled horizontal timeline');
|
||||
assert_equals(
|
||||
verticalScrollTimeline.currentTime, 50, 'Scrolled vertical timeline');
|
||||
}, 'currentTime calculates the correct time based on scrolled amount');
|
||||
|
||||
test(function() {
|
||||
// It is difficult to calculate the scroll offset which results in an exact
|
||||
// currentTime. Scrolling is calculated in integers which allows for the
|
||||
// possibility of rounding, and scrollbar widths differ between platforms
|
||||
// which means it is not possible to ensure a divisible scroller size. Instead
|
||||
// the scroller content is made large enough that rounding differences result
|
||||
// in negligible deltas in the output value.
|
||||
const contentOverrides = new Map([['width', '1000px'], ['height', '1000px']]);
|
||||
const scroller = setupScrollTimelineTest(new Map(), contentOverrides);
|
||||
const scrollTimeline = new ScrollTimeline(
|
||||
{scrollSource: scroller, timeRange: 100, orientation: 'block'});
|
||||
|
||||
// Mapping timeRange to 100 means the output is 'percentage scrolled', so
|
||||
// calculate where the 50% scroll mark would be.
|
||||
const halfwayY = (scroller.scrollHeight - scroller.clientHeight) / 2;
|
||||
scroller.scrollTop = halfwayY;
|
||||
|
||||
assert_approx_equals(scrollTimeline.currentTime, 50, 0.5);
|
||||
}, 'currentTime adjusts correctly for the timeRange');
|
||||
|
||||
test(function() {
|
||||
const scroller = setupScrollTimelineTest();
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const lengthScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'block',
|
||||
startScrollOffset: '20px'
|
||||
});
|
||||
const percentageScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'block',
|
||||
startScrollOffset: '20%'
|
||||
});
|
||||
const calcScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'block',
|
||||
startScrollOffset: 'calc(20% - 5px)'
|
||||
});
|
||||
|
||||
// Unscrolled all timelines should read a current time of unresolved, as the
|
||||
// current offset (0) will be less than the startScrollOffset.
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime, null,
|
||||
'Unscrolled length-based timeline');
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime, null,
|
||||
'Unscrolled percentage-based timeline');
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime, null, 'Unscrolled calc-based timeline');
|
||||
|
||||
// Check the length-based ScrollTimeline.
|
||||
scroller.scrollTop = 19;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime, null,
|
||||
'Length-based timeline before the startScrollOffset point');
|
||||
scroller.scrollTop = 20;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime, 0,
|
||||
'Length-based timeline at the startScrollOffset point');
|
||||
scroller.scrollTop = 50;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime,
|
||||
calculateCurrentTime(50, 20, scrollerSize, scrollerSize),
|
||||
'Length-based timeline after the startScrollOffsetPoint');
|
||||
|
||||
// Check the percentage-based ScrollTimeline.
|
||||
scroller.scrollTop = 0.19 * scrollerSize;
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime, null,
|
||||
'Percentage-based scroller before the startScrollOffset point');
|
||||
scroller.scrollTop = 0.20 * scrollerSize;
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime, 0,
|
||||
'Percentage-based scroller at the startScrollOffset point');
|
||||
scroller.scrollTop = 0.50 * scrollerSize;
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
scroller.scrollTop, 0.2 * scrollerSize, scrollerSize, scrollerSize),
|
||||
'Percentage-based scroller after the startScrollOffset point');
|
||||
|
||||
// Check the calc-based ScrollTimeline.
|
||||
scroller.scrollTop = 0.2 * scrollerSize - 10;
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime, null,
|
||||
'Calc-based scroller before the startScrollOffset point');
|
||||
scroller.scrollTop = 0.2 * scrollerSize - 5;
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime, 0,
|
||||
'Calc-based scroller at the startScrollOffset point');
|
||||
scroller.scrollTop = 0.2 * scrollerSize;
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
scroller.scrollTop, 0.2 * scrollerSize - 5, scrollerSize,
|
||||
scrollerSize),
|
||||
'Calc-based scroller after the startScrollOffset point');
|
||||
}, 'currentTime handles startScrollOffset correctly');
|
||||
|
||||
test(function() {
|
||||
const scroller = setupScrollTimelineTest();
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const lengthScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'block',
|
||||
endScrollOffset: (scrollerSize - 20) + 'px'
|
||||
});
|
||||
const percentageScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'block',
|
||||
endScrollOffset: '80%'
|
||||
});
|
||||
const calcScrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'block',
|
||||
endScrollOffset: 'calc(80% + 5px)'
|
||||
});
|
||||
|
||||
// Check the length-based ScrollTimeline.
|
||||
scroller.scrollTop = scrollerSize;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime, null,
|
||||
'Length-based timeline after the endScrollOffset point');
|
||||
scroller.scrollTop = scrollerSize - 20;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
scrollerSize - 20, 0, scrollerSize - 20, scrollerSize),
|
||||
'Length-based timeline at the endScrollOffset point');
|
||||
scroller.scrollTop = scrollerSize - 50;
|
||||
assert_equals(
|
||||
lengthScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
scrollerSize - 50, 0, scrollerSize - 20, scrollerSize),
|
||||
'Length-based timeline before the endScrollOffset point');
|
||||
|
||||
// Check the percentage-based ScrollTimeline.
|
||||
scroller.scrollTop = 0.81 * scrollerSize;
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime, null,
|
||||
'Percentage-based timeline after the endScrollOffset point');
|
||||
scroller.scrollTop = 0.80 * scrollerSize;
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
scroller.scrollTop, 0, 0.8 * scrollerSize, scrollerSize),
|
||||
'Percentage-based timeline at the endScrollOffset point');
|
||||
scroller.scrollTop = 0.50 * scrollerSize;
|
||||
assert_equals(
|
||||
percentageScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
scroller.scrollTop, 0, 0.8 * scrollerSize, scrollerSize),
|
||||
'Percentage-based timeline before the endScrollOffset point');
|
||||
|
||||
// Check the calc-based ScrollTimeline.
|
||||
scroller.scrollTop = 0.8 * scrollerSize + 6;
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime, null,
|
||||
'Calc-based timeline after the endScrollOffset point');
|
||||
scroller.scrollTop = 0.8 * scrollerSize + 5;
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
scroller.scrollTop, 0, 0.8 * scrollerSize + 5, scrollerSize),
|
||||
'Calc-based timeline at the endScrollOffset point');
|
||||
scroller.scrollTop = 0.5 * scrollerSize;
|
||||
assert_equals(
|
||||
calcScrollTimeline.currentTime,
|
||||
calculateCurrentTime(
|
||||
scroller.scrollTop, 0, 0.8 * scrollerSize + 5, scrollerSize),
|
||||
'Calc-based timeline before the endScrollOffset point');
|
||||
}, 'currentTime handles endScrollOffset correctly');
|
||||
|
||||
test(function() {
|
||||
const scroller = setupScrollTimelineTest();
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const scrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'block',
|
||||
startScrollOffset: '20px',
|
||||
endScrollOffset: (scrollerSize - 50) + 'px'
|
||||
});
|
||||
|
||||
scroller.scrollTop = 150;
|
||||
assert_equals(
|
||||
scrollTimeline.currentTime,
|
||||
calculateCurrentTime(150, 20, scrollerSize - 50, scrollerSize));
|
||||
}, 'currentTime handles startScrollOffset and endScrollOffset together correctly');
|
||||
|
||||
test(function() {
|
||||
const scroller = setupScrollTimelineTest();
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const scrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'block',
|
||||
startScrollOffset: '20px',
|
||||
endScrollOffset: '20px',
|
||||
});
|
||||
|
||||
scroller.scrollTop = 150;
|
||||
assert_equals(scrollTimeline.currentTime, null);
|
||||
}, 'currentTime handles startScrollOffset == endScrollOffset correctly');
|
||||
|
||||
test(function() {
|
||||
const scroller = setupScrollTimelineTest();
|
||||
// Set the timeRange such that currentTime maps directly to the value
|
||||
// scrolled. The contents and scroller are square, so it suffices to compute
|
||||
// one edge and use it for all the timelines.
|
||||
const scrollerSize = scroller.scrollHeight - scroller.clientHeight;
|
||||
|
||||
const scrollTimeline = new ScrollTimeline({
|
||||
scrollSource: scroller,
|
||||
timeRange: scrollerSize,
|
||||
orientation: 'block',
|
||||
startScrollOffset: '50px',
|
||||
endScrollOffset: '10px',
|
||||
});
|
||||
|
||||
scroller.scrollTop = 150;
|
||||
assert_equals(scrollTimeline.currentTime, null);
|
||||
}, 'currentTime handles startScrollOffset > endScrollOffset correctly');
|
||||
</script>
|
|
@ -0,0 +1,44 @@
|
|||
'use strict';
|
||||
|
||||
// Builds a generic structure that looks like:
|
||||
//
|
||||
// <div class="scroller"> // 100x100 viewport
|
||||
// <div class="contents"></div> // 500x500
|
||||
// </div>
|
||||
//
|
||||
// The |scrollerOverrides| and |contentOverrides| parameters are maps which
|
||||
// are applied to the scroller and contents style after basic setup.
|
||||
//
|
||||
// Appends the outer 'scroller' element to the document body, and returns it.
|
||||
function setupScrollTimelineTest(
|
||||
scrollerOverrides = new Map(), contentOverrides = new Map()) {
|
||||
let scroller = document.createElement('div');
|
||||
scroller.style.width = '100px';
|
||||
scroller.style.height = '100px';
|
||||
scroller.style.overflow = 'scroll';
|
||||
for (const [key, value] of scrollerOverrides) {
|
||||
scroller.style[key] = value;
|
||||
}
|
||||
|
||||
let contents = document.createElement('div');
|
||||
contents.style.width = '500px';
|
||||
contents.style.height = '500px';
|
||||
for (const [key, value] of contentOverrides) {
|
||||
contents.style[key] = value;
|
||||
}
|
||||
|
||||
scroller.appendChild(contents);
|
||||
document.body.appendChild(scroller);
|
||||
return scroller;
|
||||
}
|
||||
|
||||
// Helper method to calculate the current time, implementing only step 5 of
|
||||
// https://wicg.github.io/scroll-animations/#current-time-algorithm
|
||||
function calculateCurrentTime(
|
||||
currentScrollOffset, startScrollOffset, endScrollOffset,
|
||||
effectiveTimeRange) {
|
||||
return ((currentScrollOffset - startScrollOffset) /
|
||||
(endScrollOffset - startScrollOffset)) *
|
||||
effectiveTimeRange;
|
||||
}
|
||||
|
|
@ -1,58 +1,87 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Service Worker: CSS's base URL must be the request URL even when fetched from other URL</title>
|
||||
<title>Service Worker: CSS's base URL must be the response URL</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script src="resources/test-helpers.sub.js?pipe=sub"></script>
|
||||
<script>
|
||||
promise_test(function(t) {
|
||||
var SCOPE = 'resources/fetch-request-css-base-url-iframe.html';
|
||||
var SCRIPT = 'resources/fetch-request-css-base-url-worker.js';
|
||||
var worker;
|
||||
var testDonePromise;
|
||||
const SCOPE = 'resources/fetch-request-css-base-url-iframe.html';
|
||||
const SCRIPT = 'resources/fetch-request-css-base-url-worker.js';
|
||||
let worker;
|
||||
|
||||
return service_worker_unregister_and_register(t, SCRIPT, SCOPE)
|
||||
.then(function(registration) {
|
||||
t.add_cleanup(function() {
|
||||
return service_worker_unregister(t, SCOPE);
|
||||
});
|
||||
var signalMessage;
|
||||
function getNextMessage() {
|
||||
return new Promise(resolve => { signalMessage = resolve; });
|
||||
}
|
||||
|
||||
worker = registration.installing;
|
||||
return wait_for_state(t, worker, 'activated');
|
||||
})
|
||||
.then(function() {
|
||||
return new Promise(function(resolve) {
|
||||
var channel = new MessageChannel();
|
||||
testDonePromise = new Promise(function(resolveTestDone) {
|
||||
channel.port1.onmessage = t.step_func(function(msg) {
|
||||
if (msg.data.ready) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
var result = msg.data;
|
||||
var base = get_host_info()['HTTPS_ORIGIN'] + base_path();
|
||||
assert_equals(
|
||||
result.url,
|
||||
base + 'resources/dummy.png',
|
||||
'The base URL while loading the images referred from CSS ' +
|
||||
'must be the request URL of CSS.');
|
||||
assert_equals(
|
||||
result.referrer,
|
||||
base + 'resources/fetch-request-css-base-url-style.css',
|
||||
'While loading the image defined in CSS the referrer must ' +
|
||||
'be the request URL of CSS.');
|
||||
resolveTestDone();
|
||||
});
|
||||
});
|
||||
worker.postMessage(
|
||||
{port: channel.port2}, [channel.port2]);
|
||||
});
|
||||
})
|
||||
.then(function() { return with_iframe(SCOPE); })
|
||||
.then(function(f) {
|
||||
return testDonePromise.then(function() {
|
||||
f.remove();
|
||||
});
|
||||
});
|
||||
}, 'CSS\'s base URL must be the request URL even when fetched from other URL.');
|
||||
promise_test(async (t) => {
|
||||
const registration = await service_worker_unregister_and_register(
|
||||
t, SCRIPT, SCOPE);
|
||||
worker = registration.installing;
|
||||
await wait_for_state(t, worker, 'activated');
|
||||
}, 'global setup');
|
||||
|
||||
// Creates a test concerning the base URL of a stylesheet. It loads a
|
||||
// stylesheet from a controlled page. The stylesheet makes a subresource
|
||||
// request for an image. The service worker messages back the details of the
|
||||
// image request in order to test the base URL.
|
||||
//
|
||||
// The request URL for the stylesheet is under "resources/request-url-path/".
|
||||
// The service worker may respond in a way such that the response URL is
|
||||
// different to the request URL.
|
||||
function base_url_test(params) {
|
||||
promise_test(async (t) => {
|
||||
let frame;
|
||||
t.add_cleanup(() => {
|
||||
if (frame)
|
||||
frame.remove();
|
||||
});
|
||||
|
||||
// Ask the service worker to message this page once it gets the request
|
||||
// for the image.
|
||||
let channel = new MessageChannel();
|
||||
const sawPong = getNextMessage();
|
||||
channel.port1.onmessage = (event) => {
|
||||
signalMessage(event.data);
|
||||
};
|
||||
worker.postMessage({port:channel.port2},[channel.port2]);
|
||||
|
||||
// It sends a pong back immediately. This ping/pong protocol helps deflake
|
||||
// the test for browsers where message/fetch ordering isn't guaranteed.
|
||||
assert_equals('pong', await sawPong);
|
||||
|
||||
// Load the frame which will load the stylesheet that makes the image
|
||||
// request.
|
||||
const sawResult = getNextMessage();
|
||||
frame = await with_iframe(params.framePath);
|
||||
const result = await sawResult;
|
||||
|
||||
// Test the image request.
|
||||
const base = new URL('.', document.location).href;
|
||||
assert_equals(result.url,
|
||||
base + params.expectImageRequestPath,
|
||||
'request');
|
||||
assert_equals(result.referrer,
|
||||
base + params.expectImageRequestReferrer,
|
||||
'referrer');
|
||||
}, params.description);
|
||||
}
|
||||
|
||||
const cssFile = 'fetch-request-css-base-url-style.css';
|
||||
|
||||
base_url_test({
|
||||
framePath: SCOPE + '?fetch',
|
||||
expectImageRequestPath: 'resources/dummy.png',
|
||||
expectImageRequestReferrer: `resources/${cssFile}?fetch`,
|
||||
description: 'base URL when service worker does respondWith(fetch(responseUrl)).'});
|
||||
|
||||
base_url_test({
|
||||
framePath: SCOPE + '?newResponse',
|
||||
expectImageRequestPath: 'resources/request-url-path/dummy.png',
|
||||
expectImageRequestReferrer: `resources/request-url-path/${cssFile}?newResponse`,
|
||||
description: 'base URL when service worker does respondWith(new Response()).'});
|
||||
|
||||
// Cleanup step: this must be the last promise_test.
|
||||
promise_test(async (t) => {
|
||||
return service_worker_unregister(t, SCOPE);
|
||||
}, 'cleanup global state');
|
||||
</script>
|
||||
|
|
|
@ -1 +1,20 @@
|
|||
<link href="./fetch-request-css-base-url-style.css" rel="stylesheet" type="text/css">
|
||||
<html>
|
||||
<head>
|
||||
<title>iframe for css base url test</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// Load a stylesheet. Create it dynamically so we can construct the href URL
|
||||
// dynamically.
|
||||
const link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
// Add "request-url-path" to the path to help distinguish the request URL from
|
||||
// the response URL. Add |document.location.search| (chosen by the test main
|
||||
// page) to tell the service worker how to respond to the request.
|
||||
link.href = 'request-url-path/fetch-request-css-base-url-style.css' +
|
||||
document.location.search;
|
||||
document.head.appendChild(link);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,27 +1,45 @@
|
|||
importScripts('/common/get-host-info.sub.js');
|
||||
importScripts('test-helpers.sub.js');
|
||||
let source;
|
||||
let resolveDone;
|
||||
let done = new Promise(resolve => resolveDone = resolve);
|
||||
|
||||
var port = undefined;
|
||||
// The page messages this worker to ask for the result. Keep the worker alive
|
||||
// via waitUntil() until the result is sent.
|
||||
self.addEventListener('message', event => {
|
||||
source = event.data.port;
|
||||
source.postMessage('pong');
|
||||
event.waitUntil(done);
|
||||
});
|
||||
|
||||
self.onmessage = function(e) {
|
||||
var message = e.data;
|
||||
if ('port' in message) {
|
||||
port = message.port;
|
||||
port.postMessage({ready: true});
|
||||
}
|
||||
};
|
||||
self.addEventListener('fetch', event => {
|
||||
const url = new URL(event.request.url);
|
||||
|
||||
self.addEventListener('fetch', function(event) {
|
||||
var url = event.request.url;
|
||||
if (url.indexOf('fetch-request-css-base-url-style.css') != -1) {
|
||||
event.respondWith(fetch(
|
||||
get_host_info()['HTTPS_REMOTE_ORIGIN'] + base_path() +
|
||||
'fetch-request-css-base-url-style.css',
|
||||
{mode: 'no-cors'}));
|
||||
} else if (url.indexOf('dummy.png') != -1) {
|
||||
port.postMessage({
|
||||
url: event.request.url,
|
||||
referrer: event.request.referrer
|
||||
});
|
||||
// For the CSS file, respond in a way that may change the response URL,
|
||||
// depending on |url.search|.
|
||||
const cssPath = 'request-url-path/fetch-request-css-base-url-style.css';
|
||||
if (url.pathname.indexOf(cssPath) != -1) {
|
||||
// Respond with a different URL, deleting "request-url-path/".
|
||||
if (url.search == '?fetch') {
|
||||
event.respondWith(fetch('fetch-request-css-base-url-style.css'));
|
||||
}
|
||||
});
|
||||
// Respond with new Response().
|
||||
else if (url.search == '?newResponse') {
|
||||
const styleString = 'body { background-image: url("./dummy.png");}';
|
||||
const headers = {'content-type': 'text/css'};
|
||||
event.respondWith(new Response(styleString, headers));
|
||||
}
|
||||
}
|
||||
|
||||
// The image request indicates what the base URL of the CSS was. Message the
|
||||
// result back to the test page.
|
||||
else if (url.pathname.indexOf('dummy.png') != -1) {
|
||||
// For some reason |source| is undefined here when running the test manually
|
||||
// in Firefox. The test author experimented with both using Client
|
||||
// (event.source) and MessagePort to try to get the test to pass, but
|
||||
// failed.
|
||||
source.postMessage({
|
||||
url: event.request.url,
|
||||
referrer: event.request.referrer
|
||||
});
|
||||
resolveDone();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:h="http://www.w3.org/1999/xhtml">
|
||||
<title>Focus events are composed</title>
|
||||
<metadata>
|
||||
<h:link rel="help" href="https://svgwg.org/svg2-draft/interact.html#Focus"/>
|
||||
</metadata>
|
||||
<a id="a1" href="#"></a>
|
||||
<h:script src="/resources/testharness.js"/>
|
||||
<h:script src="/resources/testharnessreport.js"/>
|
||||
<script><![CDATA[
|
||||
async_test(t => {
|
||||
const anchor = document.getElementById("a1");
|
||||
let happened = false;
|
||||
anchor.onfocus = t.step_func(e => {
|
||||
happened = true;
|
||||
assert_equals(e.type, "focus");
|
||||
assert_true(e.composed);
|
||||
});
|
||||
anchor.focus();
|
||||
anchor.onblur = t.step_func_done(e => {
|
||||
assert_true(happened);
|
||||
assert_equals(e.type, "blur");
|
||||
assert_true(e.composed);
|
||||
});
|
||||
anchor.blur();
|
||||
}, "Focus events are composed");
|
||||
]]></script>
|
||||
</svg>
|
After Width: | Height: | Size: 992 B |
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:h="http://www.w3.org/1999/xhtml">
|
||||
<title>Focus management</title>
|
||||
<metadata>
|
||||
<h:link rel="help" href="https://svgwg.org/svg2-draft/interact.html#Focus"/>
|
||||
</metadata>
|
||||
<a id="a1" href="#"></a>
|
||||
<a id="a2" href="#"></a>
|
||||
<h:script src="/resources/testharness.js"/>
|
||||
<h:script src="/resources/testharnessreport.js"/>
|
||||
<script><![CDATA[
|
||||
var a1 = document.getElementById('a1'),
|
||||
a2 = document.getElementById('a2'),
|
||||
t1 = async_test("focusing on a focusable element fires a focus event at the element"),
|
||||
t2 = async_test("focusing on a focusable element fires a blur event at the previous focussed element");
|
||||
|
||||
a2.onfocus = t1.step_func_done(function(e){
|
||||
assert_true(e.isTrusted, "focus event is trusted");
|
||||
assert_false(e.bubbles, "focus event doesn't bubble");
|
||||
assert_false(e.cancelable, "focus event is not cancelable");
|
||||
assert_equals(document.activeElement, a2);
|
||||
});
|
||||
|
||||
a1.onblur = t2.step_func_done(function(e){
|
||||
assert_true(e.isTrusted, "blur event is trusted");
|
||||
assert_false(e.bubbles, "blur event doesn't bubble");
|
||||
assert_false(e.cancelable, "blur event is not cancelable");
|
||||
});
|
||||
|
||||
a1.focus();
|
||||
a2.focus();
|
||||
]]></script>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:h="http://www.w3.org/1999/xhtml">
|
||||
<title>SVG Test: focus - default value of tabindex</title>
|
||||
<metadata>
|
||||
<h:link rel="help" href="https://svgwg.org/svg2-draft/interact.html#Focus"/>
|
||||
</metadata>
|
||||
<a id="test1" href="#"></a>
|
||||
<rect id="test2"></rect>
|
||||
<h:script src="/resources/testharness.js"/>
|
||||
<h:script src="/resources/testharnessreport.js"/>
|
||||
<script><![CDATA[
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("test1").tabIndex, 0, "The value of tabIndex attribute should be 0.");
|
||||
}, "The default value of tabIndex attribute must be 0 for elements that are focusable");
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.getElementById("test2").tabIndex, -1, "The value of tabIndex attribute should be -1.");
|
||||
}, "The default value of tabIndex attribute must be -1 for elements that are not focusable");
|
||||
]]></script>
|
||||
</svg>
|
After Width: | Height: | Size: 983 B |
|
@ -0,0 +1 @@
|
|||
<html></html>
|
|
@ -0,0 +1,125 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:h="http://www.w3.org/1999/xhtml">
|
||||
<metadata>
|
||||
<h:link rel="help" href="https://svgwg.org/svg2-draft/interact.html#Focus"/>
|
||||
</metadata>
|
||||
<g id="default-samples">
|
||||
<!-- non-default focusable renderable element -->
|
||||
<rect></rect>
|
||||
<svg></svg>
|
||||
<!-- for compatibility with SVG Tiny 1.2 focusable attribute, user agents should treat an element with a value of true for that attribute as focusable -->
|
||||
<rect focusable="true"></rect>
|
||||
<!-- anchors need a href to be focusable -->
|
||||
<a></a>
|
||||
<a href=""></a>
|
||||
<!-- Remove default focus behaviour with focusable="false" (SVG Tiny 1.2 compatibility) -->
|
||||
<a href="" focusable="false"></a>
|
||||
<!-- iframe, and audio/video with controls are default focusable -->
|
||||
<h:iframe src="resources/blank.htm"></h:iframe>
|
||||
<h:audio controls="controls"></h:audio>
|
||||
<h:video controls="controls"></h:video>
|
||||
<!-- non-default focusable renderable element with valid tabindex -->
|
||||
<h:canvas tabindex="0"></h:canvas>
|
||||
<circle tabindex="0"></circle>
|
||||
<ellipse tabindex="0"></ellipse>
|
||||
<foreignObject tabindex="0"></foreignObject>
|
||||
<g tabindex="0"></g>
|
||||
<image tabindex="0"></image>
|
||||
<line tabindex="0"></line>
|
||||
<mesh tabindex="0"></mesh>
|
||||
<path tabindex="0"></path>
|
||||
<polygon tabindex="0"></polygon>
|
||||
<rect tabindex="0"></rect>
|
||||
<svg tabindex="0"></svg>
|
||||
<switch tabindex="0"></switch>
|
||||
<text tabindex="0">
|
||||
<textPath tabindex="0"></textPath>
|
||||
<tspan tabindex="0"></tspan>
|
||||
</text>
|
||||
<unknown tabindex="0"></unknown>
|
||||
<use tabindex="0"></use>
|
||||
<!-- never-rendered element with valid tabindex -->
|
||||
<clipPath tabindex="0"></clipPath>
|
||||
<defs tabindex="0"></defs>
|
||||
<desc tabindex="0"></desc>
|
||||
<hatch tabindex="0"></hatch>
|
||||
<linearGradient tabindex="0"></linearGradient>
|
||||
<marker tabindex="0"></marker>
|
||||
<mask tabindex="0"></mask>
|
||||
<meshgradient tabindex="0"></meshgradient>
|
||||
<metadata tabindex="0"></metadata>
|
||||
<pattern tabindex="0"></pattern>
|
||||
<radialGradient tabindex="0"></radialGradient>
|
||||
<script tabindex="0"></script>
|
||||
<style tabindex="0"></style>
|
||||
<title tabindex="0"></title>
|
||||
<symbol tabindex="0"></symbol>
|
||||
</g>
|
||||
<h:script src="/resources/testharness.js"/>
|
||||
<h:script src="/resources/testharnessreport.js"/>
|
||||
<script><![CDATA[
|
||||
var root = document.querySelector("svg");
|
||||
|
||||
test(() => {
|
||||
root.focus();
|
||||
assert_equals(document.activeElement, root);
|
||||
}, 'The document root element should be focusable.');
|
||||
|
||||
const defaultList = [
|
||||
['rect', false],
|
||||
['svg', false],
|
||||
['rect[focusable=true]', true],
|
||||
['a', false],
|
||||
['a[href]', true],
|
||||
['a[focusable=false]', false],
|
||||
['iframe', true],
|
||||
['audio[controls]', true],
|
||||
['video[controls]', true],
|
||||
['canvas[tabindex]', true],
|
||||
['circle[tabindex]', true],
|
||||
['ellipse[tabindex]', true],
|
||||
['foreignObject[tabindex]', true],
|
||||
['g[tabindex]', true],
|
||||
['image[tabindex]', true],
|
||||
['line[tabindex]', true],
|
||||
['mesh[tabindex]', true],
|
||||
['path[tabindex]', true],
|
||||
['polygon[tabindex]', true],
|
||||
['rect[tabindex]', true],
|
||||
['svg[tabindex]', true],
|
||||
['switch[tabindex]', true],
|
||||
['text[tabindex]', true],
|
||||
['textPath[tabindex]', true],
|
||||
['tspan[tabindex]', true],
|
||||
['unknown[tabindex]', true],
|
||||
['use[tabindex]', true],
|
||||
['clipPath[tabindex]', false],
|
||||
['defs[tabindex]', false],
|
||||
['desc[tabindex]', false],
|
||||
['hatch[tabindex]', false],
|
||||
['linearGradient[tabindex]', false],
|
||||
['marker[tabindex]', false],
|
||||
['mask[tabindex]', false],
|
||||
['meshgradient[tabindex]', false],
|
||||
['metadata[tabindex]', false],
|
||||
['pattern[tabindex]', false],
|
||||
['radialGradient[tabindex]', false],
|
||||
['script[tabindex]', false],
|
||||
['style[tabindex]', false],
|
||||
['title[tabindex]', false],
|
||||
['symbol[tabindex]', false],
|
||||
];
|
||||
|
||||
for (entry of defaultList) {
|
||||
test(() => {
|
||||
var element = document.querySelector('#default-samples ' + entry[0]);
|
||||
element.focus();
|
||||
if (entry[1])
|
||||
assert_equals(document.activeElement, element);
|
||||
else
|
||||
assert_not_equals(document.activeElement, element);
|
||||
}, entry[0] + ' should ' + (entry[1] ? '' : 'not ') + 'be focusable.');
|
||||
}
|
||||
]]></script>
|
||||
</svg>
|
After Width: | Height: | Size: 4.7 KiB |
|
@ -454,18 +454,20 @@ product_setup = {
|
|||
}
|
||||
|
||||
|
||||
def setup_logging(kwargs):
|
||||
def setup_logging(kwargs, default_config=None):
|
||||
import mozlog
|
||||
from wptrunner import wptrunner
|
||||
|
||||
global logger
|
||||
|
||||
# Use the grouped formatter by default where mozlog 3.9+ is installed
|
||||
if hasattr(mozlog.formatters, "GroupingFormatter"):
|
||||
default_formatter = "grouped"
|
||||
else:
|
||||
default_formatter = "mach"
|
||||
wptrunner.setup_logging(kwargs, {default_formatter: sys.stdout})
|
||||
if default_config is None:
|
||||
if hasattr(mozlog.formatters, "GroupingFormatter"):
|
||||
default_formatter = "grouped"
|
||||
else:
|
||||
default_formatter = "mach"
|
||||
default_config = {default_formatter: sys.stdout}
|
||||
wptrunner.setup_logging(kwargs, default_config)
|
||||
logger = wptrunner.logger
|
||||
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ for (const value of outOfRangeValues) {
|
|||
}
|
||||
|
||||
test(() => {
|
||||
assert_throws(new RangeError(), () => new WebAssembly.Memory({ "element": "anyfunc", "initial": 10, "maximum": 9 }));
|
||||
assert_throws(new RangeError(), () => new WebAssembly.Memory({ "initial": 10, "maximum": 9 }));
|
||||
}, "Initial value exceeds maximum");
|
||||
|
||||
test(() => {
|
||||
|
|
|
@ -0,0 +1,377 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>The effect value of a keyframe effect: Forwards-filling animations whose
|
||||
values depend on their context (target element)</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/web-animations/#calculating-computed-keyframes">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../../testcommon.js"></script>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
div.style.fontSize = '10px';
|
||||
const animation = div.animate(
|
||||
[{ marginLeft: '10em' }, { marginLeft: '20em' }],
|
||||
{ duration: 1000, fill: 'forwards' }
|
||||
);
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'200px',
|
||||
'Effect value before updating font-size'
|
||||
);
|
||||
|
||||
div.style.fontSize = '20px';
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'400px',
|
||||
'Effect value after updating font-size'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to font-size on element');
|
||||
|
||||
test(t => {
|
||||
const parentDiv = createDiv(t);
|
||||
const div = createDiv(t);
|
||||
parentDiv.appendChild(div);
|
||||
parentDiv.style.fontSize = '10px';
|
||||
|
||||
const animation = div.animate(
|
||||
[{ marginLeft: '10em' }, { marginLeft: '20em' }],
|
||||
{ duration: 1000, fill: 'forwards' }
|
||||
);
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'200px',
|
||||
'Effect value before updating font-size on parent element'
|
||||
);
|
||||
|
||||
parentDiv.style.fontSize = '20px';
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'400px',
|
||||
'Effect value after updating font-size on parent element'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to font-size on parent element');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
div.style.setProperty('--target', '100px');
|
||||
const animation = div.animate(
|
||||
[{ marginLeft: '0px' }, { marginLeft: 'var(--target)' }],
|
||||
{ duration: 1000, fill: 'forwards' }
|
||||
);
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'100px',
|
||||
'Effect value before updating variable'
|
||||
);
|
||||
|
||||
div.style.setProperty('--target', '200px');
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'200px',
|
||||
'Effect value after updating variable'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to variables on element');
|
||||
|
||||
test(t => {
|
||||
const parentDiv = createDiv(t);
|
||||
const div = createDiv(t);
|
||||
parentDiv.appendChild(div);
|
||||
|
||||
parentDiv.style.setProperty('--target', '10em');
|
||||
parentDiv.style.fontSize = '10px';
|
||||
|
||||
const animation = div.animate(
|
||||
[{ marginLeft: '0px' }, { marginLeft: 'calc(var(--target) * 2)' }],
|
||||
{ duration: 1000, fill: 'forwards' }
|
||||
);
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'200px',
|
||||
'Effect value before updating variable'
|
||||
);
|
||||
|
||||
parentDiv.style.setProperty('--target', '20em');
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'400px',
|
||||
'Effect value after updating variable'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to variables on parent element');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
const animation = div.animate(
|
||||
[{ marginLeft: '100px' }, { marginLeft: '200px' }],
|
||||
{ duration: 1000, fill: 'forwards' }
|
||||
);
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'200px',
|
||||
'Effect value before updating the animation'
|
||||
);
|
||||
|
||||
animation.effect.setKeyframes([
|
||||
{ marginLeft: '100px' },
|
||||
{ marginLeft: '300px' },
|
||||
]);
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'300px',
|
||||
'Effect value after updating the animation'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to the the animation\'s keyframes');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
div.style.marginLeft = '100px';
|
||||
const animation = div.animate(
|
||||
[{ marginLeft: '100px' }, { marginLeft: '200px' }],
|
||||
{ duration: 1000, fill: 'forwards' }
|
||||
);
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'200px',
|
||||
'Effect value before updating the animation'
|
||||
);
|
||||
|
||||
animation.effect.composite = 'add';
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'300px',
|
||||
'Effect value after updating the composite mode'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to the the animation\'s composite mode');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
const animation = div.animate(
|
||||
[{ marginLeft: '0px' }, { marginLeft: '100px' }],
|
||||
{ duration: 1000, iterations: 2, fill: 'forwards' }
|
||||
);
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'100px',
|
||||
'Effect value before updating the animation'
|
||||
);
|
||||
|
||||
animation.effect.iterationComposite = 'accumulate';
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'200px',
|
||||
'Effect value after updating the iteration composite mode'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to the the animation\'s iteration composite mode');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
div.style.marginLeft = '100px';
|
||||
const animation = div.animate(
|
||||
[{ marginLeft: '100px' }, { marginLeft: '200px' }],
|
||||
{ duration: 1000, fill: 'forwards', composite: 'add' }
|
||||
);
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'300px',
|
||||
'Effect value before updating underlying value'
|
||||
);
|
||||
|
||||
div.style.marginLeft = '200px';
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'400px',
|
||||
'Effect value after updating underlying value'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to the base value when using'
|
||||
+ ' additive animation');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
div.style.marginLeft = '100px';
|
||||
const animation = div.animate(
|
||||
[{ marginLeft: '100px' }, { marginLeft: '200px', composite: 'add' }],
|
||||
{ duration: 1000, fill: 'forwards' }
|
||||
);
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'300px',
|
||||
'Effect value before updating underlying value'
|
||||
);
|
||||
|
||||
div.style.marginLeft = '200px';
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'400px',
|
||||
'Effect value after updating underlying value'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to the base value when using'
|
||||
+ ' additive animation on a single keyframe');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
div.style.marginLeft = '0px';
|
||||
const animation = div.animate([{ marginLeft: '100px', offset: 0 }], {
|
||||
duration: 1000,
|
||||
fill: 'forwards',
|
||||
});
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'0px',
|
||||
'Effect value before updating underlying value'
|
||||
);
|
||||
|
||||
div.style.marginLeft = '200px';
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'200px',
|
||||
'Effect value after updating underlying value'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to the base value when using'
|
||||
+ ' the fill value is an implicit keyframe');
|
||||
|
||||
test(t => {
|
||||
const parentDiv = createDiv(t);
|
||||
const div = createDiv(t);
|
||||
parentDiv.appendChild(div);
|
||||
parentDiv.style.fontSize = '10px';
|
||||
div.style.marginLeft = '10em';
|
||||
// Computed underlying margin-left is 100px
|
||||
|
||||
const animation = div.animate(
|
||||
[{ marginLeft: '100px' }, { marginLeft: '200px' }],
|
||||
{ duration: 1000, fill: 'forwards', composite: 'add' }
|
||||
);
|
||||
animation.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'300px',
|
||||
'Effect value before updating font-size on parent'
|
||||
);
|
||||
|
||||
parentDiv.style.fontSize = '20px';
|
||||
// Computed underlying margin-left is now 200px
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'400px',
|
||||
'Effect value after updating font-size on parent'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to the base value via a'
|
||||
+ ' parent element');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
const animationA = div.animate(
|
||||
[{ marginLeft: '0px' }, { marginLeft: '100px' }],
|
||||
{ duration: 2000, fill: 'forwards', easing: 'step-end' }
|
||||
);
|
||||
const animationB = div.animate(
|
||||
[{ marginLeft: '100px' }, { marginLeft: '200px' }],
|
||||
{ duration: 1000, fill: 'forwards', composite: 'add' }
|
||||
);
|
||||
animationB.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'200px',
|
||||
'Effect value before updating underyling animation'
|
||||
);
|
||||
|
||||
// Go to end of the underlying animation so that it jumps to 100px
|
||||
animationA.finish();
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'300px',
|
||||
'Effect value after updating underlying animation'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to underlying animations');
|
||||
|
||||
test(t => {
|
||||
const parentDiv = createDiv(t);
|
||||
const div = createDiv(t);
|
||||
parentDiv.appendChild(div);
|
||||
|
||||
parentDiv.style.fontSize = '10px';
|
||||
|
||||
const animationA = div.animate(
|
||||
[{ marginLeft: '0px' }, { marginLeft: '10em' }],
|
||||
{ duration: 2000, fill: 'forwards', easing: 'step-start' }
|
||||
);
|
||||
const animationB = div.animate(
|
||||
[{ marginLeft: '100px' }, { marginLeft: '200px' }],
|
||||
{ duration: 1000, fill: 'forwards', composite: 'add' }
|
||||
);
|
||||
animationB.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'300px',
|
||||
'Effect value before updating parent font-size'
|
||||
);
|
||||
|
||||
parentDiv.style.fontSize = '20px';
|
||||
// At this point the underlying animation's output should jump to 200px.
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'400px',
|
||||
'Effect value after updating parent font-size'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to underlying animations via a'
|
||||
+ ' a parent element');
|
||||
|
||||
test(t => {
|
||||
const div = createDiv(t);
|
||||
const animationA = div.animate(
|
||||
[{ marginLeft: '0px' }, { marginLeft: '0px' }],
|
||||
{ duration: 2000, fill: 'forwards' }
|
||||
);
|
||||
const animationB = div.animate(
|
||||
[{ marginLeft: '100px' }, { marginLeft: '200px' }],
|
||||
{ duration: 1000, fill: 'forwards', composite: 'add' }
|
||||
);
|
||||
animationB.finish();
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'200px',
|
||||
'Effect value before updating underyling animation'
|
||||
);
|
||||
|
||||
animationA.effect.setKeyframes([
|
||||
{ marginLeft: '100px' },
|
||||
{ marginLeft: '100px' },
|
||||
]);
|
||||
|
||||
assert_equals(
|
||||
getComputedStyle(div).marginLeft,
|
||||
'300px',
|
||||
'Effect value after updating underlying animation'
|
||||
);
|
||||
}, 'Filling effect values reflect changes to underlying animations made by'
|
||||
+ ' directly changing the keyframes');
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -155,11 +155,6 @@
|
|||
}));
|
||||
}, 'addTrack(): Media stream stats references track stats');
|
||||
|
||||
// TODO(hbos): addStream() is legacy API not in the spec. Based on discussion
|
||||
// whether to standardize in legacy section, consider removing this test or
|
||||
// keeping it until addTrack() has wide support.
|
||||
// https://github.com/w3c/webrtc-pc/issues/1705
|
||||
// https://github.com/w3c/webrtc-pc/issues/1125
|
||||
async_test(t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc.close());
|
||||
|
@ -170,7 +165,8 @@
|
|||
track = tracks[0];
|
||||
stream = streams[0];
|
||||
stream.addTrack(track);
|
||||
pc.addStream(stream);
|
||||
for (const track of stream.getTracks())
|
||||
pc.addTrack(track, stream);
|
||||
return pc.createOffer();
|
||||
}))
|
||||
.then(t.step_func(offer => {
|
||||
|
@ -193,7 +189,7 @@
|
|||
.catch(t.step_func(reason => {
|
||||
assert_unreached(reason);
|
||||
}));
|
||||
}, 'Legacy addStream(): Media stream stats references track stats');
|
||||
}, 'Media stream stats references track stats');
|
||||
|
||||
async_test(t => {
|
||||
const caller = new RTCPeerConnection();
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
RTCDtxStatus dtx;
|
||||
boolean active;
|
||||
RTCPriorityType priority;
|
||||
RTCPriorityType networkPriority;
|
||||
unsigned long ptime;
|
||||
unsigned long maxBitrate;
|
||||
double maxFramerate;
|
||||
|
@ -146,6 +147,7 @@
|
|||
dtx: 'enabled',
|
||||
active: false,
|
||||
priority: 'low',
|
||||
networkPriority: 'low',
|
||||
ptime: 5,
|
||||
maxBitrate: 8,
|
||||
maxFramerate: 25,
|
||||
|
@ -161,6 +163,7 @@
|
|||
assert_equals(encoding.dtx, 'enabled');
|
||||
assert_equals(encoding.active, false);
|
||||
assert_equals(encoding.priority, 'low');
|
||||
assert_equals(encoding.networkPriority, 'low');
|
||||
assert_equals(encoding.ptime, 5);
|
||||
assert_equals(encoding.maxBitrate, 8);
|
||||
assert_equals(encoding.maxFramerate, 25);
|
||||
|
@ -339,6 +342,9 @@
|
|||
test_modified_encoding('audio', 'priority', 'very-low', 'high',
|
||||
'setParameters() with modified encoding.priority should succeed');
|
||||
|
||||
test_modified_encoding('audio', 'networkPriority', 'very-low', 'high',
|
||||
'setParameters() with modified encoding.networkPriority should succeed');
|
||||
|
||||
test_modified_encoding('audio', 'ptime', 2, 4,
|
||||
'setParameters() with modified encoding.ptime should succeed');
|
||||
|
||||
|
|
|
@ -142,6 +142,7 @@ function validateRtpParameters(param) {
|
|||
RTCDtxStatus dtx;
|
||||
boolean active;
|
||||
RTCPriorityType priority;
|
||||
RTCPriorityType networkPriority;
|
||||
unsigned long ptime;
|
||||
unsigned long maxBitrate;
|
||||
double maxFramerate;
|
||||
|
@ -171,6 +172,8 @@ function validateEncodingParameters(encoding) {
|
|||
assert_optional_boolean_field(encoding, 'active');
|
||||
assert_optional_enum_field(encoding, 'priority',
|
||||
['very-low', 'low', 'medium', 'high']);
|
||||
assert_optional_enum_field(encoding, 'networkPriority',
|
||||
['very-low', 'low', 'medium', 'high']);
|
||||
|
||||
assert_optional_unsigned_int_field(encoding, 'ptime');
|
||||
assert_optional_unsigned_int_field(encoding, 'maxBitrate');
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<meta name="timeout" content="long">
|
||||
<title>RTCPeerConnection legacy addStream</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../RTCPeerConnection-helper.js"></script>
|
||||
<script src="../RTCStats-helper.js"></script>
|
||||
<script src="../dictionary-helper.js"></script>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
// The following helper functions are called from RTCPeerConnection-helper.js:
|
||||
// getUserMediaTracksAndStreams
|
||||
|
||||
// The following helper functions are called from RTCStats-helper.js
|
||||
// (depends on dictionary-helper.js):
|
||||
// validateRtcStats
|
||||
|
||||
// TODO(hbos): addStream() is legacy API not in the spec. Based on discussion
|
||||
// whether to standardize in legacy section, consider removing this test or
|
||||
// keeping it until addTrack() has wide support.
|
||||
// https://github.com/w3c/webrtc-pc/issues/1705
|
||||
// https://github.com/w3c/webrtc-pc/issues/1125
|
||||
async_test(t => {
|
||||
const pc = new RTCPeerConnection();
|
||||
t.add_cleanup(() => pc.close());
|
||||
let track;
|
||||
let stream;
|
||||
return getUserMediaTracksAndStreams(1)
|
||||
.then(t.step_func(([tracks, streams]) => {
|
||||
track = tracks[0];
|
||||
stream = streams[0];
|
||||
stream.addTrack(track);
|
||||
pc.addStream(stream);
|
||||
return pc.createOffer();
|
||||
}))
|
||||
.then(t.step_func(offer => {
|
||||
return pc.setLocalDescription(offer);
|
||||
}))
|
||||
.then(t.step_func(() => {
|
||||
return pc.getStats();
|
||||
}))
|
||||
.then(t.step_func(report => {
|
||||
let trackStats = findStatsByTypeAndId(report, 'track', track.id);
|
||||
let streamStats = findStatsByTypeAndId(report, 'stream', stream.id);
|
||||
assert_true(trackStats != null && streamStats != null,
|
||||
'Has stats for track and stream');
|
||||
assert_array_equals(streamStats.trackIds, [ trackStats.id ],
|
||||
'streamStats.trackIds == [ trackStats.id ]');
|
||||
validateRtcStats(report, trackStats);
|
||||
validateRtcStats(report, streamStats);
|
||||
t.done();
|
||||
}))
|
||||
.catch(t.step_func(reason => {
|
||||
assert_unreached(reason);
|
||||
}));
|
||||
}, 'Legacy addStream(): Media stream stats references track stats');
|
||||
|
||||
function findStatsByTypeAndId(report, type, identifier) {
|
||||
return findStats(report, stats => {
|
||||
return stats.type == type && stats[type + 'Identifier'] == identifier;
|
||||
});
|
||||
}
|
||||
|
||||
function findStats(report, findFunc) {
|
||||
for (let it = report.values(), n = it.next(); !n.done; n = it.next()) {
|
||||
if (findFunc(n.value))
|
||||
return n.value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
</script>
|
|
@ -1,7 +1,4 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
This test uses the legacy callback API with no media, and thus does not require fake media devices.
|
||||
-->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
|
@ -37,7 +34,6 @@ This test uses the legacy callback API with no media, and thus does not require
|
|||
|
||||
var parsedOffer = new RTCSessionDescription({ type: 'offer',
|
||||
sdp: offerSdp });
|
||||
// These functions use the legacy interface extensions to RTCPeerConnection.
|
||||
gSecondConnection.setRemoteDescription(parsedOffer).then(
|
||||
function() {
|
||||
gSecondConnection.createAnswer().then(onAnswerCreated,
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/worklet-test-utils.js"></script>
|
||||
<script src="resources/csp-tests.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<title>ContentSecurityPolicy for Animation Worklets</title>
|
||||
<meta name="timeout" content="long">
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/worklet-test-utils.js"></script>
|
||||
<script src="resources/csp-tests.js"></script>
|
||||
<script>
|
||||
runContentSecurityPolicyTests("animation");
|
||||
runContentSecurityPolicyTests("animation");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/worklet-test-utils.js"></script>
|
||||
<script src="resources/csp-tests.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<title>ContentSecurityPolicy for Audio Worklets</title>
|
||||
<meta name="timeout" content="long">
|
||||
<script src="/common/get-host-info.sub.js"></script>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/worklet-test-utils.js"></script>
|
||||
<script src="resources/csp-tests.js"></script>
|
||||
<script>
|
||||
runContentSecurityPolicyTests("audio");
|
||||
runContentSecurityPolicyTests("audio");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue