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

Side by Side 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: Revised approach based on http://crrev.com/125180. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!--
2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this
3 * source code is governed by a BSD-style license that can be found in the
4 * LICENSE file.
5 -->
6 <script src="../common/common.js"></script>
7 <div style="display:none" id="pageToScriptTunnel"></div>
8 <div style="display:none" id="scriptToPageTunnel"></div>
9 <script>
10
11 window.onload = function() {
12 setupScriptTunnel();
13 var backgroundWindow = window.open('bg.html', 'bg', 'background');
14 if (backgroundWindow) {
15 notifyBackgroundWindowNotNull();
16 }
17 }
18
19 function notifyBackgroundWindowNotNull() {
20 pageToScriptTunnel.innerText = JSON.stringify(messageData(arguments));
21 pageToScriptTunnel.dispatchEvent(scriptMessageEvent);
22 }
23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698