mirror of
https://github.com/servo/servo.git
synced 2025-06-28 19:13:41 +01:00
25 lines
839 B
HTML
25 lines
839 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>Async local storage: should not work in non-secure contexts when included via a script element</title>
|
|
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<script>
|
|
"use strict";
|
|
setup({ allow_uncaught_exception: true });
|
|
|
|
test(() => {
|
|
assert_false(self.isSecureContext, "This test must run in a non-secure context");
|
|
}, "Prerequisite check");
|
|
|
|
async_test(t => {
|
|
self.addEventListener("error", t.step_func_done(errorEvent => {
|
|
assert_equals(errorEvent.error.constructor, DOMException, "Must trigger a DOMException");
|
|
assert_equals(errorEvent.error.name, "SecurityError",
|
|
"The DOMException must be a \"SecurityError\"");
|
|
}, { once: true }));
|
|
});
|
|
</script>
|
|
|
|
<script type="module" src="std:async-local-storage"></script>
|