blob: 5d5533613c96ccd659f62dc9edc0a6596cb49414 [file] [log] [blame] [edit]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Sockets test: Can be disabled by permissions policy</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
</head>
<body>
<script>
'use strict';
test(() => {
assert_throws_dom("NotAllowedError", () => new TCPSocket("address.com", 53), "constructor should throw");
}, "tcp disabled by permissions-policy");
test(() => {
assert_throws_dom("NotAllowedError", () => new UDPSocket("address.com", 53), "constructor should throw");
}, "udp disabled by permissions-policy");
</script>
</body>
</html>