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

Unified Diff: tests/html/element_classes_test.dart

Issue 1096433006: Revert "Enforce token syntax for CssClassSet arguments" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | « sdk/lib/html/html_common/css_class_set.dart ('k') | tests/html/svgelement_test.dart » ('j') | 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 2846d0dbc70e41544850152754ba1ebef5ee18d2..14af4bdeba7a26727b7d73d66342f157cb7bbeb1 100644
--- a/tests/html/element_classes_test.dart
+++ b/tests/html/element_classes_test.dart
@@ -129,15 +129,6 @@ main() {
expect(makeClassSet().contains('qux'), isFalse);
});
- test('contains-bad', () {
- // Non-strings return `false`.
- // Strings need to be valid tokens.
- final classes = makeClassSet();
- expect(classes.contains(1), isFalse);
- expect(() => classes.contains(''), throws);
- expect(() => classes.contains('foo bar'), throws);
- });
-
test('add', () {
final classes = makeClassSet();
var added = classes.add('qux');
@@ -152,12 +143,6 @@ main() {
reason: "The class set shouldn't have duplicate elements.");
});
- test('add-bad', () {
- final classes = makeClassSet();
- expect(() => classes.add(''), throws);
- expect(() => classes.add('foo bar'), throws);
- });
-
test('remove', () {
final classes = makeClassSet();
classes.remove('bar');
@@ -166,12 +151,6 @@ main() {
expect(classes, orderedEquals(['foo', 'baz']));
});
- test('remove-bad', () {
- final classes = makeClassSet();
- expect(() => classes.remove(''), throws);
- expect(() => classes.remove('foo bar'), throws);
- });
-
test('toggle', () {
final classes = makeClassSet();
classes.toggle('bar');
@@ -189,16 +168,6 @@ main() {
expect(classes, orderedEquals(['foo', 'baz', 'qux']));
});
- test('toggle-bad', () {
- final classes = makeClassSet();
- expect(() => classes.toggle(''), throws);
- expect(() => classes.toggle('', true), throws);
- expect(() => classes.toggle('', false), throws);
- expect(() => classes.toggle('foo bar'), throws);
- expect(() => classes.toggle('foo bar', true), throws);
- expect(() => classes.toggle('foo bar', false), throws);
- });
-
test('addAll', () {
final classes = makeClassSet();
classes.addAll(['bar', 'qux', 'bip']);
« no previous file with comments | « sdk/lib/html/html_common/css_class_set.dart ('k') | tests/html/svgelement_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698