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

Unified Diff: LayoutTests/dart/multi-wrapper-frame-test.html

Issue 313183003: [dartium] Use ScriptWrappable when there are multiple Dart wrappers. (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/1985
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/dart/multi-wrapper-frame-test-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/dart/multi-wrapper-frame-test.html
diff --git a/LayoutTests/dart/multi-wrapper-frame-test.html b/LayoutTests/dart/multi-wrapper-frame-test.html
new file mode 100644
index 0000000000000000000000000000000000000000..9f246aa08d74de790b3b81245c7db361ee3defca
--- /dev/null
+++ b/LayoutTests/dart/multi-wrapper-frame-test.html
@@ -0,0 +1,47 @@
+<html>
+<body>
+
+<script>
+if (window.testRunner) {
+ window.testRunner.dumpAsText();
+ window.testRunner.waitUntilDone();
+}
+</script>
+
+<script type="application/dart">
+import 'dart:html';
+import 'dart:js';
+
+var retainWrappers = [];
+var iframes = 0;
+void iframeLoaded(iframe) {
+ iframes++;
+ print("$iframes iframes loaded");
+
+ retainWrappers.add(print(iframe.contentWindow));
+ retainWrappers.add(print(iframe.contentWindow.history));
+ retainWrappers.add(print(iframe.contentWindow.location));
+ var jsIframe = new JsObject.fromBrowserObject(iframe);
+ retainWrappers.add(print(jsIframe['contentDocument']));
+ var childNode = jsIframe['contentDocument'].callMethod('getElementById', ['child-div']);
+ retainWrappers.add(print(childNode));
+
+ if (iframes == 3) {
+ context['testRunner'].callMethod('notifyDone', []);
+ }
+}
+
+void main() {
+ print("Parent");
+
+ for (int i = 0; i < 3; i++) {
+ var iframe = new Element.tag('iframe');
+ iframe.src = 'resources/multi-wrapper-frame-child.html';
+ iframe.onLoad.listen((Event e) => iframeLoaded(iframe));
+ document.body.nodes.add(iframe);
+ }
+}
+</script>
+
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/dart/multi-wrapper-frame-test-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698