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

Unified Diff: LayoutTests/fast/dom/getElementsByClassName/script-tests/non-styled-elements.js

Issue 458663003: getElementsByClassName should include non styled Elements (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use use js-test.js 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/script-tests/non-styled-elements.js
diff --git a/LayoutTests/fast/dom/getElementsByClassName/script-tests/non-styled-elements.js b/LayoutTests/fast/dom/getElementsByClassName/script-tests/non-styled-elements.js
new file mode 100644
index 0000000000000000000000000000000000000000..b6fd328ec016fd4bb092d3aae182d9fd3f37bd2f
--- /dev/null
+++ b/LayoutTests/fast/dom/getElementsByClassName/script-tests/non-styled-elements.js
@@ -0,0 +1,11 @@
+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);
+
+shouldBeTrue("document.getElementsByClassName('target').length == 2");
Inactive 2014/08/16 17:17:10 nit: shouldBe("document.getElementsByClassName('ta

Powered by Google App Engine
This is Rietveld 408576698