Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/permission-element/usermedia/usermedia-secure-context.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8" />
<title>HTMLUserMediaElement Test: Secure Context exposure</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
test(() => {
assert_false(window.isSecureContext, "This test must run in an insecure context");
assert_equals(
window.HTMLUserMediaElement,
undefined,
"HTMLUserMediaElement should not be exposed in an insecure context",
);
}, "HTMLUserMediaElement interface is restricted to secure contexts.");
</script>
</body>