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

Unified Diff: client/tests/client/dom/TypingTest.dart

Issue 10222026: Migrate dom tests to dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: client/tests/client/dom/TypingTest.dart
diff --git a/client/tests/client/dom/TypingTest.dart b/client/tests/client/dom/TypingTest.dart
index 569099df6f652c1ec4263026acfb8a13b415ee50..598bf60fc76aa0e6c6aac06b3a199e3cb6aaf5c6 100644
--- a/client/tests/client/dom/TypingTest.dart
+++ b/client/tests/client/dom/TypingTest.dart
@@ -1,29 +1,29 @@
#library('TypingTest');
#import('../../../../lib/unittest/unittest.dart');
-#import('../../../../lib/unittest/dom_config.dart');
-#import('dart:dom');
+#import('../../../../lib/unittest/html_config.dart');
+#import('dart:html');
main() {
- useDomConfiguration();
+ useHtmlConfiguration();
test('NodeList', () {
- List<Node> asList = window.document.getElementsByTagName('body');
+ List<Node> asList = document.queryAll('body');
// Check it's Iterable
int counter = 0;
- for (Node node in window.document.getElementsByTagName('body')) {
+ for (Node node in document.queryAll('body')) {
counter++;
}
Expect.equals(1, counter);
counter = 0;
- window.document.getElementsByTagName('body').forEach((e) { counter++; });
+ document.queryAll('body').forEach((e) { counter++; });
Expect.equals(1, counter);
});
test('StyleSheetList', () {
- List<StyleSheet> asList = window.document.styleSheets;
+ List<StyleSheet> asList = document.styleSheets;
// Check it's Iterable.
int counter = 0;
- for (StyleSheet styleSheet in window.document.styleSheets) {
+ for (StyleSheet styleSheet in document.styleSheets) {
counter++;
}

Powered by Google App Engine
This is Rietveld 408576698