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

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial