| OLD | NEW |
| (Empty) | |
| 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. |
| 4 |
| 5 var secret = 'main_window_secret'; |
| 6 |
| 7 onmessage = function(event) { |
| 8 var sandboxedWindow = event.source; |
| 9 // They can't read our secret. |
| 10 chrome.test.assertEq(undefined, event.data); |
| 11 |
| 12 // And we can't read theirs. |
| 13 chrome.test.assertEq(undefined, sandboxedWindow.secret); |
| 14 |
| 15 chrome.test.succeed(); |
| 16 }; |
| 17 |
| 18 onload = function() { |
| 19 chrome.test.runTests([ |
| 20 function sandboxedWindow() { |
| 21 var w = window.open('sandboxed.html'); |
| 22 }, |
| 23 |
| 24 function sandboxedFrame() { |
| 25 var iframe = document.createElement('iframe'); |
| 26 iframe.src = 'sandboxed.html'; |
| 27 document.body.appendChild(iframe); |
| 28 } |
| 29 ]); |
| 30 }; |
| OLD | NEW |