mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 0ed072539aa45d3a5a67c9164b243d27873f257c
This commit is contained in:
parent
0954871992
commit
e613cfd108
76 changed files with 1109 additions and 703 deletions
|
@ -0,0 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>link element rel is ASCII case-insensitive (mismatch reference)</title>
|
||||
<link rel="stylesheet" href="stylesheet.css">
|
||||
<p>Test passes if background is not red.</p>
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>link element rel is ASCII case-insensitive</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/#the-link-element">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/#attr-link-rel">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/#linkTypes">
|
||||
<meta name="assert" content="link element's rel attribute is ASCII case-insensitive.">
|
||||
<link rel="mismatch" href="link-rel-attribute-ascii-case-insensitive-notref.html">
|
||||
|
||||
<!-- Load sheet with a red background (rel attribute value is case-sensitive
|
||||
equal to "stylesheet") -->
|
||||
<link rel="stylesheet" href="stylesheet.css">
|
||||
|
||||
<!-- Load sheet with white background (rel attribute value is ASCII
|
||||
case-insensitive equal to "stylesheet") -->
|
||||
<link rel="StyLeShEeT" href="style.css">
|
||||
|
||||
<!-- Do not load sheet with a red background (rel attribute value is
|
||||
case-insensitive equal to "stylesheet") -->
|
||||
<link rel="ſtyleſheet" href="stylesheet.css">
|
||||
|
||||
<p>Test passes if background is not red.</p>
|
|
@ -0,0 +1,29 @@
|
|||
<!doctype html>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script>
|
||||
promise_test(async (test) => {
|
||||
const reg = await navigator.serviceWorker.register('./serviceworker.js', { type: 'module' });
|
||||
test.add_cleanup(() => reg.unregister());
|
||||
assert_not_equals(reg.installing, undefined);
|
||||
}, "Javascript importing JSON Module should load within the context of a service worker");
|
||||
|
||||
promise_test(async (test) => {
|
||||
const reg = await navigator.serviceWorker.register('./module.json', { type: 'module' });
|
||||
test.add_cleanup(() => reg.unregister());
|
||||
assert_not_equals(reg.installing, undefined);
|
||||
}, "JSON Modules should load within the context of a service worker");
|
||||
|
||||
promise_test(async (test) => {
|
||||
const reg = await navigator.serviceWorker.register('./serviceworker-dynamic-import.js', { type: 'module' });
|
||||
test.add_cleanup(() => reg.unregister());
|
||||
assert_not_equals(reg.installing, undefined);
|
||||
reg.installing.postMessage("PING");
|
||||
const msgEvent = await new Promise(resolve => {
|
||||
navigator.serviceWorker.onmessage = resolve;
|
||||
});
|
||||
assert_equals(msgEvent.data, "FAILED");
|
||||
}, "JSON Module dynamic import should not load within the context of a service worker");
|
||||
</script>
|
|
@ -0,0 +1,5 @@
|
|||
onmessage = e => {
|
||||
e.waitUntil(import("./module.json")
|
||||
.then(module => e.source.postMessage("LOADED"))
|
||||
.catch(error => e.source.postMessage("FAILED")));
|
||||
};
|
|
@ -0,0 +1 @@
|
|||
import './module.json';
|
Loading…
Add table
Add a link
Reference in a new issue