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

Unified Diff: tests/dom/document_test.dart

Issue 10222026: Migrate dom tests to dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase & address comments. 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: tests/dom/document_test.dart
diff --git a/tests/dom/document_test.dart b/tests/dom/document_test.dart
index caf5bac13c9acdb8f4695cfa4ff4ef292b730f77..c768fda9d991f81e12046fbd8a063307def52630 100644
--- a/tests/dom/document_test.dart
+++ b/tests/dom/document_test.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('document_test') > 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