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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Document/title-with-multiple-children.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/title-with-multiple-children.js"></script> 7 <script>
8 description("This test checks to see if setting document.title works even if the title element has multiple children.");
9
10 // Setup - create title element.
11 shouldBe("document.getElementsByTagName('title').length", "0");
12 var titleElement = document.createElement("title");
13 document.body.appendChild(titleElement);
14
15 // For case with no children.
16 shouldBe("document.title", "''");
17 shouldBe("titleElement.text", "''");
18
19 // For case with single children.
20 var firstText = "First";
21 titleElement.appendChild(document.createTextNode(firstText));
22 shouldBe("document.title", "firstText");
23 shouldBe("titleElement.text", "firstText");
24
25 // For case with 2 children.
26 var secondText = "Second";
27 titleElement.appendChild(document.createTextNode(secondText));
28 shouldBe("document.title", "firstText + secondText");
29 shouldBe("titleElement.text", "firstText + secondText");
30
31 // override title with setting document.title with multiple title children.
32 var expected = "This title is set by property";
33 document.title = expected;
34 shouldBe("document.title", "expected");
35 shouldBe("titleElement.text", "expected");
36 </script>
8 </body> 37 </body>
9 </html> 38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698