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

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

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
(Empty)
1 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.');
2
3 var f = document.createElement('form');
4 var i = document.createElement('input');
5 i.name = 'first';
6 i.type = 'text';
7 i.value = 'test';
8 f.appendChild(i);
9
10 shouldBe("i.getAttribute('name')", "'first'");
11 shouldBe("i.name", "'first'");
12 shouldBe("i.getAttribute('type')", "'text'");
13 shouldBe("i.type", "'text'");
14 shouldBe("i.value", "'test'");
15 shouldBe("f.elements.length", "1");
16 shouldBe("f.elements[0]", "i");
17 shouldBe("f.elements.first", "i");
18
19 f.elements.second;
20 i.name = 'second';
21 i.type = 'password';
22 i.value = 'TEST';
23
24 // This has to be the first expression tested, because reporting the result will fix the bug.
25 shouldBe("f.elements.second", "i");
26
27 shouldBe("i.getAttribute('name')", "'second'");
28 shouldBe("i.name", "'second'");
29 shouldBe("i.getAttribute('type')", "'password'");
30 shouldBe("i.type", "'password'");
31 shouldBe("i.value", "'TEST'");
32 shouldBe("f.elements.length", "1");
33 shouldBe("f.elements[0]", "i");
34 shouldBe("f.elements.first", "undefined");
35 shouldBe("f.elements.second", "i");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698