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

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

Issue 2419863002: Remove uses of unittest in the HTML tests where possible. (Closed)
Patch Set: Remove TODO. 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/typing_test.dart
diff --git a/pkg/dev_compiler/test/codegen/lib/html/typing_test.dart b/pkg/dev_compiler/test/codegen/lib/html/typing_test.dart
index 68ba294af47eb1784b54dcb2422a67964c0310ab..e353bf5c413a48690eefb41b75db635da7821046 100644
--- a/pkg/dev_compiler/test/codegen/lib/html/typing_test.dart
+++ b/pkg/dev_compiler/test/codegen/lib/html/typing_test.dart
@@ -1,11 +1,8 @@
-library TypingTest;
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
import 'dart:html';
-main() {
- useHtmlConfiguration();
+import 'package:expect/minitest.dart';
+main() {
var isStyleSheetList =
predicate((x) => x is List<StyleSheet>, 'is a List<StyleSheet>');
@@ -23,15 +20,16 @@ main() {
});
test('StyleSheetList', () {
- List<StyleSheet> asList = window.document.styleSheets;
+ var document = window.document as HtmlDocument;
+ List<StyleSheet> asList = document.styleSheets;
expect(asList, isStyleSheetList);
// Check it's Iterable.
int counter = 0;
- for (StyleSheet styleSheet in window.document.styleSheets) {
+ for (StyleSheet styleSheet in document.styleSheets) {
counter++;
}
- // There is one style sheet from the unittest framework.
- expect(counter, 1);
+ // There are no style sheets.
+ expect(counter, 0);
});
}

Powered by Google App Engine
This is Rietveld 408576698