Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLFormElement/elements-not-in-document.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script src="script-tests/elements-not-in-document.js"></script> 7 <script>
8 description('Test the elements collection when the form is not a descendant of t he document. This test case failed in an early version of Acid3.');
9
10 var f = document.createElement('form');
11 var i = document.createElement('input');
12 i.name = 'first';
13 i.type = 'text';
14 i.value = 'test';
15 f.appendChild(i);
16
17 shouldBe("i.getAttribute('name')", "'first'");
18 shouldBe("i.name", "'first'");
19 shouldBe("i.getAttribute('type')", "'text'");
20 shouldBe("i.type", "'text'");
21 shouldBe("i.value", "'test'");
22 shouldBe("f.elements.length", "1");
23 shouldBe("f.elements[0]", "i");
24 shouldBe("f.elements.first", "i");
25
26 f.elements.second;
27 i.name = 'second';
28 i.type = 'password';
29 i.value = 'TEST';
30
31 // This has to be the first expression tested, because reporting the result will fix the bug.
32 shouldBe("f.elements.second", "i");
33
34 shouldBe("i.getAttribute('name')", "'second'");
35 shouldBe("i.name", "'second'");
36 shouldBe("i.getAttribute('type')", "'password'");
37 shouldBe("i.type", "'password'");
38 shouldBe("i.value", "'TEST'");
39 shouldBe("f.elements.length", "1");
40 shouldBe("f.elements[0]", "i");
41 shouldBe("f.elements.first", "undefined");
42 shouldBe("f.elements.second", "i");
43 </script>
8 </body> 44 </body>
9 </html> 45 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698