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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #library('DocumentTest'); 1 #library('DocumentTest');
2 #import('../../lib/unittest/unittest.dart'); 2 #import('../../lib/unittest/unittest.dart');
3 #import('../../lib/unittest/dom_config.dart'); 3 #import('../../lib/unittest/html_config.dart');
4 #import('dart:dom'); 4 #import('dart:html');
5 5
6 main() { 6 main() {
7 useDomConfiguration(); 7 useHtmlConfiguration();
8 8
9 test('CreateElement', () { 9 test('CreateElement', () {
10 // FIXME: nifty way crashes, do it boring way. 10 // FIXME: nifty way crashes, do it boring way.
11 Expect.isTrue(document.createElement('span') is HTMLElement); 11 Expect.isTrue(new Element.tag('span') is Element);
12 Expect.isTrue(document.createElement('div') is HTMLDivElement); 12 Expect.isTrue(new Element.tag('div') is DivElement);
13 Expect.isTrue(document.createElement('a') is HTMLAnchorElement); 13 Expect.isTrue(new Element.tag('a') is AnchorElement);
14 Expect.isTrue(document.createElement('bad_name') is HTMLUnknownElement); 14 Expect.isTrue(new Element.tag('bad_name') is UnknownElement);
15 });
16
17 test('DocumentURL', () {
18 // URL is something like ..._client_dom_DocumentTest.dartfrogium.html
19 Expect.isTrue(document.URL.endsWith('.html'));
20 Expect.isTrue(document.URL.indexOf('document_test') > 0);
21 }); 15 });
22 } 16 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698