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

Unified Diff: sky/tests/lowlevel/classlist.sky

Issue 788093003: Add clear() to Element.classList. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/dom/DOMTokenList.idl ('k') | sky/tests/lowlevel/classlist-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tests/lowlevel/classlist.sky
diff --git a/sky/tests/lowlevel/classlist.sky b/sky/tests/lowlevel/classlist.sky
index 1622fa4ac172cc547cf7bf3ea389c0a18cebe3f6..853a817823e05b44ee866587efa5eee04cf4bbce 100644
--- a/sky/tests/lowlevel/classlist.sky
+++ b/sky/tests/lowlevel/classlist.sky
@@ -48,6 +48,14 @@ describe("Class list", function() {
assert.equal(target.classList.toString(), "second");
});
+ it("should clear all classes", function() {
+ target.classList.add("first");
+ target.classList.add("second");
+ target.classList.clear();
+ assert.equal(target.classList.toString(), "");
+ assert.isFalse(target.hasAttribute("class"));
+ });
+
it("should check for classes", function() {
target.classList.add("first", "second", "third");
assert.isTrue(target.classList.contains("first"));
« no previous file with comments | « sky/engine/core/dom/DOMTokenList.idl ('k') | sky/tests/lowlevel/classlist-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698