content/html/content/test/test_bug300691-3.xhtml

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <html xmlns="http://www.w3.org/1999/xhtml">
     2 <!--
     3 https://bugzilla.mozilla.org/show_bug.cgi?id=300691
     4 -->
     5 <head>
     6   <title>Test for Bug 300691</title>
     7   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     8   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     9 </head>
    10 <body>
    11 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=300691">Mozilla Bug 300691</a>
    12 <p id="display"></p>
    13 <div id="content" style="display: none">
    15 </div>
    16 <pre id="test">
    17 <script type="text/javascript">
    18   // First, setup.  We'll be toggling these variables as we go.
    19   // Note that scripts don't execute immediately when you put text in them --
    20   // they wait for the currently-running script to finish.
    21   var test1Ran = false;
    22   var test2Ran = false;
    23   var test3Ran = false;
    24 </script>
    25 <script id="test1" type="text/javascript">test1Ran = true;</script>
    26 <script id="test2" type="text/javascript"></script>
    27 <script id="test3" type="text/javascript"></script>
    28 <script class="testbody" type="text/javascript">
    29 <![CDATA[
    30   /** Test for Bug 300691 **/
    31   $("test2").appendChild(document.createCDATASection("test2Ran = true"));
    32   is(test2Ran, true, "Should be 2!");
    34   $("test3").appendChild(document.createCDATASection(""));
    35 ]]>
    36 </script>
    37 <script type="text/javascript">
    38   // Follow up on some of those
    39   $("test3").firstChild.data = "test3Ran = true";
    40   is(test3Ran, true, "Should be 3!");
    41 </script>
    42 <script type="text/javascript">
    43   is(test1Ran, true, "Should have run!");
    44 </script>
    45 </pre>
    46 </body>
    47 </html>

mercurial