OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 import 'dart:svg' as svg; | 7 import 'dart:svg' as svg; |
8 | 8 |
9 import 'package:minitest/minitest.dart'; | 9 import 'package:expect/minitest.dart'; |
10 | 10 |
11 // Test for `querySelectorAll(xxx).classes.op()` where the query returns mixed | 11 // Test for `querySelectorAll(xxx).classes.op()` where the query returns mixed |
12 // Html and Svg elements. | 12 // Html and Svg elements. |
13 | 13 |
14 Element makeElementsContainer() { | 14 Element makeElementsContainer() { |
15 var e = new Element.html( | 15 var e = new Element.html( |
16 '<ul class="yes foo">' | 16 '<ul class="yes foo">' |
17 '<li class="yes quux qux">' | 17 '<li class="yes quux qux">' |
18 '</ul>'); | 18 '</ul>'); |
19 final svgContent = r""" | 19 final svgContent = r""" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 expect(view(elements), | 187 expect(view(elements), |
188 '[[], [quux, qux], [qux], []]'); | 188 '[[], [quux, qux], [qux], []]'); |
189 }); | 189 }); |
190 | 190 |
191 test('listContainsAll', () { | 191 test('listContainsAll', () { |
192 var elements = elementsSetup(); | 192 var elements = elementsSetup(); |
193 expect(elements.classes.containsAll(['qux', 'mornin']), isFalse); | 193 expect(elements.classes.containsAll(['qux', 'mornin']), isFalse); |
194 expect(elements.classes.containsAll(['qux', 'classy']), isTrue); | 194 expect(elements.classes.containsAll(['qux', 'classy']), isTrue); |
195 }); | 195 }); |
196 } | 196 } |
OLD | NEW |