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

Side by Side Diff: chrome/test/data/extensions/api_test/sandboxed_pages/main.js

Issue 10458063: Add sanbdoxed_pages to allow extension/app pages to be served in a sandboxed, unique origin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CheckCurrentContextAccessToExtensionAPI Created 8 years, 6 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 // 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 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698