1
0
Fork 0
firefox/testing/web-platform/tests/direct-sockets/disabled-by-permissions-policy.https.sub.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

26 lines
733 B
HTML

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';
test(() => {
assert_throws_dom("NotAllowedError", () => {
new TCPSocket("127.0.0.1", 53);
}, "constructor should throw");
}, "TCPSocket disabled by permissions-policy");
test(() => {
assert_throws_dom("NotAllowedError", () => {
new UDPSocket({ remoteAddress: "127.0.0.1", remotePort: 53 });
}, "constructor should throw");
}, "UDPSocket disabled by permissions-policy");
test(() => {
assert_throws_dom("NotAllowedError", () => {
new TCPServerSocket("127.0.0.1");
}, "constructor should throw");
}, "TCPServerSocket disabled by permissions-policy");
</script>