Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /serial/requestPort/reject_opaque_origin.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';
promise_test(async (t) => {
await promise_rejects_dom(
t, 'SecurityError', navigator.serial.requestPort(),
'requestPort() should throw a SecurityError DOMException when called ' +
'from a context where the top-level document has an opaque origin.');
}, 'Calls to Serial APIs from an origin with opaque top origin get blocked.');
</script>