content/html/content/test/test_bug332893-6.html

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 <!DOCTYPE html>
     2 <html>
     3 <head>
     4   <title>Test</title>
     5   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     6 </head>
     7 <body>
     8 <form id="form1">
     9    <input id="input1" type="input" name="input" value="1"/>
    10    <input id="input" type="input" name="input_other" value="2"/>
    11    <input id="input3" type="input" name="input" value="3"/>
    12 </form>
    13 <script>
    14 	var input1 = document.getElementById("input1");
    15       var input2 = document.getElementById("input");
    16       var form1 = document.getElementById("form1");
    17       form1.insertBefore(input2, input1);
    19 	is(form1.elements["input"].length, "3", "Form 1 'input' has the correct length");
    20 	is(form1.elements["input"][0].value, "2", "Form 1 element 1 is correct");
    21 	is(form1.elements["input"][1].value, "1", "Form 1 element 2 is correct");
    23 	is(form1.elements["input"][0].id, "input", "Form 1 element 1 id is correct");
    24 	is(form1.elements["input"][1].id, "input1", "Form 1 element 2 id is correct");
    25 </script>
    26 </body>
    27 </html>

mercurial