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

Side by Side Diff: tests/html/element_classes_test.dart

Issue 13601006: Fix broken test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library ElementTest; 5 library ElementTest;
6 import '../../pkg/unittest/lib/unittest.dart'; 6 import '../../pkg/unittest/lib/unittest.dart';
7 import '../../pkg/unittest/lib/html_config.dart'; 7 import '../../pkg/unittest/lib/html_config.dart';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:html'; 9 import 'dart:html';
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 expect(classes, orderedEquals(['foo', 'bar', 'baz'])); 67 expect(classes, orderedEquals(['foo', 'bar', 'baz']));
68 }); 68 });
69 69
70 test('map', () { 70 test('map', () {
71 expect(makeClassSet().map((c) => c.toUpperCase()).toList(), 71 expect(makeClassSet().map((c) => c.toUpperCase()).toList(),
72 orderedEquals(['FOO', 'BAR', 'BAZ'])); 72 orderedEquals(['FOO', 'BAR', 'BAZ']));
73 }); 73 });
74 74
75 test('where', () { 75 test('where', () {
76 expect(makeClassSet().where((c) => c.contains('a')).toSet(), 76 expect(makeClassSet().where((c) => c.contains('a')).toList(),
77 orderedEquals(['bar', 'baz'])); 77 orderedEquals(['bar', 'baz']));
78 }); 78 });
79 79
80 test('every', () { 80 test('every', () {
81 expect(makeClassSet().every((c) => c is String), isTrue); 81 expect(makeClassSet().every((c) => c is String), isTrue);
82 expect(makeClassSet().every((c) => c.contains('a')), isFalse); 82 expect(makeClassSet().every((c) => c.contains('a')), isFalse);
83 }); 83 });
84 84
85 test('any', () { 85 test('any', () {
86 expect(makeClassSet().any((c) => c.contains('a')), isTrue); 86 expect(makeClassSet().any((c) => c.contains('a')), isTrue);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 test('order', () { 178 test('order', () {
179 var classes = makeClassSet(); 179 var classes = makeClassSet();
180 classes.add('aardvark'); 180 classes.add('aardvark');
181 expect(classes, orderedEquals(['foo', 'bar', 'baz', 'aardvark'])); 181 expect(classes, orderedEquals(['foo', 'bar', 'baz', 'aardvark']));
182 classes.toggle('baz'); 182 classes.toggle('baz');
183 expect(classes, orderedEquals(['foo', 'bar', 'aardvark'])); 183 expect(classes, orderedEquals(['foo', 'bar', 'aardvark']));
184 classes.toggle('baz'); 184 classes.toggle('baz');
185 expect(classes, orderedEquals(['foo', 'bar', 'aardvark', 'baz'])); 185 expect(classes, orderedEquals(['foo', 'bar', 'aardvark', 'baz']));
186 }); 186 });
187 } 187 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698