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

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

Powered by Google App Engine
This is Rietveld 408576698