Backed out changeset f594e6f00208 (bug 1940883) for causing crashes in bug 1941164.
[gecko.git] / dom / network / tests / test_tcpsocket_not_exposed_to_content.html
blob4154eeca5cf87f467a6f975dd4a30946fe10e787
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Test to ensure TCPSocket permission enabled and no tcp-socket perm does not allow open</title>
5 <script src="/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
7 </head>
8 <body>
9 <p id="display"></p>
10 <div id="content" style="display: none">
11 </div>
12 <pre id="test">
13 <script type="application/javascript">
14 /**
15 * TCPSocket and its legacy mozTCPSocket variant should never be exposed to
16 * content.
19 is('TCPSocket' in this, false, "TCPSocket should not be accessible to content");
20 is('TCPServerSocket' in this, false, "TCPServerSocket should not be accessible to content");
21 is('mozTCPSocket' in navigator, false, "mozTCPSocket should not be accessible to content");
22 </script>
23 </pre>
24 </body>
25 </html>