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

Unified Diff: pkg/dev_compiler/test/codegen/lib/html/element_classes_svg_test.dart

Issue 2413073002: Start cleaning up the HTML tests. (Closed)
Patch Set: Unfork expect.dart. Created 4 years, 2 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
Index: pkg/dev_compiler/test/codegen/lib/html/element_classes_svg_test.dart
diff --git a/pkg/dev_compiler/test/codegen/lib/html/element_classes_svg_test.dart b/pkg/dev_compiler/test/codegen/lib/html/element_classes_svg_test.dart
index 0acd2a7e6fb07954c3e38e223f40e2dc8c77ddfe..42ec8ee000ae12eab00cd22da20d851b22d1e32b 100644
--- a/pkg/dev_compiler/test/codegen/lib/html/element_classes_svg_test.dart
+++ b/pkg/dev_compiler/test/codegen/lib/html/element_classes_svg_test.dart
@@ -2,13 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library ElementTest;
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
import 'dart:collection';
import 'dart:html';
import 'dart:svg' as svg;
+import 'package:minitest/minitest.dart';
+
// Test for `querySelectorAll(xxx).classes.op()` where the query returns mixed
// Html and Svg elements.
@@ -53,8 +52,6 @@ String view(var e) {
}
main() {
- useHtmlConfiguration();
-
Set<String> extractClasses(Element el) {
final match = new RegExp('class="([^"]+)"').firstMatch(el.outerHtml);
return new LinkedHashSet.from(match[1].split(' '));
@@ -82,8 +79,8 @@ main() {
expect(view(elements2), '[[foo, qux], [foo, qux], [foo, qux], [foo, qux]]');
for (Element e in elements2) {
- expect(e.classes, orderedEquals(['foo', 'qux']));
- expect(extractClasses(e), orderedEquals(['foo', 'qux']));
+ expect(e.classes, equals(['foo', 'qux']));
+ expect(extractClasses(e), equals(['foo', 'qux']));
}
elements.classes = [];
@@ -103,7 +100,6 @@ main() {
expect(elements.classes.contains('troll'), isFalse);
});
-
test('listAdd', () {
var elements = elementsSetup();
var added = elements.classes.add('lassie');

Powered by Google App Engine
This is Rietveld 408576698