OLD | NEW |
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 import 'dart:collection'; | 5 import 'dart:collection'; |
6 import 'dart:html'; | 6 import 'dart:html'; |
7 | 7 |
8 import 'package:minitest/minitest.dart'; | 8 import 'package:expect/minitest.dart'; |
9 | 9 |
10 Element makeElement() => new Element.tag('div'); | 10 Element makeElement() => new Element.tag('div'); |
11 | 11 |
12 Element makeElementWithClasses() => | 12 Element makeElementWithClasses() => |
13 new Element.html('<div class="foo bar baz"></div>'); | 13 new Element.html('<div class="foo bar baz"></div>'); |
14 | 14 |
15 CssClassSet makeClassSet() => makeElementWithClasses().classes; | 15 CssClassSet makeClassSet() => makeElementWithClasses().classes; |
16 | 16 |
17 Element makeListElement() => | 17 Element makeListElement() => |
18 new Element.html('<ul class="foo bar baz">' | 18 new Element.html('<ul class="foo bar baz">' |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 expect(view(elements.classes), '[quux, qux]'); | 384 expect(view(elements.classes), '[quux, qux]'); |
385 expect(view(elements), '[[quux, qux], [], [], [qux]]'); | 385 expect(view(elements), '[[quux, qux], [], [], [qux]]'); |
386 }); | 386 }); |
387 | 387 |
388 test('listContainsAll', () { | 388 test('listContainsAll', () { |
389 var elements = listElementSetup(); | 389 var elements = listElementSetup(); |
390 expect(elements.classes.containsAll(['qux', 'meta', 'mornin']), isFalse); | 390 expect(elements.classes.containsAll(['qux', 'meta', 'mornin']), isFalse); |
391 expect(elements.classes.containsAll(['qux', 'lassy', 'classy']), isTrue); | 391 expect(elements.classes.containsAll(['qux', 'lassy', 'classy']), isTrue); |
392 }); | 392 }); |
393 } | 393 } |
OLD | NEW |