content/html/document/test/test_form-parsing.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <title>Test for Form parsing</title>
     5   <script type="text/javascript" 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="content" style="display: none">
    10   <div>
    11     <form name="test" action="test" id="test">
    12                     <input type="text" name="text1" id="text1" />
    13                     <input type="text" name="text2" id="text2" />
    14   </div>
    15                     <input type="text" name="text3" id="text3" />
    16                     <input type="text" name="text4" id="text4" />
    17                     <input type="text" name="text5" id="text5" />
    18                     <input type="text" name="text6" id="text6" />
    19     </form>
    20 </div>
    21 <pre id="test">
    22 <script class="testbody" type="text/javascript">
    24   var form1 = document.getElementById("test");
    25   var elem1 = form1.getElementsByTagName("*");
    26   var elem1Length = elem1.length;
    27   var form1ElementsLength = form1.elements.length;
    29   is(form1ElementsLength, 6, "form.elements must include mis-nested elements");
    30   is(elem1Length, 2, "form must not include mis-nested elements");
    31 </script>
    32 </pre>
    33 </body>
    34 </html>

mercurial