tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_websocket_sandbox.html (928B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Bug 1252751</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 <div id="container"></div>
     10 <iframe id="frame"></iframe>
     11 <script type="application/javascript">
     12 var urls = [ "https://example.com/tests/dom/websocket/tests/iframe_websocket_sandbox.html",
     13             "https://example.com/tests/dom/websocket/tests/iframe_websocket_sandbox.html?nested",
     14             "https://example.com/tests/dom/websocket/tests/iframe_websocket_sandbox.html?popup" ];
     15 
     16 onmessage = function(e) {
     17  is(e.data, "WS Throws!", "ws://URI cannot be used by a https iframe");
     18  runTest();
     19 }
     20 
     21 function runTest() {
     22  if (!urls.length) {
     23    SimpleTest.finish();
     24    return;
     25  }
     26 
     27  document.getElementById("frame").src = urls.shift();
     28 }
     29 
     30 SimpleTest.waitForExplicitFinish();
     31 runTest();
     32 </script>
     33 </body>
     34 </html>