content/media/test/test_access_control.html

Fri, 16 Jan 2015 04:50:19 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 04:50:19 +0100
branch
TOR_BUG_9701
changeset 13
44a2da4a2ab2
permissions
-rw-r--r--

Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=451958
     5 -->
     6 <head>
     7   <title>Test for Bug 451958</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    10   <script type="text/javascript" src="manifest.js"></script>
    11 </head>
    12 <body>
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=451958">Mozilla Bug 451958</a>
    14 <p id="display"></p>
    15 <div id="content" style="display: none">
    16 </div>
    17 <pre id="test">
    18 <script type="application/javascript">
    20 /** Test for Bug 451958 **/
    22 function run() {
    23   window.open("http://example.org:80/tests/content/media/test/file_access_controls.html", "", "width=500,height=500");
    24 }
    26 function done() {
    27   mediaTestCleanup();
    28   SimpleTest.finish();
    29 }
    31 addLoadEvent(run);
    32 SimpleTest.waitForExplicitFinish();
    35 window.addEventListener("message", receiveMessage, false);
    37 function receiveMessage(event)
    38 {
    39   if (event.origin !== "http://example.org") {
    40     ok(false, "Received message from wrong domain");
    41     return;
    42   }
    44   if (event.data.done == "true")
    45     return done();
    47   ok(event.data.result, event.data.message);
    48 }
    49 </script>
    50 </pre>
    51 </body>
    52 </html>

mercurial