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

Unified 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, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/SelectorAPI/undefined-null-stringify.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/SelectorAPI/undefined-null-stringify.html b/third_party/WebKit/LayoutTests/fast/dom/SelectorAPI/undefined-null-stringify.html
index 4c92c9186422bab990cb5c5f508e02359a2bbf37..18b9911e2baac8d6bbb66e9289adcb89f8e040e0 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/SelectorAPI/undefined-null-stringify.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/SelectorAPI/undefined-null-stringify.html
@@ -4,6 +4,28 @@
<script src="../../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/undefined-null-stringify.js"></script>
+<script>
+description(
+"This tests that the querySelector, querySelectorAll and matchesSelector (webkitMatchesSelector) correctly stringify null and undefined to \"null\" and \"undefined\"."
+);
+
+var root = document.createElement('div');
+var nullNode = document.createElement('null');
+root.appendChild(nullNode);
+var undefinedNode = document.createElement('undefined');
+root.appendChild(undefinedNode);
+document.body.appendChild(root);
+
+shouldBe("document.querySelector(null)", "nullNode");
+shouldBe("document.querySelector(undefined)", "undefinedNode");
+
+shouldBe("document.querySelectorAll(null).length", "1");
+shouldBe("document.querySelectorAll(null).item(0)", "nullNode");
+shouldBe("document.querySelectorAll(undefined).length", "1");
+shouldBe("document.querySelectorAll(undefined).item(0)", "undefinedNode");
+
+shouldBeTrue("nullNode.webkitMatchesSelector(null)");
+shouldBeTrue("undefinedNode.webkitMatchesSelector(undefined)");
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698