-
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. This downgrades the resources submodule due to #5568 which prevents these tests (and many, many other tests in WPT) from working. Worklets are not tested at this time due to spec uncertainty.
- Loading branch information
Showing
7 changed files
with
92 additions
and
1 deletion.
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:d@domenic.me"> | ||
<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:d@domenic.me"> | ||
<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:d@domenic.me"> | ||
<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:d@domenic.me"> | ||
<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(); |
17 changes: 17 additions & 0 deletions
17
...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,17 @@ | ||
"use strict"; | ||
importScripts("/resources/testharness.js"); | ||
|
||
console.log("what is wrong with shared workers"); | ||
|
||
test(() => { | ||
console.log("got here?! 1111"); | ||
const sab = new SharedArrayBuffer(16); | ||
const ta = new Int32Array(sab); | ||
|
||
console.log("got here?!"); | ||
|
||
// Test passes if this doesn't throw | ||
Atomics.wait(ta, 0, 0, 10); | ||
}, `[[CanBlock]] in a ${self.constructor.name}`); | ||
|
||
done(); |
Submodule resources
updated
5 files
+0 −57 | docs/api.md | |
+0 −26 | examples/apisample18.html | |
+0 −26 | examples/apisample19.html | |
+0 −20 | idlharness.js | |
+81 −129 | testharness.js |