mirror of
https://github.com/servo/servo.git
synced 2025-06-27 10:33:39 +01:00
Update web-platform-tests to revision 0d4300c5045a5587c2eb3d1416b11ffeecf5dadc
This commit is contained in:
parent
555fa75b2c
commit
9f1d1e8b63
111 changed files with 1744 additions and 631 deletions
|
@ -14,6 +14,9 @@
|
|||
[Revoke blob URL after creating Request, will fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[url-with-fetch.any.html]
|
||||
[Untitled]
|
||||
|
@ -34,3 +37,6 @@
|
|||
[Revoke blob URL after creating Request, will fetch]
|
||||
expected: FAIL
|
||||
|
||||
[Revoke blob URL after calling fetch, fetch should succeed]
|
||||
expected: FAIL
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,2 @@
|
|||
[fit-content-item-001.html]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[text-decoration-skip-ink-001.html]
|
||||
expected: FAIL
|
|
@ -0,0 +1,2 @@
|
|||
[text-decoration-skip-ink-004.html]
|
||||
expected: FAIL
|
|
@ -3,3 +3,9 @@
|
|||
[scroll-behavior: smooth on DIV element]
|
||||
expected: FAIL
|
||||
|
||||
[Smooth scrolling while doing history navigation.]
|
||||
expected: FAIL
|
||||
|
||||
[Instant scrolling while doing history navigation.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -23,3 +23,9 @@
|
|||
[Property flood-color has initial value rgb(0, 0, 0)]
|
||||
expected: FAIL
|
||||
|
||||
[Property backdrop-filter does not inherit]
|
||||
expected: FAIL
|
||||
|
||||
[Property backdrop-filter has initial value none]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -315,18 +315,12 @@
|
|||
[<iframe>: combined response Content-Type: text/html */*]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
|
||||
[<iframe>: combined response Content-Type: */* text/html]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;x=" text/plain]
|
||||
[<iframe>: separate response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;x=" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: combined response Content-Type: text/html;" text/plain]
|
||||
expected: FAIL
|
||||
|
||||
[<iframe>: separate response Content-Type: text/html;" \\" text/plain]
|
||||
[<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,6 +56,3 @@
|
|||
[separate text/javascript x/x]
|
||||
expected: FAIL
|
||||
|
||||
[separate text/javascript;charset=windows-1252 error text/javascript]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
[X-Content-Type-Options%3A%20nosniff%0C]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%22nosniFF%22]
|
||||
expected: FAIL
|
||||
|
||||
[X-Content-Type-Options%3A%20%40%23%24%23%25%25%26%5E%26%5E*()()11!%2Cnosniff]
|
||||
[X-Content-Type-Options%3A%20'NosniFF']
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[traverse_the_history_2.html]
|
||||
[traverse_the_history_4.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
[traverse_the_history_5.html]
|
||||
[Multiple history traversals, last would be aborted]
|
||||
expected: FAIL
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
[form-submission-algorithm.html]
|
||||
expected: TIMEOUT
|
||||
[If form's firing submission events is true, then return; 'submit' event]
|
||||
expected: FAIL
|
||||
|
||||
[If form's firing submission events is true, then return; 'invalid' event]
|
||||
expected: FAIL
|
||||
|
||||
[Cannot navigate (after constructing the entry list)]
|
||||
expected: TIMEOUT
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
[toggleEvent.html]
|
||||
[Calling open twice on 'details' fires only one toggle event]
|
||||
expected: FAIL
|
||||
|
||||
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
|
||||
expected: FAIL
|
||||
|
|
@ -176,3 +176,9 @@
|
|||
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[30\]\t9.4836157560348511e-1\t9.5236867666244507e-1\t4.0071010589599609e-3\t4.2075103446311962e-3\t3.8985999999999999e-3\n\t[31\]\t9.2646563053131104e-1\t9.3139332532882690e-1\t4.9276947975158691e-3\t5.2906700783754857e-3\t3.8985999999999999e-3\n\t[32\]\t9.0087991952896118e-1\t9.0675884485244751e-1\t5.8789253234863281e-3\t6.4834496590358351e-3\t3.8985999999999999e-3\n\t[33\]\t8.7170630693435669e-1\t8.7856203317642212e-1\t6.8557262420654297e-3\t7.8033490899654511e-3\t3.8985999999999999e-3\n\t[34\]\t8.3906102180480957e-1\t8.4691369533538818e-1\t7.8526735305786133e-3\t9.2721059699818163e-3\t3.8985999999999999e-3\n\t...and 31037 more errors.\n\tMax AbsError of 9.8276454210281394e-1 at index of 39267.\n\t[39267\]\t2.1028969344127294e-16\t-9.8276454210281372e-1\t9.8276454210281394e-1\t1.0000000000000002e+0\t3.8985999999999999e-3\n\tMax RelError of 3.3137802965303198e+0 at index of 1253.\n\t[1253\]\t-4.3022233992815018e-2\t-9.9732093513011932e-3\t3.3049024641513824e-2\t3.3137802965303198e+0\t3.8985999999999999e-3\n]
|
||||
expected: FAIL
|
||||
|
||||
[X SNR (-729.5069243798895 dB) is not greater than or equal to 65.737. Got -729.5069243798895.]
|
||||
expected: FAIL
|
||||
|
||||
[X Stitched sine-wave buffers at sample rate 43800 does not equal [0,0.06264832615852356,0.12505052983760834,0.18696144223213196,0.24813786149024963,0.308339387178421,0.36732959747314453,0.4248766601085663,0.480754554271698,0.5347436666488647,0.5866320133209229,0.6362156271934509,0.6832997798919678,0.7276994585990906,0.7692402601242065,0.8077589869499207...\] with an element-wise tolerance of {"absoluteThreshold":0.0038986,"relativeThreshold":0}.\n\tIndex\tActual\t\t\tExpected\t\tAbsError\t\tRelError\t\tTest threshold\n\t[30\]\t9.4836157560348511e-1\t9.5236867666244507e-1\t4.0071010589599609e-3\t4.2075103446311962e-3\t3.8985999999999999e-3\n\t[31\]\t9.2646563053131104e-1\t9.3139332532882690e-1\t4.9276947975158691e-3\t5.2906700783754857e-3\t3.8985999999999999e-3\n\t[32\]\t9.0087991952896118e-1\t9.0675884485244751e-1\t5.8789253234863281e-3\t6.4834496590358351e-3\t3.8985999999999999e-3\n\t[33\]\t8.7170630693435669e-1\t8.7856203317642212e-1\t6.8557262420654297e-3\t7.8033490899654511e-3\t3.8985999999999999e-3\n\t[34\]\t8.3906102180480957e-1\t8.4691369533538818e-1\t7.8526735305786133e-3\t9.2721059699818163e-3\t3.8985999999999999e-3\n\t...and 31037 more errors.\n\tMax AbsError of 3.1372149685965721e+38 at index of 20238.\n\t[20238\]\t-3.1372149685965721e+38\t-4.7574958205223083e-1\t3.1372149685965721e+38\t6.5942569094094308e+38\t3.8985999999999999e-3\n\tMax RelError of 6.5942569094094308e+38 at index of 20238.\n\t[20238\]\t-3.1372149685965721e+38\t-4.7574958205223083e-1\t3.1372149685965721e+38\t6.5942569094094308e+38\t3.8985999999999999e-3\n]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[WorkerGlobalScope-close.html]
|
||||
[Test sending a message after closing.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
[sharedworker-in-worker.html]
|
||||
expected: ERROR
|
||||
[Base URL in workers: new SharedWorker()]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -180,76 +180,6 @@ Please make sure git and your text editor do not automatically convert
|
|||
line endings, as it will cause lint errors. For git, please set
|
||||
`git config core.autocrlf false` in your working tree.
|
||||
|
||||
Certificates
|
||||
============
|
||||
|
||||
By default pre-generated certificates for the web-platform.test domain
|
||||
are provided in [`tools/certs`](tools/certs). If you wish to generate new
|
||||
certificates for any reason it's possible to use OpenSSL when starting
|
||||
the server, or starting a test run, by providing the
|
||||
`--ssl-type=openssl` argument to the `wpt serve` or `wpt run`
|
||||
commands.
|
||||
|
||||
If you installed OpenSSL in such a way that running `openssl` at a
|
||||
command line doesn't work, you also need to adjust the path to the
|
||||
OpenSSL binary. This can be done by adding a section to `config.json`
|
||||
like:
|
||||
|
||||
```
|
||||
"ssl": {"openssl": {"binary": "/path/to/openssl"}}
|
||||
```
|
||||
|
||||
On Windows using OpenSSL typically requires installing an OpenSSL distribution.
|
||||
[Shining Light](https://slproweb.com/products/Win32OpenSSL.html)
|
||||
provide a convenient installer that is known to work, but requires a
|
||||
little extra setup, i.e.:
|
||||
|
||||
Run the installer for Win32_OpenSSL_v1.1.0b (30MB). During installation,
|
||||
change the default location for where to Copy OpenSSL Dlls from the
|
||||
System directory to the /bin directory.
|
||||
|
||||
After installation, ensure that the path to OpenSSL (typically,
|
||||
this will be `C:\OpenSSL-Win32\bin`) is in your `%Path%`
|
||||
[Environment Variable](http://www.computerhope.com/issues/ch000549.htm).
|
||||
If you forget to do this part, you will most likely see a 'File Not Found'
|
||||
error when you start wptserve.
|
||||
|
||||
Finally, set the path value in the server configuration file to the
|
||||
default OpenSSL configuration file location. To do this create a file
|
||||
called `config.json`. Then add the OpenSSL configuration below,
|
||||
ensuring that the key `ssl/openssl/base_conf_path` has a value that is
|
||||
the path to the OpenSSL config file (typically this will be
|
||||
`C:\\OpenSSL-Win32\\bin\\openssl.cfg`):
|
||||
|
||||
```
|
||||
{
|
||||
"ssl": {
|
||||
"type": "openssl",
|
||||
"encrypt_after_connect": false,
|
||||
"openssl": {
|
||||
"openssl_binary": "openssl",
|
||||
"base_path: "_certs",
|
||||
"force_regenerate": false,
|
||||
"base_conf_path": "C:\\OpenSSL-Win32\\bin\\openssl.cfg"
|
||||
},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### Trusting Root CA
|
||||
|
||||
To prevent browser SSL warnings when running HTTPS tests locally, the
|
||||
web-platform-tests Root CA file `cacert.pem` in [tools/certs](tools/certs)
|
||||
must be added as a trusted certificate in your OS/browser.
|
||||
|
||||
**NOTE**: The CA should not be installed in any browser profile used
|
||||
outside of tests, since it may be used to generate fake
|
||||
certificates. For browsers that use the OS certificate store, tests
|
||||
should therefore not be run manually outside a dedicated OS instance
|
||||
(e.g. a VM). To avoid this problem when running tests in Chrome or
|
||||
Firefox use `wpt run`, which disables certificate checks and therefore
|
||||
doesn't require the root CA to be trusted.
|
||||
|
||||
Publication
|
||||
===========
|
||||
|
||||
|
@ -339,36 +269,6 @@ For more details, see the [lint-tool documentation][lint-tool].
|
|||
|
||||
[lint-tool]: https://web-platform-tests.org/writing-tests/lint-tool.html
|
||||
|
||||
Adding command-line scripts ("tools" subdirs)
|
||||
---------------------------------------------
|
||||
|
||||
Sometimes you may want to add a script to the repository that's meant
|
||||
to be used from the command line, not from a browser (e.g., a script
|
||||
for generating test files). If you want to ensure (e.g., for security
|
||||
reasons) that such scripts won't be handled by the HTTP server, but
|
||||
will instead only be usable from the command line, then place them in
|
||||
either:
|
||||
|
||||
* the `tools` subdir at the root of the repository, or
|
||||
|
||||
* the `tools` subdir at the root of any top-level directory in the
|
||||
repository which contains the tests the script is meant to be used
|
||||
with
|
||||
|
||||
Any files in those `tools` directories won't be handled by the HTTP
|
||||
server; instead the server will return a 404 if a user navigates to
|
||||
the URL for a file within them.
|
||||
|
||||
If you want to add a script for use with a particular set of tests but
|
||||
there isn't yet any `tools` subdir at the root of a top-level
|
||||
directory in the repository containing those tests, you can create a
|
||||
`tools` subdir at the root of that top-level directory and place your
|
||||
scripts there.
|
||||
|
||||
For example, if you wanted to add a script for use with tests in the
|
||||
`notifications` directory, create the `notifications/tools` subdir and
|
||||
put your script there.
|
||||
|
||||
Test Review
|
||||
===========
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ self.addEventListener('install', (event) => {
|
|||
// cookie change logic that this test aims to cover.
|
||||
try {
|
||||
await cookieStore.subscribeToChanges([
|
||||
{ name: 'cookie-name1', matchType: 'equals', url: '/scope/path1' }]);
|
||||
{ name: 'cookie-name1', matchType: 'equals', url: '/cookie-store/path1' }]);
|
||||
await cookieStore.subscribeToChanges([
|
||||
{ }, // Test the default values for subscription properties.
|
||||
{ name: 'cookie-prefix', matchType: 'starts-with' },
|
||||
|
|
|
@ -9,13 +9,14 @@
|
|||
'use strict';
|
||||
|
||||
(async () => {
|
||||
const scope = 'scope';
|
||||
// Not using an explicit scope here in order for script URL to be in scope,
|
||||
// to cover implicit subscription URL construction.
|
||||
|
||||
let registration = await navigator.serviceWorker.getRegistration(scope);
|
||||
let registration = await navigator.serviceWorker.getRegistration();
|
||||
if (registration)
|
||||
await registration.unregister();
|
||||
registration = await navigator.serviceWorker.register(
|
||||
'serviceworker_cookieStore_subscriptions.js', {scope});
|
||||
'serviceworker_cookieStore_subscriptions.js');
|
||||
|
||||
fetch_tests_from_worker(registration.installing);
|
||||
})();
|
||||
|
|
|
@ -8,7 +8,8 @@ self.addEventListener('install', (event) => {
|
|||
event.waitUntil((async () => {
|
||||
try {
|
||||
await cookieStore.subscribeToChanges([
|
||||
{ name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]);
|
||||
{ name: 'cookie-name', matchType: 'equals',
|
||||
url: '/cookie-store/scope/path' }]);
|
||||
|
||||
// If the worker enters the "redundant" state, the UA may terminate it
|
||||
// before all tests have been reported to the client. Stifle errors in
|
||||
|
|
|
@ -8,7 +8,8 @@ self.addEventListener('install', (event) => {
|
|||
event.waitUntil((async () => {
|
||||
try {
|
||||
await cookieStore.subscribeToChanges([
|
||||
{ name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]);
|
||||
{ name: 'cookie-name', matchType: 'equals',
|
||||
url: '/cookie-store/scope/path' }]);
|
||||
|
||||
// If the worker enters the "redundant" state, the UA may terminate it
|
||||
// before all tests have been reported to the client. Stifle errors in
|
||||
|
|
|
@ -8,7 +8,8 @@ self.addEventListener('install', (event) => {
|
|||
event.waitUntil((async () => {
|
||||
try {
|
||||
await cookieStore.subscribeToChanges([
|
||||
{ name: 'cookie-name', matchType: 'equals', url: '/scope/path' }]);
|
||||
{ name: 'cookie-name', matchType: 'equals',
|
||||
url: '/cookie-store/scope/path' }]);
|
||||
|
||||
// If the worker enters the "redundant" state, the UA may terminate it
|
||||
// before all tests have been reported to the client. Stifle errors in
|
||||
|
|
|
@ -1 +1 @@
|
|||
Set-Cookie: foo=bar; Expires=Fri, 07 Aug 2019 08:04:19 GMT
|
||||
Set-Cookie: foo=bar; Expires=Fri, 01 Jan 2038 00:00:00 GMT
|
||||
|
|
|
@ -1 +1 @@
|
|||
Set-Cookie: foo=bar; Expires=Fri, 07 Aug 2019 08:04:19 GMT
|
||||
Set-Cookie: foo=bar; Expires=Fri, 01 Jan 2038 00:00:00 GMT
|
||||
|
|
|
@ -1 +1 @@
|
|||
Set-Cookie: foo=bar; Expires=Fri 07 Aug 2019 08:04:19 GMT, baz=qux
|
||||
Set-Cookie: foo=bar; Expires=Fri 01 Jan 2038 00:00:00 GMT, baz=qux
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Animations: getComputedStyle().animationName</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-animations/#propdef-animation-name">
|
||||
<meta name="assert" content="animation-name computed value is as specified.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("animation-name", 'none');
|
||||
|
||||
test_computed_value("animation-name", 'foo');
|
||||
test_computed_value("animation-name", 'Both');
|
||||
test_computed_value("animation-name", 'ease-in');
|
||||
test_computed_value("animation-name", 'infinite');
|
||||
test_computed_value("animation-name", 'paused');
|
||||
test_computed_value("animation-name", 'first, second, third');
|
||||
|
||||
// TODO: Test strings, after https://github.com/w3c/csswg-drafts/issues/2435
|
||||
// is resolved.
|
||||
// Examples that need testing either here or in animation-name-invalid.html :
|
||||
// '"Initial"', '"initial"', '"None"', '"Default"', '" x "', "1", '" "', '""',
|
||||
// '"multi word string"', '"---\\22---"'
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -4,6 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<title>Inheritance of CSS Box Model properties</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-box-3/#property-index">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS2/">
|
||||
<meta name="assert" content="Properties do not inherit.">
|
||||
<meta name="assert" content="length-percentage properties have initial value 0.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
|
@ -15,6 +16,9 @@
|
|||
<div id="target"></div>
|
||||
</div>
|
||||
<script>
|
||||
assert_not_inherited('clear', 'none', 'right');
|
||||
assert_not_inherited('float', 'none', 'right');
|
||||
|
||||
assert_not_inherited('margin-bottom', '0px', '10px');
|
||||
assert_not_inherited('margin-left', '0px', '10px');
|
||||
assert_not_inherited('margin-right', '0px', '10px');
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-base-size">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#algo-cross-item">
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
|
||||
<meta name="flags" content="" />
|
||||
<meta name="assert" content="A column flex container shrink wraps items both when determining their flex base sizes and when laying them out after their flexed size has been determined." />
|
||||
|
||||
<style>
|
||||
|
||||
x-flexbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
x-item {
|
||||
display: block;
|
||||
background: red;
|
||||
/* Override default alignment of "stretch" because items don't shrink to fit
|
||||
when they are stretched. */
|
||||
align-self: start;
|
||||
}
|
||||
|
||||
#mainSizeDependsOnCrossSize {
|
||||
padding-bottom: 50%;
|
||||
background: green;
|
||||
}
|
||||
|
||||
#widthSetter {
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
background: green;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
||||
|
||||
<x-flexbox>
|
||||
<x-item> <!-- If fit-content is skipped when determining flex base size, this item gets a main size of 50px + 100vw / 2. -->
|
||||
<div id=widthSetter></div>
|
||||
<div id=mainSizeDependsOnCrossSize></div>
|
||||
</x-item>
|
||||
</x-flexbox>
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=991446">
|
||||
<meta name="assert" content="The renderer should not crash.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body style="display: inline-grid; align-items: end;">
|
||||
<div style="border-top-color: inherit;"></div>
|
||||
text
|
||||
</body>
|
||||
<script>
|
||||
test(() => {
|
||||
document.body.offsetTop;
|
||||
document.body.style.alignItems = '';
|
||||
document.body.offsetTop;
|
||||
}, 'The renderer should not crash.');
|
||||
</script>
|
|
@ -60,8 +60,8 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('block-size-100', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
async intrinsicSizes() {}
|
||||
async layout() {
|
||||
return {autoBlockSize: 100};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -42,14 +42,14 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('block-size-100', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
async intrinsicSizes() {}
|
||||
async layout() {
|
||||
return {autoBlockSize: 100};
|
||||
}
|
||||
});
|
||||
registerLayout('block-size-50', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
async intrinsicSizes() {}
|
||||
async layout() {
|
||||
return {autoBlockSize: 50};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('block-size-100', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
async intrinsicSizes() {}
|
||||
async layout() {
|
||||
return {autoBlockSize: 100};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -50,8 +50,8 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('block-size-100', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
async intrinsicSizes() {}
|
||||
async layout() {
|
||||
return {autoBlockSize: 100};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('block-size-negative', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {
|
||||
async intrinsicSizes() {}
|
||||
async layout() {
|
||||
return {autoBlockSize: -100};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -55,8 +55,8 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('registered', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() { throw Error(); }
|
||||
async intrinsicSizes() {}
|
||||
async layout() { throw Error(); }
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -29,18 +29,17 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('parent', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout([child], edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout([child], edges, constraints, styleMap) {
|
||||
let childFragment = null;
|
||||
|
||||
try {
|
||||
childFragment = yield child.layoutNextFragment({
|
||||
childFragment = await child.layoutNextFragment({
|
||||
data: { fn: function() {} }
|
||||
});
|
||||
} catch(e) {
|
||||
// Success! The structured cloning algorithm should have thrown an error.
|
||||
childFragment = yield child.layoutNextFragment({});
|
||||
childFragment = await child.layoutNextFragment({});
|
||||
return {autoBlockSize: 100, childFragments: [childFragment]};
|
||||
}
|
||||
|
||||
|
@ -49,9 +48,8 @@ registerLayout('parent', class {
|
|||
});
|
||||
|
||||
registerLayout('child', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout() {
|
||||
async intrinsicSizes() {}
|
||||
async layout() {
|
||||
return {autoBlockSize: 0};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -29,23 +29,17 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('parent', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout([child], edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout([child], edges, constraints, styleMap) {
|
||||
let childFragment = null;
|
||||
|
||||
try {
|
||||
// We need SABs to be enabled to properly run this test.
|
||||
if (typeof SharedArrayBuffer !== 'undefined') {
|
||||
childFragment = yield child.layoutNextFragment({
|
||||
data: { sab: new SharedArrayBuffer(4) }
|
||||
});
|
||||
} else {
|
||||
throw Error();
|
||||
}
|
||||
childFragment = await child.layoutNextFragment({
|
||||
data: { sab: new SharedArrayBuffer(4) }
|
||||
});
|
||||
} catch(e) {
|
||||
// Success! The structured cloning algorithm should have thrown an error.
|
||||
childFragment = yield child.layoutNextFragment({});
|
||||
childFragment = await child.layoutNextFragment({});
|
||||
return {autoBlockSize: 100, childFragments: [childFragment]};
|
||||
}
|
||||
|
||||
|
@ -54,9 +48,8 @@ registerLayout('parent', class {
|
|||
});
|
||||
|
||||
registerLayout('child', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout() {
|
||||
async intrinsicSizes() {}
|
||||
async layout() {
|
||||
return {autoBlockSize: 0};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -35,11 +35,10 @@ const DATA = {
|
|||
};
|
||||
|
||||
registerLayout('parent', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout([child], edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout([child], edges, constraints, styleMap) {
|
||||
|
||||
const childFragment = yield child.layoutNextFragment({data: DATA});
|
||||
const childFragment = await child.layoutNextFragment({data: DATA});
|
||||
|
||||
// If the child's block-size is 100 the structured cloning worked.
|
||||
if (childFragment.blockSize === 100) {
|
||||
|
@ -51,9 +50,8 @@ registerLayout('parent', class {
|
|||
});
|
||||
|
||||
registerLayout('child', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
// Use JSON.stringify to make sure the structured cloning worked.
|
||||
if (constraints.data !== DATA &&
|
||||
JSON.stringify(constraints.data) === JSON.stringify(DATA)) {
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
<script id="code" type="text/worklet">
|
||||
registerLayout('throwing-ctor', class {
|
||||
constructor() { throw Error('fail!'); }
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
async intrinsicSizes() {}
|
||||
async layout() {}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('throwing-layout', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() { throw Error('fail!'); }
|
||||
async intrinsicSizes() {}
|
||||
async layout() { throw Error('fail!'); }
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -32,15 +32,15 @@
|
|||
registerLayout('bad-child-layout', class {
|
||||
static get inputProperties() { return ['--fail']; }
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, _, __, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, _, __, styleMap) {
|
||||
if (styleMap.get('--fail').toString() !== 'true') {
|
||||
this.child = children[0];
|
||||
}
|
||||
|
||||
// Try to perform layout on the child. If its invalid (we skipped the if
|
||||
// statement above) we should fallback to block layout.
|
||||
const fragment = yield this.child.layoutNextFragment({});
|
||||
const fragment = await this.child.layoutNextFragment({});
|
||||
|
||||
return {autoBlockSize: 0, childFragments: [fragment]};
|
||||
}
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback">
|
||||
<link rel="match" href="fallback-ref.html">
|
||||
<meta name="assert" content="This test checks that a layout() class performing layout on an invalid fragment request will fallback to block layout." />
|
||||
<style>
|
||||
.test {
|
||||
background: red;
|
||||
border: solid 2px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.test > div {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
@supports (display: layout(bad-request)) {
|
||||
.test {
|
||||
display: layout(bad-request);
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<div class="test">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('bad-request', class {
|
||||
static get inputProperties() { return ['--fail']; }
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, _, __, styleMap) {
|
||||
if (styleMap.get('--fail').toString() !== 'true') {
|
||||
this.request = children[0].layoutNextFragment({});
|
||||
}
|
||||
|
||||
// Try to perform layout on the child. If its invalid (we skipped the if
|
||||
// statement above) we should fallback to block layout.
|
||||
const childFragments = yield [this.request];
|
||||
|
||||
return {autoBlockSize: 0, childFragments};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function raf() {
|
||||
return new Promise((resolve) => {
|
||||
requestAnimationFrame(() => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
(async function() {
|
||||
if (typeof CSS.layoutWorklet === 'undefined') {
|
||||
takeScreenshot();
|
||||
return;
|
||||
}
|
||||
|
||||
await importWorklet(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
|
||||
// Ensure that all instances have a child to perform an invalid layout upon.
|
||||
const test = document.getElementsByClassName('test')[0];
|
||||
for (let i = 0; i < 100; i++) {
|
||||
test.innerHTML = '<div><div>';
|
||||
await raf();
|
||||
}
|
||||
|
||||
// The next layout should mean that we will fallback to block.
|
||||
test.innerHTML = '<div></div>';
|
||||
test.style.setProperty('--fail', 'true');
|
||||
|
||||
// Finish up the test.
|
||||
await raf();
|
||||
await raf();
|
||||
takeScreenshot();
|
||||
})();
|
||||
</script>
|
||||
</html>
|
|
@ -32,10 +32,10 @@
|
|||
registerLayout('bad-request', class {
|
||||
static get inputProperties() { return ['--fail']; }
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, _, __, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, _, __, styleMap) {
|
||||
if (styleMap.get('--fail').toString() !== 'true') {
|
||||
this.fragment = yield children[0].layoutNextFragment({});
|
||||
this.fragment = await children[0].layoutNextFragment({});
|
||||
}
|
||||
|
||||
// Return, if the fragment is invalid (we skipped the if statement above)
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback">
|
||||
<link rel="match" href="fallback-ref.html">
|
||||
<meta name="assert" content="This test checks that a layout() class with a layout function that doesn't return a promise will fallback to block layout." />
|
||||
<style>
|
||||
.test {
|
||||
background: red;
|
||||
border: solid 2px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.child {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
@supports (display: layout(no-promise)) {
|
||||
.test {
|
||||
display: layout(no-promise);
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<div class="test">
|
||||
<div class="child"></div>
|
||||
</div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('no-promise', class {
|
||||
async intrinsicSizes() {}
|
||||
layout() { return {autoBlockSize: 50}; }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
||||
</html>
|
|
@ -39,8 +39,8 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('bad-return', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() { return 42; }
|
||||
async intrinsicSizes() {}
|
||||
async layout() { return 42; }
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html class=reftest-wait>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback">
|
||||
<link rel="match" href="fallback-ref.html">
|
||||
<meta name="assert" content="This test checks that a layout() class with a layout function that doesn't return a promise will fallback to block layout." />
|
||||
<style>
|
||||
.test {
|
||||
background: red;
|
||||
border: solid 2px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.child {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
@supports (display: layout(unresolved-promise)) {
|
||||
.test {
|
||||
display: layout(unresolved-promise);
|
||||
background: green;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script src="/common/reftest-wait.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<div class="test">
|
||||
<div class="child"></div>
|
||||
</div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('unresolved-promise', class {
|
||||
async intrinsicSizes() {}
|
||||
layout() { return new Promise(() => { /* never resolves */ }); }
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
importWorkletAndTerminateTestAfterAsyncPaint(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
</script>
|
||||
</html>
|
|
@ -29,10 +29,9 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('fallback-fn', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = yield children.map(child => child.layoutNextFragment());
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = await children.map(child => child.layoutNextFragment());
|
||||
return {autoBlockSize: 0, childFragments, data: {fn: function() {}}};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -29,18 +29,17 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('parent', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout([child], edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout([child], edges, constraints, styleMap) {
|
||||
|
||||
const childFragment10 = yield child.layoutNextFragment({fixedInlineSize: 10});
|
||||
const childFragment10 = await child.layoutNextFragment({fixedInlineSize: 10});
|
||||
|
||||
// First layout data should be "10".
|
||||
if (childFragment10.data.size !== 10) {
|
||||
return {autoBlockSize: 0, childFragments: [childFragment10]};
|
||||
}
|
||||
|
||||
const childFragment20 = yield child.layoutNextFragment({fixedInlineSize: 20});
|
||||
const childFragment20 = await child.layoutNextFragment({fixedInlineSize: 20});
|
||||
|
||||
// Second layout data should be "20".
|
||||
if (childFragment20.data.size !== 20) {
|
||||
|
@ -57,9 +56,8 @@ registerLayout('parent', class {
|
|||
});
|
||||
|
||||
registerLayout('child', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
return {autoBlockSize: 10, data: {size: constraints.fixedInlineSize}};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -29,16 +29,11 @@
|
|||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('fallback-sab', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = yield children.map(child => child.layoutNextFragment());
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = await Promise.all(children.map(child => child.layoutNextFragment()));
|
||||
|
||||
if (typeof SharedArrayBuffer !== 'undefined') {
|
||||
return {autoBlockSize: 0, childFragments, data: {sab: new SharedArrayBuffer(4) }};
|
||||
} else {
|
||||
throw Error();
|
||||
}
|
||||
return {autoBlockSize: 0, childFragments, data: {sab: new SharedArrayBuffer(4) }};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -35,11 +35,10 @@ const DATA = {
|
|||
};
|
||||
|
||||
registerLayout('parent', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout([child], edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout([child], edges, constraints, styleMap) {
|
||||
|
||||
const childFragment = yield child.layoutNextFragment();
|
||||
const childFragment = await child.layoutNextFragment();
|
||||
|
||||
// Use JSON.stringify to make sure the structured cloning worked.
|
||||
if (childFragment.data !== DATA &&
|
||||
|
@ -52,9 +51,8 @@ registerLayout('parent', class {
|
|||
});
|
||||
|
||||
registerLayout('child', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
return {autoBlockSize: 10, data: DATA};
|
||||
}
|
||||
});
|
||||
|
|
|
@ -33,8 +33,8 @@ registerLayout('test', class {
|
|||
return [ '--bar', '--foo', 'empty-cells', 'margin-left'];
|
||||
}
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
const expected = [
|
||||
{property: '--bar', value: '[CSSUnparsedValue=]'},
|
||||
{property: '--foo', value: '[CSSUnparsedValue= bar]'},
|
||||
|
|
|
@ -40,8 +40,8 @@ const tmpl = (test, idx) => {
|
|||
registerLayout('test-${idx}', class {
|
||||
static get inputProperties() { return ['${test.property}']; }
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
const value = styleMap.get('${test.property}');
|
||||
const result = '[' + value.constructor.name + '=' + value.toString() + ']';
|
||||
if (result != '${test.expected}')
|
||||
|
|
|
@ -3,8 +3,8 @@ registerLayout('test', class {
|
|||
return ['--expected-block-size'];
|
||||
}
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout([child], edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout([child], edges, constraints, styleMap) {
|
||||
let childFixedInlineSize = 0;
|
||||
let childFixedBlockSize = 0;
|
||||
if (constraints.fixedBlockSize === JSON.parse(styleMap.get('--expected-block-size'))) {
|
||||
|
@ -12,7 +12,7 @@ registerLayout('test', class {
|
|||
childFixedBlockSize = 100;
|
||||
}
|
||||
|
||||
const childFragments = [yield child.layoutNextFragment({
|
||||
const childFragments = [await child.layoutNextFragment({
|
||||
fixedInlineSize: childFixedInlineSize,
|
||||
fixedBlockSize: childFixedBlockSize,
|
||||
})];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
registerLayout('test', class {
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
if (constraints.fixedInlineSize !== 100)
|
||||
return {autoBlockSize: 0};
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ registerLayout('test', class {
|
|||
];
|
||||
}
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = yield children.map((child) => {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = await Promise.all(children.map((child) => {
|
||||
const childConstraints = {};
|
||||
const availableInlineSize = parseNumber(child.styleMap.get('--available-inline-size'));
|
||||
const availableBlockSize = parseNumber(child.styleMap.get('--available-block-size'));
|
||||
|
@ -38,7 +38,7 @@ registerLayout('test', class {
|
|||
percentageInlineSize,
|
||||
percentageBlockSize,
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
||||
const actual = childFragments.map((childFragment) => {
|
||||
return {
|
||||
|
|
|
@ -9,14 +9,14 @@ registerLayout('test', class {
|
|||
return [ '--child' ];
|
||||
}
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
const expected = JSON.parse(styleMap.get('--child-expected').toString());
|
||||
const actual = children.map((child) => {
|
||||
return child.styleMap.get('--child').toString().trim();
|
||||
});
|
||||
|
||||
const childFragments = yield children.map((child) => { return child.layoutNextFragment({}); });
|
||||
const childFragments = await Promise.all(children.map(child => child.layoutNextFragment({})));
|
||||
|
||||
if (!areArraysEqual(expected, actual))
|
||||
return {autoBlockSize: 0, childFragments};
|
||||
|
|
|
@ -6,11 +6,9 @@ registerLayout('test', class {
|
|||
];
|
||||
}
|
||||
|
||||
*intrinsicSizes() {}
|
||||
*layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = yield children.map((child) => {
|
||||
return child.layoutNextFragment({});
|
||||
});
|
||||
async intrinsicSizes() {}
|
||||
async layout(children, edges, constraints, styleMap) {
|
||||
const childFragments = await Promise.all(children.map((child) => child.layoutNextFragment({})));
|
||||
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
childFragments[i].inlineOffset = parseInt(children[i].styleMap.get('--inline-offset').toString());
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#invoke-a-layout-callback">
|
||||
<meta name="assert" content="This test checks running the microtask queue for a layout() class won't run the main world's microtask queue." />
|
||||
<style>
|
||||
#test {
|
||||
display: layout(child-layout);
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#test > div {
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/worklet-reftest.js"></script>
|
||||
|
||||
<div id="test">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<script id="code" type="text/worklet">
|
||||
registerLayout('child-layout', class {
|
||||
async intrinsicSizes() {}
|
||||
async layout([child]) {
|
||||
const fragment = await child.layoutNextFragment();
|
||||
return {autoBlockSize: 50, childFragments: [fragment]};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
promise_test(async t => {
|
||||
if (typeof CSS.layoutWorklet === 'undefined') {
|
||||
throw Error('CSS Layout API not supported.');
|
||||
}
|
||||
|
||||
await importWorklet(CSS.layoutWorklet, document.getElementById('code').textContent);
|
||||
|
||||
let resolved = false;
|
||||
let p = Promise.resolve().then(() => {
|
||||
resolved = true;
|
||||
});
|
||||
assert_false(resolved);
|
||||
|
||||
// Running the layout-worklet's microtask queue shouldn't trigger the main
|
||||
// world's microtask queue.
|
||||
assert_equals(document.getElementById('test').clientHeight, 50);
|
||||
assert_false(resolved);
|
||||
|
||||
await p;
|
||||
assert_true(resolved);
|
||||
});
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: parsing counter-increment with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-increment">
|
||||
<meta name="assert" content="counter-increment supports only the grammar '[ <counter-name> <integer>? ]+ | none'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value('counter-increment', 'none chapter');
|
||||
test_invalid_value('counter-increment', '3');
|
||||
test_invalid_value('counter-increment', '99 imagenum');
|
||||
test_invalid_value('counter-increment', 'section -1, imagenum 99');
|
||||
test_invalid_value('counter-increment', 'section 3.14');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: parsing counter-increment with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-increment">
|
||||
<meta name="assert" content="counter-increment supports the full grammar '[ <counter-name> <integer>? ]+ | none'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value('counter-increment', 'none');
|
||||
test_valid_value('counter-increment', 'chapter', 'chapter 1');
|
||||
test_valid_value('counter-increment', 'section -1');
|
||||
test_valid_value('counter-increment', 'first -1 second third 99', 'first -1 second 1 third 99');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: parsing counter-reset with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset">
|
||||
<meta name="assert" content="counter-reset supports only the grammar '[ <counter-name> <integer>? ]+ | none'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value('counter-reset', 'none chapter');
|
||||
test_invalid_value('counter-reset', '3');
|
||||
test_invalid_value('counter-reset', '99 imagenum');
|
||||
test_invalid_value('counter-reset', 'section -1, imagenum 99');
|
||||
test_invalid_value('counter-reset', 'section 3.14');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: parsing counter-reset with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-reset">
|
||||
<meta name="assert" content="counter-reset supports the full grammar '[ <counter-name> <integer>? ]+ | none'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value('counter-reset', 'none');
|
||||
test_valid_value('counter-reset', 'chapter', 'chapter 0');
|
||||
test_valid_value('counter-reset', 'section -1');
|
||||
test_valid_value('counter-reset', 'first -1 second third 99', 'first -1 second 0 third 99');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: parsing counter-set with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-set">
|
||||
<meta name="assert" content="counter-set supports only the grammar '[ <counter-name> <integer>? ]+ | none'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_invalid_value('counter-set', 'none chapter');
|
||||
test_invalid_value('counter-set', '3');
|
||||
test_invalid_value('counter-set', '99 imagenum');
|
||||
test_invalid_value('counter-set', 'section -1, imagenum 99');
|
||||
test_invalid_value('counter-set', 'section 3.14');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: parsing counter-set with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-lists-3/#propdef-counter-set">
|
||||
<meta name="assert" content="counter-set supports the full grammar '[ <counter-name> <integer>? ]+ | none'.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/parsing-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
test_valid_value('counter-set', 'none');
|
||||
test_valid_value('counter-set', 'chapter', 'chapter 0');
|
||||
test_valid_value('counter-set', 'section -1');
|
||||
test_valid_value('counter-set', 'first -1 second third 99', 'first -1 second 0 third 99');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Reference case for text-decoration shorthands</title>
|
||||
<style>
|
||||
div{
|
||||
text-decoration: green underline;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if a green underline renders</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Reference case for text-decoration shorthands</title>
|
||||
<style>
|
||||
div{
|
||||
text-decoration: green underline;
|
||||
text-decoration-thickness: 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if a thick green underline is rendered</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Non-reference case for text-decoration-skip-ink</title>
|
||||
<style>
|
||||
div{
|
||||
text-decoration: green underline;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if the underline skips the p and g's in the text below</p>
|
||||
<div>ping pong</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Reference case for text-decoration-skip-ink</title>
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if no underline is visible</p>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Non-reference case for text-decoration-skip-ink</title>
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
<style>
|
||||
/*
|
||||
This non-reference case ensures that the test does
|
||||
not frivolously pass if the underline is not rendered at all
|
||||
*/
|
||||
div{
|
||||
font: 20px/1 Ahem;
|
||||
color: rgba(255,255,0,0.25);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if underline is rendered below the text</p>
|
||||
<div>XXXX</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Reference case for text-decoration-skip-ink</title>
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
<style>
|
||||
div{
|
||||
font: 20px/1 Ahem;
|
||||
color: rgba(255,255,0,0.25);
|
||||
text-decoration: green underline;
|
||||
text-decoration-skip-ink: none;
|
||||
text-underline-offset: .5em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if underline is rendered below the text</p>
|
||||
<div>XXXX</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Non-reference case for text-decoration-skip-ink</title>
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
<style>
|
||||
div{
|
||||
font: 20px/1 Ahem;
|
||||
color: rgba(255,255,0,0.25);
|
||||
text-decoration: green underline;
|
||||
text-decoration-skip-ink: none;
|
||||
text-underline-offset: -.3em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if underline appears only across the 'p' glyph</p>
|
||||
<div>XXpX</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test case for text-decoration shorthands</title>
|
||||
<meta name="assert" content="text-decoration: the line should be rendered at a thickness of auto">
|
||||
<link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property">
|
||||
<link rel="match" href="reference/text-decoration-shorthands-001-ref.html">
|
||||
<style>
|
||||
div{
|
||||
text-decoration: green underline auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if a green underline renders</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test case for text-decoration shorthands</title>
|
||||
<meta name="assert" content="text-decoration: text-decoration-thickness is parsed as part of the text-decoration shorthand">
|
||||
<link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-width-property">
|
||||
<link rel="match" href="reference/text-decoration-shorthands-002-ref.html">
|
||||
<style>
|
||||
/*
|
||||
This test is designed to make sure the underline is rendered
|
||||
the same, regardless of whether or not the thickness is set
|
||||
in the shorthands or the longhands form
|
||||
*/
|
||||
div{
|
||||
text-decoration: green underline 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if a thick green underline is rendered</p>
|
||||
<div>XX XX</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test case for text-decoration-skip-ink</title>
|
||||
<meta name="assert" content="text-decoration-skip-ink: descenders are skipped">
|
||||
<link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property">
|
||||
<link rel="mismatch" href="reference/text-decoration-skip-ink-001-notref.html">
|
||||
<style>
|
||||
div{
|
||||
text-decoration: green underline;
|
||||
text-decoration-skip-ink: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if the underline skips the p and g's in the text below</p>
|
||||
<div>ping pong</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test case for text-decoration-skip-ink</title>
|
||||
<meta name="assert" content="text-decoration-skip-ink: no underline is rendered for transparent Ahem font">
|
||||
<link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property">
|
||||
<link rel="match" href="reference/text-decoration-skip-ink-002-ref.html">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
<style>
|
||||
/*
|
||||
No underline should be rendered for Ahem text when
|
||||
text-decoration-skip-ink is applied.
|
||||
*/
|
||||
div{
|
||||
font: 20px/1 Ahem;
|
||||
text-decoration: green underline;
|
||||
text-decoration-skip-ink: auto;
|
||||
color: transparent;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if no underline is visible</p>
|
||||
<div>XXXX</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test case for text-decoration-skip-ink</title>
|
||||
<meta name="assert" content="text-decoration-skip-ink: an uninterrupted underline is rendered below the text">
|
||||
<link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property">
|
||||
<link rel="match" href="reference/text-decoration-skip-ink-003-ref.html">
|
||||
<link rel="mismatch" href="reference/text-decoration-skip-ink-003-notref.html">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
<style>
|
||||
/*
|
||||
This test ensures that the underline offset is taken into account
|
||||
when calculating the skip-ink. No skip-ink should be applied
|
||||
because the underline is being moved below the text.
|
||||
*/
|
||||
div{
|
||||
font: 20px/1 Ahem;
|
||||
color: rgba(255,255,0,0.25);
|
||||
text-decoration: green underline;
|
||||
text-decoration-skip-ink: auto;
|
||||
text-underline-offset: .5em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if underline is rendered below the text</p>
|
||||
<div>XXXX</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test case for text-decoration-skip-ink</title>
|
||||
<meta name="assert" content="text-decoration-skip-ink: a partial underline is rendered above the 'p'">
|
||||
<link rel="author" title="Charlie Marlow" href="mailto:cmarlow@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="https://www.mozilla.org">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/#text-decoration-skip-ink-property">
|
||||
<link rel="mismatch" href="reference/text-decoration-skip-ink-004-notref.html">
|
||||
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
|
||||
<style>
|
||||
/*
|
||||
This test ensures that the underline offset is taken into account
|
||||
when calculating the skip-ink. The underline should skip all
|
||||
characters except the third.
|
||||
*/
|
||||
div{
|
||||
font: 20px/1 Ahem;
|
||||
color: rgba(255,255,0,0.25);
|
||||
text-decoration: green underline;
|
||||
text-decoration-skip-ink: auto;
|
||||
text-underline-offset: -.3em;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>Test passes if underline appears only across the 'p' glyph</p>
|
||||
<div>XXpX</div>
|
||||
</body>
|
||||
</html>
|
|
@ -4,6 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<title>Inheritance of Filter Effects properties</title>
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#property-index">
|
||||
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#property-index">
|
||||
<meta name="assert" content="Properties inherit according to the spec.">
|
||||
<meta name="assert" content="Properties have initial values according to the spec.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
|
@ -15,6 +16,7 @@
|
|||
<div id="target"></div>
|
||||
</div>
|
||||
<script>
|
||||
assert_not_inherited('backdrop-filter', 'none', 'blur(10px)');
|
||||
assert_inherited('color-interpolation-filters', 'linearrgb', 'srgb');
|
||||
assert_not_inherited('filter', 'none', 'blur(10px)');
|
||||
assert_not_inherited('flood-color', 'rgb(0, 0, 0)', 'rgb(42, 53, 64)');
|
||||
|
|
|
@ -13,11 +13,12 @@ help:
|
|||
|
||||
.PHONY: help Makefile
|
||||
|
||||
tools/wptserve:
|
||||
tools/%:
|
||||
mkdir -p $(shell dirname $@)
|
||||
ln -s ../../tools/wptserve $@
|
||||
test -d ../$@
|
||||
ln -s ../../$@ $@
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile tools/wptserve
|
||||
%: Makefile tools/wptserve tools/certs
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
# Appendices
|
||||
|
||||
```eval_rst
|
||||
.. toctree ::
|
||||
:maxdepth: 1
|
||||
|
||||
github-intro
|
||||
reverting
|
||||
test-templates
|
||||
```
|
|
@ -53,10 +53,9 @@ free to add yourself to the META.yml file!
|
|||
writing-tests/index
|
||||
reviewing-tests/index
|
||||
admin/index
|
||||
appendix/index
|
||||
```
|
||||
|
||||
[public-test-infra]: https://lists.w3.org/Archives/Public/public-test-infra/
|
||||
[IRC]: irc://irc.w3.org:6667/testing
|
||||
[web irc]: http://irc.w3.org
|
||||
[github-intro]: appendix/github-intro
|
||||
[github-intro]: writing-tests/github-intro
|
||||
|
|
|
@ -28,6 +28,7 @@ if errorlevel 9009 (
|
|||
if not exist tools\ ( mkdir tools )
|
||||
|
||||
if not exist tools\wptserve\ ( mklink /d tools\wptserve ..\..\tools\wptserve )
|
||||
if not exist tools\certs\ ( mklink /d tools\certs ..\..\tools\certs )
|
||||
|
||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
|
||||
goto end
|
||||
|
|
|
@ -76,8 +76,8 @@ If you do not expect work with more PRs from the same author,
|
|||
you may also discard your connection to their repo:
|
||||
`git remote remove <author-id>`
|
||||
|
||||
[clone]: ../appendix/github-intro.html#clone
|
||||
[commit]: ../appendix/github-intro.html#commit
|
||||
[configure]: ../appendix/github-intro.html#configure-remote-upstream
|
||||
[fork]: ../appendix/github-intro.html#fork-the-test-repository
|
||||
[submit]: ../appendix/github-intro.html#submit
|
||||
[clone]: ../writing-tests/github-intro.html#clone
|
||||
[commit]: ../writing-tests/github-intro.html#commit
|
||||
[configure]: ../writing-tests/github-intro.html#configure-remote-upstream
|
||||
[fork]: ../writing-tests/github-intro.html#fork-the-test-repository
|
||||
[submit]: ../writing-tests/github-intro.html#submit
|
||||
|
|
|
@ -10,6 +10,7 @@ suites, test contributions must be reviewed by a peer.
|
|||
checklist
|
||||
email
|
||||
git
|
||||
reverting
|
||||
```
|
||||
|
||||
## Test Review Policy
|
||||
|
|
|
@ -104,7 +104,7 @@ https://web-platform.test:8443/tools/runner/index.html *
|
|||
This server has all the capabilities of the publicly-deployed version--see
|
||||
[Running the Tests from the Web](from-web).
|
||||
|
||||
\**See [Trusting Root CA](https://github.com/web-platform-tests/wpt/blob/master/README.md#trusting-root-ca)*
|
||||
\**See [Trusting Root CA](../tools/certs/README.md)*
|
||||
|
||||
## Via the command line
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
from-web
|
||||
from-local-system
|
||||
custom-runner
|
||||
../tools/certs/README.md
|
||||
```
|
||||
|
||||
The simplest way to run the tests is via the public website. More detail on
|
||||
|
|
|
@ -26,8 +26,11 @@ There's also a load of [general guidelines](general-guidelines) that apply to al
|
|||
testdriver
|
||||
testdriver-tutorial
|
||||
testharness
|
||||
tools
|
||||
visual
|
||||
wdspec
|
||||
test-templates
|
||||
github-intro
|
||||
```
|
||||
|
||||
## Test Type
|
||||
|
|
|
@ -19,7 +19,7 @@ You'll need to [configure your system to use WPT's
|
|||
tools](../running-tests/from-local-system), but you won't need them until
|
||||
towards the end of this tutorial. Although it includes some very brief
|
||||
instructions on using git, you can find more guidance in [the tutorial for git
|
||||
and GitHub](../appendix/github-intro).
|
||||
and GitHub](../writing-tests/github-intro).
|
||||
|
||||
WPT's reftests are great for testing web-platform features that have some
|
||||
visual effect. [The reftests reference page](reftests) describes them in the
|
||||
|
@ -264,7 +264,7 @@ And now we can push the commit to our fork of WPT:
|
|||
The last step is to submit the test for review. WPT doesn't actually need the
|
||||
test we wrote in this tutorial, but if we wanted to submit it for inclusion in
|
||||
the repository, we would create a pull request on GitHub. [The guide on git and
|
||||
GitHub](../appendix/github-intro) has all the details on how to do that.
|
||||
GitHub](../writing-tests/github-intro) has all the details on how to do that.
|
||||
|
||||
## More practice
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ on, e.g. `git checkout -b topic-name`
|
|||
request will be automatically merged.
|
||||
|
||||
For detailed guidelines on setup and each of these steps, please refer to the
|
||||
[Github Test Submission](../appendix/github-intro) documentation.
|
||||
[Github Test Submission](../writing-tests/github-intro) documentation.
|
||||
|
||||
Hop on to the [mailing list][public-test-infra] or [IRC][]
|
||||
([webclient][web irc], join channel `#testing`) if you have an issue. There is
|
||||
|
|
25
tests/wpt/web-platform-tests/docs/writing-tests/tools.md
Normal file
25
tests/wpt/web-platform-tests/docs/writing-tests/tools.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Command-line utility scripts
|
||||
|
||||
Sometimes you may want to add a script to the repository that's meant to be
|
||||
used from the command line, not from a browser (e.g., a script for generating
|
||||
test files). If you want to ensure (e.g., for security reasons) that such
|
||||
scripts won't be handled by the HTTP server, but will instead only be usable
|
||||
from the command line, then place them in either:
|
||||
|
||||
* the `tools` subdir at the root of the repository, or
|
||||
|
||||
* the `tools` subdir at the root of any top-level directory in the repository
|
||||
which contains the tests the script is meant to be used with
|
||||
|
||||
Any files in those `tools` directories won't be handled by the HTTP server;
|
||||
instead the server will return a 404 if a user navigates to the URL for a file
|
||||
within them.
|
||||
|
||||
If you want to add a script for use with a particular set of tests but there
|
||||
isn't yet any `tools` subdir at the root of a top-level directory in the
|
||||
repository containing those tests, you can create a `tools` subdir at the root
|
||||
of that top-level directory and place your scripts there.
|
||||
|
||||
For example, if you wanted to add a script for use with tests in the
|
||||
`notifications` directory, create the `notifications/tools` subdir and put your
|
||||
script there.
|
|
@ -22,6 +22,13 @@
|
|||
"application/dash+xml", // video format
|
||||
"image/gif;HI=THERE",
|
||||
|
||||
// Non-image MIME-types that in practice get used for images on the web.
|
||||
//
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1302539
|
||||
"application/octet-stream",
|
||||
// https://crbug.com/990853
|
||||
"application/x-www-form-urlencoded",
|
||||
|
||||
// MIME types that may seem to be JSON or XML, but really aren't - i.e.
|
||||
// these MIME types are not covered by:
|
||||
// - https://mimesniff.spec.whatwg.org/#json-mime-type
|
||||
|
|
Binary file not shown.
|
@ -33,13 +33,7 @@ dictionary NDEFRecordInit {
|
|||
NDEFRecordData data;
|
||||
};
|
||||
|
||||
enum NDEFRecordType {
|
||||
"empty",
|
||||
"text",
|
||||
"url",
|
||||
"json",
|
||||
"opaque"
|
||||
};
|
||||
typedef DOMString NDEFRecordType;
|
||||
|
||||
typedef (DOMString or ArrayBuffer or NDEFMessageInit) NDEFMessageSource;
|
||||
|
||||
|
|
|
@ -12,10 +12,6 @@
|
|||
math, mspace {
|
||||
font-size: 10px;
|
||||
}
|
||||
@font-face {
|
||||
font-family: axisheight7000;
|
||||
src: url("/fonts/math/stack-axisheight7000.woff");
|
||||
}
|
||||
@font-face {
|
||||
font-family: bottomdisplaystyleshiftdown5000-axisheight1000;
|
||||
src: url("/fonts/math/stack-bottomdisplaystyleshiftdown5000-axisheight1000.woff");
|
||||
|
@ -56,13 +52,6 @@
|
|||
});
|
||||
|
||||
function runTests() {
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
||||
var v = 7000 * emToPx;
|
||||
assert_approx_equals(getBox("ref0001").top - getBox("num0001").bottom,
|
||||
v, epsilon, "mfrac: axis height");
|
||||
}, "AxisHeight");
|
||||
|
||||
test(function() {
|
||||
assert_true(MathMLFeatureDetection.has_mspace());
|
||||
|
@ -118,16 +107,6 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<p>
|
||||
<math style="font-family: axisheight7000;">
|
||||
<mspace id="ref0001" depth="1em" width="3em" style="background: green"/>
|
||||
<mfrac linethickness="0px">
|
||||
<mspace width="3em" height="1em" id="num0001" style="background: blue"/>
|
||||
<mspace width="3em"/>
|
||||
</mfrac>
|
||||
</math>
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
<math display="block" style="font-family: bottomdisplaystyleshiftdown5000-axisheight1000;">
|
||||
<mspace id="ref0002" width="3em" height="1em" style="background: green"/>
|
||||
|
|
|
@ -3,17 +3,6 @@
|
|||
from utils import mathfont
|
||||
import fontforge
|
||||
|
||||
v = 7 * mathfont.em
|
||||
f = mathfont.create("stack-axisheight%d" % v)
|
||||
f.math.AxisHeight = v
|
||||
f.math.StackBottomDisplayStyleShiftDown = 0
|
||||
f.math.StackBottomShiftDown = 0
|
||||
f.math.StackDisplayStyleGapMin = 0
|
||||
f.math.StackGapMin = 0
|
||||
f.math.StackTopDisplayStyleShiftUp = 0
|
||||
f.math.StackTopShiftUp = 0
|
||||
mathfont.save(f)
|
||||
|
||||
v1 = 5 * mathfont.em
|
||||
v2 = 1 * mathfont.em
|
||||
f = mathfont.create("stack-bottomdisplaystyleshiftdown%d-axisheight%d" % (v1, v2))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// META: script=/resources/WebIDLParser.js
|
||||
// META: script=/resources/idlharness.js
|
||||
|
||||
// https://wicg.github.io/mediasession/
|
||||
// https://w3c.github.io/mediasession/
|
||||
|
||||
'use strict';
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue