Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / element-order.html
blobca83fe7cf093c77b019b65be0abb0a902d310fdc
1 <html>
2 <head>
3 <script>
4 function test() {
5 if (window.testRunner)
6 testRunner.dumpAsText();
8 var f = window.document.forms[0];
10 var e = document.createElement('input');
11 e.type = 'text'
12 e.name = 'y';
13 e.value = 'y';
14 f.replaceChild(e, f.y);
16 for (var i = 0; i < f.elements.length; i++) {
17 var line = document.createElement("div");
18 line.appendChild(document.createTextNode(f.elements[i].name));
19 document.getElementById("result").appendChild(line);
22 </script>
23 <body onload="test()">
24 <p>This test checks that the elements array of a form element returns the elements in document order
25 rather than order of insertion into the document. Older versions of WebKit returned the elements in
26 order of insertion.</p>
27 <p>If the test works properly, the text at the bottom will most likely say "x" then "y" then "z" in that order.
28 If it fails, it will most likely say "x", then "z", then "y".</p>
29 <hr>
30 <p>
31 <form>
32 <input type='text' name='x' value='x'>
33 <input type='text' name='y' value='y'>
34 <input type='text' name='z' value='z'>
35 </form>
36 </p>
37 <hr>
38 <p id="result"></p>
39 </body>
40 </html>