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

Unified Diff: chrome/test/data/extensions/api_test/app_background_page/no_js/launch.html

Issue 9837074: Make it so that allow_js_access: false can be used with background pages created by window.open. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation. Created 8 years, 9 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: chrome/test/data/extensions/api_test/app_background_page/no_js/launch.html
diff --git a/chrome/test/data/extensions/api_test/app_background_page/no_js/launch.html b/chrome/test/data/extensions/api_test/app_background_page/no_js/launch.html
new file mode 100644
index 0000000000000000000000000000000000000000..a4d15327a930323bd78e55aa6575ceefd17da681
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/app_background_page/no_js/launch.html
@@ -0,0 +1,23 @@
+<!--
+ * Copyright (c) 2012 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.
+-->
+<script src="../common/common.js"></script>
+<div style="display:none" id="pageToScriptTunnel"></div>
+<div style="display:none" id="scriptToPageTunnel"></div>
+<script>
+
+window.onload = function() {
+ setupScriptTunnel();
+ var backgroundWindow = window.open('bg.html', 'bg', 'background');
+ if (backgroundWindow) {
+ notifyBackgroundWindowNotNull();
+ }
+}
+
+function notifyBackgroundWindowNotNull() {
+ pageToScriptTunnel.innerText = JSON.stringify(messageData(arguments));
+ pageToScriptTunnel.dispatchEvent(scriptMessageEvent);
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698