Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / sandboxed_pages / main.js
blob441eb6b7856f60c9f0606e665394c24721d5771a
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 var secret = 'main_window_secret';
7 onmessage = function(event) {
8 var sandboxedWindow = event.source;
9 // They can't read our secret.
10 chrome.test.assertEq(undefined, event.data);
12 // And we can't read theirs.
13 sandboxedWindowSecret = undefined;
14 try {
15 sandboxedWindowSecret = sandboxedWindow.secret;
16 } catch (e) {}
17 chrome.test.assertEq(undefined, sandboxedWindowSecret);
19 chrome.test.succeed();
22 onload = function() {
23 chrome.test.runTests([
24 function sandboxedWindow() {
25 var w = window.open('sandboxed.html');
28 function sandboxedFrame() {
29 var iframe = document.createElement('iframe');
30 iframe.src = 'sandboxed.html';
31 document.body.appendChild(iframe);
33 ]);