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

Unified Diff: client/tests/client/dom/SVG2Test.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/SVG2Test.dart
diff --git a/client/tests/client/dom/SVG2Test.dart b/client/tests/client/dom/SVG2Test.dart
index b9284812418d1e921a35cf743f906c400c380e2e..8bf7dabbf6e28f279cc81fa02bb746f53307aac0 100644
--- a/client/tests/client/dom/SVG2Test.dart
+++ b/client/tests/client/dom/SVG2Test.dart
@@ -1,7 +1,7 @@
#library('SVG2Test');
#import('../../../../lib/unittest/unittest.dart');
-#import('../../../../lib/unittest/dom_config.dart');
-#import('dart:dom');
+#import('../../../../lib/unittest/html_config.dart');
+#import('dart:html');
// Test that SVG elements explicitly implement the IDL interfaces (is-checks
// only, see SVGTest3 for behavioural tests).
@@ -9,21 +9,21 @@
main() {
insertTestDiv() {
- var element = document.createElement('div');
+ var element = new Element.tag('div');
element.innerHTML = @'''
<svg id='svg1' width='200' height='100'>
<rect id='rect1' x='10' y='20' width='130' height='40' rx='5'fill='blue'></rect>
</svg>
''';
- document.body.appendChild(element);
+ document.body.nodes.add(element);
return element;
}
- useDomConfiguration();
+ useHtmlConfiguration();
test('rect_isChecks', () {
var div = insertTestDiv();
- var r = document.getElementById('rect1');
+ var r = document.query('#rect1');
// Direct inheritance chain
Expect.isTrue(r is SVGElement);
@@ -43,6 +43,6 @@ main() {
Expect.isFalse(r is SVGRect);
Expect.isFalse(r is SVGSVGElement);
- document.body.removeChild(div);
+ div.remove();
});
}

Powered by Google App Engine
This is Rietveld 408576698