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

Unified Diff: tests/dom/inner_frame_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/inner_frame_test.dart
diff --git a/tests/dom/inner_frame_test.dart b/tests/dom/inner_frame_test.dart
index 6aa92821fb3261b16fbed0e27deccadf7a953d19..593396d323ca3c5ac8a3f86d5b416d00660817b0 100644
--- a/tests/dom/inner_frame_test.dart
+++ b/tests/dom/inner_frame_test.dart
@@ -1,7 +1,7 @@
#library('InnerFrameTest');
#import('../../lib/unittest/unittest.dart');
-#import('../../lib/unittest/dom_config.dart');
-#import('dart:dom');
+#import('../../lib/unittest/html_config.dart');
+#import('dart:html');
main() {
if (window != window.top) {
@@ -15,7 +15,7 @@ main() {
var parentDocument = window.frameElement.ownerDocument;
var div = parentDocument.createElement("div");
div.id = "illegalFrameElement";
- parentDocument.body.appendChild(div);
+ parentDocument.body.nodes.add(div);
Expect.fail('Should not reach here.');
} catch (NoSuchMethodException e) {
// Expected.
@@ -27,7 +27,7 @@ main() {
var parentDocument = top.document;
var div = parentDocument.createElement("div");
div.id = "illegalTop";
- parentDocument.body.appendChild(div);
+ parentDocument.body.nodes.add(div);
Expect.fail('Should not reach here.');
} catch (var e) {
// Expected.
@@ -37,25 +37,25 @@ main() {
}
// Parent / test frame
- useDomConfiguration();
+ useHtmlConfiguration();
- final iframe = document.createElement('iframe');
+ final iframe = new Element.tag('iframe');
iframe.src = window.location.href;
asyncTest('prepare', 1, () {
- iframe.addEventListener('load', (e) => callbackDone(), false);
- document.body.appendChild(iframe);
+ iframe.on.load.add((e) => callbackDone(), false);
+ document.body.nodes.add(iframe);
});
test('frameElement', () {
- var div = document.getElementById('illegalFrameElement');
+ var div = document.query('#illegalFrameElement');
// Ensure that this parent frame was not modified by its child.
Expect.isNull(div);
});
test('top', () {
- var div = document.getElementById('illegalTop');
+ var div = document.query('#illegalTop');
// Ensure that this parent frame was not modified by its child.
Expect.isNull(div);

Powered by Google App Engine
This is Rietveld 408576698