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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Element/classlist-empty-string.html

Issue 1388903002: className should be allowed to be a whitespace-only string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Element/classlist-empty-string-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/Element/classlist-empty-string.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Element/classlist-empty-string.html b/third_party/WebKit/LayoutTests/fast/dom/Element/classlist-empty-string.html
new file mode 100644
index 0000000000000000000000000000000000000000..5d6da588ede09b6a9d965912ce3d27f78f224f0d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/Element/classlist-empty-string.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<script src="../../../resources/js-test.js"></script>
+<script>
+debug("Check the classlist length attribute for empty strings");
+var div = document.createElement('div');
+div.className = ' ';
+shouldBe("div.className.length", "3");
+
+div.className = ' ';
+shouldBe("div.className.length", "5");
+</script>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Element/classlist-empty-string-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698