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

Unified Diff: tests/html/element_classes_test.dart

Issue 10868026: Adding .toggle method to Element.classes to match the JS element.classList.toggle method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporating review feedback. Created 8 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
« no previous file with comments | « tests/html/documentfragment_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/element_classes_test.dart
diff --git a/tests/html/element_classes_test.dart b/tests/html/element_classes_test.dart
index 7b325bb6749392029c927078dcaddac3a36f5b90..e4a8d50945647a7ff700d35e9dd5082238f3507a 100644
--- a/tests/html/element_classes_test.dart
+++ b/tests/html/element_classes_test.dart
@@ -123,6 +123,14 @@ main() {
Expect.setEquals(['foo', 'baz'], classes);
});
+ test('toggle', () {
+ final classes = makeClassSet();
+ classes.toggle('bar');
+ Expect.setEquals(['foo', 'baz'], classes);
+ classes.toggle('qux');
+ Expect.setEquals(['foo', 'baz', 'qux'], classes);
+ });
+
test('addAll', () {
final classes = makeClassSet();
classes.addAll(['bar', 'qux', 'bip']);
« no previous file with comments | « tests/html/documentfragment_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698