mirror of
https://github.com/servo/servo.git
synced 2025-06-27 18:43:40 +01:00
Update web-platform-tests to revision cd0ac591860335b75cdc2576fdc57c840afec870
This commit is contained in:
parent
03fb9c5d6e
commit
8504f7d13d
288 changed files with 7779 additions and 1022 deletions
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
const worker = new SharedWorker(
|
||||
"evaluation-order-1-nothrow-worker-setup.js");
|
||||
fetch_tests_from_worker(worker);
|
||||
</script>
|
|
@ -0,0 +1,4 @@
|
|||
importScripts("/resources/testharness.js");
|
||||
importScripts("module/evaluation-order-setup.mjs");
|
||||
importScripts("module/evaluation-order-1-nothrow-worker.mjs");
|
||||
importScripts("module/evaluation-order-1-nothrow.mjs");
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
const worker = new Worker(
|
||||
"evaluation-order-1-nothrow-worker-setup.js");
|
||||
fetch_tests_from_worker(worker);
|
||||
</script>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="module/evaluation-order-setup.mjs"></script>
|
||||
<script>
|
||||
window.addEventListener("load", ev => globalThis.testDone());
|
||||
globalThis.expectedLog = [
|
||||
"step-1-1", "step-1-2",
|
||||
"microtask",
|
||||
"script-load",
|
||||
"global-load",
|
||||
];
|
||||
</script>
|
||||
|
||||
<script src="module/evaluation-order-1-nothrow.mjs"
|
||||
onerror="globalThis.unreachable()"
|
||||
onload="globalThis.log.push('script-load')"></script>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
const worker = new SharedWorker(
|
||||
"evaluation-order-1-worker-setup.js");
|
||||
fetch_tests_from_worker(worker);
|
||||
</script>
|
|
@ -0,0 +1,4 @@
|
|||
importScripts("/resources/testharness.js");
|
||||
importScripts("module/evaluation-order-setup.mjs");
|
||||
importScripts("module/evaluation-order-1-worker.mjs");
|
||||
importScripts("module/evaluation-order-1.mjs");
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
const worker = new Worker(
|
||||
"evaluation-order-1-worker-setup.js");
|
||||
fetch_tests_from_worker(worker);
|
||||
</script>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="module/evaluation-order-setup.mjs"></script>
|
||||
<script>
|
||||
window.addEventListener("load", event => globalThis.testDone());
|
||||
globalThis.expectedLog = [
|
||||
"step-1-1", "step-1-2",
|
||||
"global-error", "error",
|
||||
"microtask",
|
||||
"script-load",
|
||||
"global-load"
|
||||
];
|
||||
</script>
|
||||
|
||||
<script src="module/evaluation-order-1.mjs"
|
||||
onerror="unreachable()" onload="log.push('script-load')"></script>
|
|
@ -9,6 +9,7 @@
|
|||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
window.addEventListener("onunhandledrejection", unreachable);
|
||||
|
||||
const test_load = async_test(
|
||||
"Parse errors in different files should be reported " +
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
window.addEventListener("onunhandledrejection", unreachable);
|
||||
|
||||
const test_load = async_test(
|
||||
"Instantiation errors in different files should be reported " +
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
window.addEventListener("onunhandledrejection", unreachable);
|
||||
|
||||
const test_load = async_test(
|
||||
"Evaluation errors are cached in intermediate module scripts");
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
window.addEventListener("onunhandledrejection", unreachable);
|
||||
|
||||
const test_load = async_test(
|
||||
"network error has higher priority than parse error");
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
window.addEventListener("onunhandledrejection", unreachable);
|
||||
|
||||
const test_load = async_test(
|
||||
"parse error has higher priority than instantiation error");
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
window.addEventListener("onunhandledrejection", unreachable);
|
||||
|
||||
const test_load = async_test(
|
||||
"instantiation error has higher priority than evaluation error");
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
const worker = new SharedWorker(
|
||||
"evaluation-order-1-nothrow-worker-setup.mjs", {type:"module"});
|
||||
fetch_tests_from_worker(worker);
|
||||
</script>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
const worker = new SharedWorker(
|
||||
"evaluation-order-1-worker-setup.mjs", {type:"module"});
|
||||
fetch_tests_from_worker(worker);
|
||||
</script>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
const worker = new SharedWorker(
|
||||
"evaluation-order-2-import-worker-setup.mjs", {type:"module"});
|
||||
fetch_tests_from_worker(worker);
|
||||
</script>
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
const worker = new SharedWorker(
|
||||
"evaluation-order-3-dynamic-worker-setup.mjs", {type:"module"});
|
||||
fetch_tests_from_worker(worker);
|
||||
</script>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Testing evaluation order</title>
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
setup({allow_uncaught_exception: true});
|
||||
|
||||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => testDone());
|
||||
window.addEventListener("onunhandledrejection", unreachable);
|
||||
|
||||
const test_load = async_test("Test evaluation order of modules");
|
||||
|
||||
window.addEventListener("load", ev => log.push("window-load"));
|
||||
|
||||
function unreachable() { log.push("unexpected"); }
|
||||
function testDone() {
|
||||
test_load.step(() => {
|
||||
assert_array_equals(log, [
|
||||
"step-4.1-1", "step-4.1-2", "microtask-4.1",
|
||||
"script-load", "window-load",
|
||||
"step-4.2-1", "step-4.2-2", "microtask-4.2",
|
||||
]);
|
||||
});
|
||||
test_load.done();
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="module" src="evaluation-order-4.1.mjs"
|
||||
onerror="unreachable()" onload="log.push('script-load')">
|
||||
</script>
|
|
@ -0,0 +1,8 @@
|
|||
log.push("step-4.1-1");
|
||||
queueMicrotask(() => log.push("microtask-4.1"));
|
||||
log.push("step-4.1-2");
|
||||
|
||||
await import("./evaluation-order-4.2.mjs");
|
||||
|
||||
// Not happening as we throw in the above module.
|
||||
log.push("step-4.1-3");
|
|
@ -0,0 +1,5 @@
|
|||
log.push("step-4.2-1");
|
||||
queueMicrotask(() => log.push("microtask-4.2"));
|
||||
log.push("step-4.2-2");
|
||||
|
||||
throw new Error("error");
|
Loading…
Add table
Add a link
Reference in a new issue