mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision 4e6563687b9c03d2f54ce0f06ef0ccc8e0964328
This commit is contained in:
parent
e68585a26f
commit
c80d322d92
56 changed files with 1205 additions and 66 deletions
|
@ -13,6 +13,34 @@ self.createIframe = (url, t) => new Promise(resolve => {
|
|||
t.add_cleanup(() => iframe.remove());
|
||||
});
|
||||
|
||||
/**
|
||||
* @description - Function unregisters any service workers in this scope
|
||||
* and then creates a new registration. The function returns
|
||||
* a promise that resolves when the registered service worker
|
||||
* becomes activated. The resolved promise yields the
|
||||
* service worker registration
|
||||
* @param {testCase} t - test case to add cleanup functions to
|
||||
*/
|
||||
self.createServiceWorker = async (t, sw_registration_name, scope_url) => {
|
||||
let registration = await navigator.serviceWorker.getRegistration(scope_url);
|
||||
if (registration)
|
||||
await registration.unregister();
|
||||
|
||||
registration = await navigator.serviceWorker.register(sw_registration_name,
|
||||
{scope_url});
|
||||
t.add_cleanup(() => registration.unregister());
|
||||
|
||||
return new Promise(resolve => {
|
||||
const serviceWorker = registration.installing || registration.active ||
|
||||
registration.waiting;
|
||||
serviceWorker.addEventListener('statechange', event => {
|
||||
if (event.target.state === 'activated') {
|
||||
resolve(serviceWorker);
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that will return a promise that resolves when a message event
|
||||
* is fired. Returns a promise that resolves to the message that was received
|
||||
|
@ -22,3 +50,23 @@ self.waitForMessage = () => new Promise(resolve => {
|
|||
resolve(event.data);
|
||||
}, {once: true});
|
||||
});
|
||||
|
||||
/**
|
||||
* Sends a message via MessageChannel and waits for the response
|
||||
* @param {*} message
|
||||
* @returns {Promise} resolves with the response payload
|
||||
*/
|
||||
self.sendMessageOverChannel = (message, target) => {
|
||||
return new Promise(function(resolve, reject) {
|
||||
const messageChannel = new MessageChannel();
|
||||
messageChannel.port1.onmessage = event => {
|
||||
if (event.data.error) {
|
||||
reject(event.data.error);
|
||||
} else {
|
||||
resolve(event.data);
|
||||
}
|
||||
};
|
||||
|
||||
target.postMessage(message, [messageChannel.port2]);
|
||||
})
|
||||
};
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
self.GLOBAL = {
|
||||
isWindow: () => false,
|
||||
isWorker: () => false,
|
||||
};
|
||||
|
||||
self.addEventListener('message', async event => {
|
||||
if (event.data.op === 'get-cookies') {
|
||||
const workerCookies = await cookieStore.getAll();
|
||||
event.ports[0].postMessage({ workerCookies }, {
|
||||
domain: event.origin,
|
||||
});
|
||||
}
|
||||
});
|
|
@ -0,0 +1,43 @@
|
|||
<!doctype html>
|
||||
<meta charset='utf-8'>
|
||||
<title>Async Cookies: cookieStore API in ServiceWorker across origins</title>
|
||||
<link rel='help' href='https://github.com/WICG/cookie-store'>
|
||||
<link rel='author' href='jarrydg@chromium.org' title='Jarryd Goodman'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<script src='resources/helpers.js'></script>
|
||||
<style>iframe {display: none}</style>
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
const kPath = '/cookie-store/resources/helper_iframe.sub.html';
|
||||
const kCorsBase = `https://{{domains[www1]}}:{{ports[https][0]}}`;
|
||||
const kCorsUrl = `${kCorsBase}${kPath}`;
|
||||
|
||||
promise_test(async t => {
|
||||
const iframe = await createIframe(kCorsUrl, t);
|
||||
assert_true(iframe != null);
|
||||
|
||||
const serviceWorker = await createServiceWorker(t,
|
||||
'serviceworker_cookieStore_cross_origin.js', '/does/not/exist');
|
||||
|
||||
|
||||
iframe.contentWindow.postMessage({
|
||||
opname: 'set-cookie',
|
||||
name: 'cookie-name',
|
||||
value: 'cookie-value',
|
||||
}, kCorsBase);
|
||||
t.add_cleanup(() => {
|
||||
cookieStore.delete('cookie-name');
|
||||
});
|
||||
|
||||
await waitForMessage();
|
||||
|
||||
const { workerCookies } = await sendMessageOverChannel({ op: 'get-cookies' },
|
||||
serviceWorker);
|
||||
|
||||
assert_equals(workerCookies.length, 1);
|
||||
assert_equals(workerCookies[0].name, 'cookie-name');
|
||||
assert_equals(workerCookies[0].value, 'cookie-value');
|
||||
}, 'cookieStore.get() in ServiceWorker reads cookie set in cross-origin frame');
|
||||
</script>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-multicol-1/#pseudo-algorithm">
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
<div id="container" style="overflow:hidden; columns:1; column-fill:auto; column-gap:0; width:100px; height:100px; background:red;">
|
||||
<div style="height:300000px;"></div>
|
||||
<div style="width:100px; height:100px; background:green;"></div>
|
||||
<div style="height:123456px;"></div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("container").scrollLeft = 300000;
|
||||
</script>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Text shaping must not be broken across inline box boundaries when there is no change in formatting</title>
|
||||
<link rel=match href="reference/boundary-shaping-001.ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
/* initial values for these properties should not interrupt shaping */
|
||||
vertical-align: initial;
|
||||
padding: initial;
|
||||
margin: initial;
|
||||
border: initial;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a>f</span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Text shaping must be broken across inline box boundaries when 'vertical-align' is not 'baseline'</title>
|
||||
<link rel=match href="reference/boundary-shaping-002.ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
vertical-align: 0; /* distinct from 'baseline', should break shaping */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a>f</span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Text shaping must be broken across inline box boundaries when padding is non-zero</title>
|
||||
<link rel=match href="reference/boundary-shaping-003.ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a>f</span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Text shaping must be broken across inline box boundaries when margin is non-zero</title>
|
||||
<link rel=match href="reference/boundary-shaping-004.ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a>f</span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Text shaping must be broken across inline box boundaries when border is non-zero</title>
|
||||
<link rel=match href="reference/boundary-shaping-005.ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
border-right: 10px solid transparent;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a>f</span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Text shaping must be broken across inline box boundaries when 'vertical-align' is not 'baseline'</title>
|
||||
<link rel=match href="reference/boundary-shaping-006.ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
vertical-align: super;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span><span><span class=a><span><span>f</span></span></span></span></span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Text shaping must be broken across inline box boundaries when padding or margin is non-zero</title>
|
||||
<link rel=match href="reference/boundary-shaping-007.ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.b {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span><span class=a><span><span class=b><span>f</span></span></span></span></span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Text shaping must be broken across inline box boundaries at a bidi isolation boundary</title>
|
||||
<link rel=match href="reference/boundary-shaping-008.ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
unicode-bidi: isolate; /* bidi isolation boundaries should break shaping */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a>f</span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Text shaping must be broken across inline box boundaries when padding or margin is non-zero</title>
|
||||
<link rel=match href="reference/boundary-shaping-009.ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
|
||||
<style>
|
||||
body {
|
||||
font: 36px sans-serif;
|
||||
}
|
||||
div {
|
||||
text-align: center;
|
||||
}
|
||||
.a {
|
||||
padding-right: 10px;
|
||||
}
|
||||
.b {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.c {
|
||||
color: red;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.d {
|
||||
color: red;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div dir=ltr>
|
||||
السلام<span class=a>عليكم</span>
|
||||
</div>
|
||||
<div dir=ltr>
|
||||
<span class=b>السلام</span>عليكم
|
||||
</div>
|
||||
<div dir=rtl>
|
||||
السلام<span class=a>عليكم</span>
|
||||
</div>
|
||||
<div dir=rtl>
|
||||
<span class=b>السلام</span>عليكم
|
||||
</div>
|
||||
<div dir=ltr>
|
||||
السلام<span class=c>عليكم</span>
|
||||
</div>
|
||||
<div dir=ltr>
|
||||
<span class=d>السلام</span>عليكم
|
||||
</div>
|
||||
<div dir=rtl>
|
||||
السلام<span class=c>عليكم</span>
|
||||
</div>
|
||||
<div dir=rtl>
|
||||
<span class=d>السلام</span>عليكم
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title>Text shaping must not be broken across inline box boundaries when there is no change in formatting</title>
|
||||
<link rel=match href="reference/boundary-shaping-010.ref.html">
|
||||
<link rel=help href="https://drafts.csswg.org/css-text/#boundary-shaping">
|
||||
<style>
|
||||
body {
|
||||
font: 36px sans-serif;
|
||||
}
|
||||
div {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div dir=rtl>
|
||||
ال<span>سل</span>ام
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(../resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
office
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(../resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a>f</span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(../resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a> </span>fice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(../resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
off<span class=a> </span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(../resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
off<span class=a> </span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(../resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
vertical-align: super;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a>f</span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(../resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
padding-left: 10px;
|
||||
margin-right: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a>f</span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: test;
|
||||
src: url(../resources/LinLibertine_Re-4.7.5.woff);
|
||||
}
|
||||
body {
|
||||
font: 36px test; /* use a font that includes ligatures for "fi" etc */
|
||||
}
|
||||
.a {
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
of<span class=a>f</span>ice
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
body {
|
||||
font: 36px sans-serif;
|
||||
}
|
||||
div {
|
||||
text-align: center;
|
||||
}
|
||||
.a {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
}
|
||||
.c1 {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.c {
|
||||
color: red;
|
||||
}
|
||||
.d1 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.d {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div dir=ltr>
|
||||
السلام<span class=a> </span>عليكم
|
||||
</div>
|
||||
<div dir=ltr>
|
||||
السلام<span class=a> </span>عليكم
|
||||
</div>
|
||||
<div dir=rtl>
|
||||
السلام<span class=a> </span>عليكم
|
||||
</div>
|
||||
<div dir=rtl>
|
||||
السلام<span class=a> </span>عليكم
|
||||
</div>
|
||||
<div dir=ltr>
|
||||
<span class=c1>السلام<span class=c>عليكم</span></span>
|
||||
</div>
|
||||
<div dir=ltr>
|
||||
<span class=d1><span class=d>السلام</span>عليكم</span>
|
||||
</div>
|
||||
<div dir=rtl>
|
||||
<span class=c1>السلام<span class=c>عليكم</span></span>
|
||||
</div>
|
||||
<div dir=rtl>
|
||||
<span class=d1><span class=d>السلام</span>عليكم</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<style>
|
||||
body {
|
||||
font: 36px sans-serif;
|
||||
}
|
||||
div {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div dir=rtl>
|
||||
السلام
|
||||
</body>
|
||||
</html>
|
Binary file not shown.
|
@ -1,7 +1,4 @@
|
|||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<script>
|
||||
setup({explicit_done: true})
|
||||
function process_test_result(passed, test_name) {
|
||||
if ({{GET[sendmessage]}}) {
|
||||
if (window.opener) {
|
||||
|
@ -10,10 +7,11 @@
|
|||
parent.postMessage(passed, "*");
|
||||
}
|
||||
} else {
|
||||
test(function(t) {
|
||||
assert_equals(passed, true);
|
||||
let host = window.opener || parent;
|
||||
host.test(function(t) {
|
||||
host.assert_equals(passed, true);
|
||||
}, test_name);
|
||||
done();
|
||||
host.done();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>AnimationTiming Test: FrameRequestCallback - valid callback handle</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#animation-frames">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
|
||||
test(() => {
|
||||
let requestId = window.requestAnimationFrame(() => {});
|
||||
assert_greater_than(requestId, 0, "callback handle is a integer greater than zero");
|
||||
}, "Check window.requestAnimationFrame can return a valid callback handle");
|
||||
|
||||
</script>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>AnimationTiming Test: FrameRequestCallback - timestamp argument</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#animation-frames">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
|
||||
async_test(t => {
|
||||
requestAnimationFrame(t.step_func_done(time => {
|
||||
assert_equals(typeof time, "number", "callback contains a number argument");
|
||||
}))
|
||||
}, "Check FrameRequestCallback has a DOMHighResTimeStamp argument");
|
||||
|
||||
</script>
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>AnimationTiming Test: cancelAnimationFrame used to cancel request callback</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#animation-frames">
|
||||
|
||||
<style>
|
||||
#animated {
|
||||
background: blue;
|
||||
color: white;
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
position: absolute;
|
||||
}
|
||||
</style>
|
||||
|
||||
<p>
|
||||
Test passes if there is a filled blue square with 'Filler Text',
|
||||
which moves from left to right repeatly, when click the 'stop' button,
|
||||
the square stops.
|
||||
</p>
|
||||
<button onclick="stop()">stop</button>
|
||||
<div id="animated">Filler Text</div>
|
||||
|
||||
<script>
|
||||
|
||||
let requestId = 0;
|
||||
let requestAnimation = window.requestAnimationFrame;
|
||||
let cancelAnimation = window.cancelAnimationFrame;
|
||||
|
||||
function animate(time) {
|
||||
let div = document.getElementById("animated");
|
||||
div.style.left = (time - animationStartTime) % 2000 / 4 + "px";
|
||||
requestId = requestAnimation(animate);
|
||||
}
|
||||
|
||||
function start() {
|
||||
animationStartTime = window.performance.now();
|
||||
requestId = requestAnimation(animate);
|
||||
}
|
||||
|
||||
function stop() {
|
||||
if (requestId) {
|
||||
cancelAnimation(requestId);
|
||||
requestId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
start();
|
||||
|
||||
</script>
|
|
@ -6,6 +6,9 @@
|
|||
<link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-actions.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<!-- Additional helper script for common checks across event types -->
|
||||
<script type="text/javascript" src="pointerevent_support.js"></script>
|
||||
</head>
|
||||
|
@ -45,6 +48,13 @@
|
|||
}, "you have to use pen for this test");
|
||||
}
|
||||
});
|
||||
|
||||
// Inject pen inputs.
|
||||
new test_driver.Actions()
|
||||
.addPointer("pointer1", "pen")
|
||||
.pointerMove(0, 0, {origin: target0})
|
||||
.pointerMove(0, 0)
|
||||
.send();
|
||||
}
|
||||
|
||||
</script>
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Intrinsic sizing for <svg></title>
|
||||
<link rel="help" href="https://www.w3.org/TR/SVG2/coords.html">
|
||||
<link rel="help" href="https://www.w3.org/TR/css-sizing-3/#intrinsic-sizes">
|
||||
<link rel="match" href="support/abspos-ref.html">
|
||||
<!--
|
||||
SVG embedded inside html has no intrinsic size, but has intrinsic
|
||||
aspect ratio. Inline size is computed as available size of containing block,
|
||||
and block size is derived from aspect ratio.
|
||||
-->
|
||||
<style>
|
||||
#container {
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
position: relative;
|
||||
border: 10px solid black;
|
||||
}
|
||||
#target {
|
||||
fill: green;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<svg id="target" viewBox="0 0 50 50"><circle cx="50%" cy="50%" r="50%"></circle></svg>
|
||||
</div>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Intrinsic sizing for <svg></title>
|
||||
<link rel="help" href="https://www.w3.org/TR/SVG2/coords.html">
|
||||
<style>
|
||||
#container {
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
position: relative;
|
||||
border: 10px solid black;
|
||||
}
|
||||
#target {
|
||||
fill: green;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<svg id="target" viewBox="0 0 50 50"><circle cx="50%" cy="50%" r="50%"></circle></svg>
|
||||
</div>
|
|
@ -442,7 +442,7 @@ ALL_EVENTS = {
|
|||
"value": u"\ue01d",
|
||||
},
|
||||
"NUMPAD4": {
|
||||
"code": "PageDown",
|
||||
"code": "Numpad4",
|
||||
"ctrl": False,
|
||||
"key": "4",
|
||||
"location": 3,
|
||||
|
@ -451,7 +451,7 @@ ALL_EVENTS = {
|
|||
"value": u"\ue01e",
|
||||
},
|
||||
"NUMPAD5": {
|
||||
"code": "PageUp",
|
||||
"code": "Numpad5",
|
||||
"ctrl": False,
|
||||
"key": "5",
|
||||
"location": 3,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue