-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Follows whatwg/html#2521. Worklets are not tested at this time as their API is still in flux.
- Loading branch information
Showing
6 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...ing-model-2/integration-with-the-javascript-agent-formalism/canblock-dedicatedworker.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>[[CanBlock]] in a dedicated worker agent</title> | ||
<link rel="author" title="Domenic Denicola" href="mailto:[email protected]"> | ||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dedicated-worker-agent"> | ||
<link rel="help" href="https://tc39.github.io/ecma262/#sec-agentcansuspend"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<script> | ||
"use strict"; | ||
fetch_tests_from_worker(new Worker("worker-that-requires-success.js")); | ||
</script> |
14 changes: 14 additions & 0 deletions
14
...ssing-model-2/integration-with-the-javascript-agent-formalism/canblock-serviceworker.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>[[CanBlock]] in a service worker agent</title> | ||
<link rel="author" title="Domenic Denicola" href="mailto:[email protected]"> | ||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#service-worker-agent"> | ||
<link rel="help" href="https://tc39.github.io/ecma262/#sec-agentcansuspend"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script> | ||
|
||
<script> | ||
"use strict"; | ||
service_worker_test("worker-that-requires-failure.js", "Service worker test setup"); | ||
</script> |
13 changes: 13 additions & 0 deletions
13
...essing-model-2/integration-with-the-javascript-agent-formalism/canblock-sharedworker.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>[[CanBlock]] in a shared worker agent</title> | ||
<link rel="author" title="Domenic Denicola" href="mailto:[email protected]"> | ||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#shared-worker-agent"> | ||
<link rel="help" href="https://tc39.github.io/ecma262/#sec-agentcansuspend"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<script> | ||
"use strict"; | ||
fetch_tests_from_worker(new SharedWorker("worker-that-requires-success.js")); | ||
</script> |
21 changes: 21 additions & 0 deletions
21
...g/processing-model-2/integration-with-the-javascript-agent-formalism/canblock-window.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>[[CanBlock]] in a similar-origin window agent</title> | ||
<link rel="author" title="Domenic Denicola" href="mailto:[email protected]"> | ||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#similar-origin-window-agent"> | ||
<link rel="help" href="https://tc39.github.io/ecma262/#sec-agentcansuspend"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
|
||
<script> | ||
"use strict"; | ||
|
||
const sab = new SharedArrayBuffer(16); | ||
const ta = new Int32Array(sab); | ||
|
||
assert_throws(new TypeError(), () => { | ||
Atomics.wait(ta, 0, 0, 10); | ||
}, "Atomics.wait must throw in a window context"); | ||
|
||
done(); | ||
</script> |
13 changes: 13 additions & 0 deletions
13
...g-model-2/integration-with-the-javascript-agent-formalism/worker-that-requires-failure.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"use strict"; | ||
importScripts("/resources/testharness.js"); | ||
|
||
test(() => { | ||
const sab = new SharedArrayBuffer(16); | ||
const ta = new Int32Array(sab); | ||
|
||
assert_throws(new TypeError(), () => { | ||
Atomics.wait(ta, 0, 0, 10); | ||
}); | ||
}, `[[CanBlock]] in a ${self.constructor.name}`); | ||
|
||
done(); |
11 changes: 11 additions & 0 deletions
11
...g-model-2/integration-with-the-javascript-agent-formalism/worker-that-requires-success.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"use strict"; | ||
importScripts("/resources/testharness.js"); | ||
|
||
test(() => { | ||
const sab = new SharedArrayBuffer(16); | ||
const ta = new Int32Array(sab); | ||
|
||
assert_equals(Atomics.wait(ta, 0, 0, 10), "timed-out"); | ||
}, `[[CanBlock]] in a ${self.constructor.name}`); | ||
|
||
done(); |