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

Unified Diff: LayoutTests/fast/dom/getElementsByClassName/non-styled-elements.html

Issue 458663003: getElementsByClassName should include non styled Elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 4 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: LayoutTests/fast/dom/getElementsByClassName/non-styled-elements.html
diff --git a/LayoutTests/fast/dom/getElementsByClassName/non-styled-elements.html b/LayoutTests/fast/dom/getElementsByClassName/non-styled-elements.html
new file mode 100644
index 0000000000000000000000000000000000000000..e4f05ab107a9322d18abfdd536a80222820e1425
--- /dev/null
+++ b/LayoutTests/fast/dom/getElementsByClassName/non-styled-elements.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<script type="text/javascript">
+description("This test checks to see if getElementsByClassName finds non styled elements.");
+
+var d = document.createElement("div");
+d.setAttribute("class", "target");
+document.documentElement.appendChild(d);
+
+var e = document.createElementNS("http://foo.com", "div");
+e.setAttribute("class", "target");
+document.documentElement.appendChild(e);
+
+shouldBe("document.getElementsByClassName('target').length", "2");
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698