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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/SelectorAPI/undefined-null-stringify.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/undefined-null-stringify.js"></script> 7 <script>
8 description(
9 "This tests that the querySelector, querySelectorAll and matchesSelector (webkit MatchesSelector) correctly stringify null and undefined to \"null\" and \"undefi ned\"."
10 );
11
12 var root = document.createElement('div');
13 var nullNode = document.createElement('null');
14 root.appendChild(nullNode);
15 var undefinedNode = document.createElement('undefined');
16 root.appendChild(undefinedNode);
17 document.body.appendChild(root);
18
19 shouldBe("document.querySelector(null)", "nullNode");
20 shouldBe("document.querySelector(undefined)", "undefinedNode");
21
22 shouldBe("document.querySelectorAll(null).length", "1");
23 shouldBe("document.querySelectorAll(null).item(0)", "nullNode");
24 shouldBe("document.querySelectorAll(undefined).length", "1");
25 shouldBe("document.querySelectorAll(undefined).item(0)", "undefinedNode");
26
27 shouldBeTrue("nullNode.webkitMatchesSelector(null)");
28 shouldBeTrue("undefinedNode.webkitMatchesSelector(undefined)");
29 </script>
8 </body> 30 </body>
9 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698