Index: chrome/test/data/extensions/api_test/mime_handler_view/test_iframe.js |
diff --git a/chrome/test/data/extensions/api_test/mime_handler_view/test_iframe.js b/chrome/test/data/extensions/api_test/mime_handler_view/test_iframe.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..8608c5270c53440c4a7687a39992009ee53242d4 |
--- /dev/null |
+++ b/chrome/test/data/extensions/api_test/mime_handler_view/test_iframe.js |
@@ -0,0 +1,16 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+var iframe = document.getElementById('iframe'); |
+ |
+function printIframe() { |
+ iframe.contentWindow.print(); |
+} |
+ |
+if (iframe.contentDocument && iframe.contentDocument.body && |
+ iframe.contentDocument.body.firstChild) { |
+ printIframe(); |
+} else { |
+ iframe.onload = printIframe; |
+} |