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

Unified Diff: client/tests/client/dom/DocumentTest.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/DocumentTest.dart
diff --git a/client/tests/client/dom/DocumentTest.dart b/client/tests/client/dom/DocumentTest.dart
index a06ff2ec3c94b8b06506bb8c4952c19277a5ff08..e553691eb4b1ff1fd5be690587164b1cdb1d146f 100644
--- a/client/tests/client/dom/DocumentTest.dart
+++ b/client/tests/client/dom/DocumentTest.dart
@@ -1,22 +1,16 @@
#library('DocumentTest');
#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('CreateElement', () {
// FIXME: nifty way crashes, do it boring way.
- Expect.isTrue(document.createElement('span') is HTMLElement);
- Expect.isTrue(document.createElement('div') is HTMLDivElement);
- Expect.isTrue(document.createElement('a') is HTMLAnchorElement);
- Expect.isTrue(document.createElement('bad_name') is HTMLUnknownElement);
- });
-
- test('DocumentURL', () {
- // URL is something like ..._client_dom_DocumentTest.dartfrogium.html
- Expect.isTrue(document.URL.endsWith('.html'));
- Expect.isTrue(document.URL.indexOf('DocumentTest') > 0);
+ Expect.isTrue(new Element.tag('span') is Element);
+ Expect.isTrue(new Element.tag('div') is DivElement);
+ Expect.isTrue(new Element.tag('a') is AnchorElement);
+ Expect.isTrue(new Element.tag('bad_name') is UnknownElement);
});
}

Powered by Google App Engine
This is Rietveld 408576698