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

Side by Side Diff: chrome/test/data/extensions/api_test/sandboxed_pages/sandboxed.html

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 This page should be sandboxed.
2
3 <script>
4 // We're not served with the extension default CSP, we can use inline script.
5 onload = function() {
6 var secret = 'sandboxed_window_secret';
7
8 if (chrome.extension) {
9 chrome.test.notifyFail('Extension APIs should not be injected.');
10 return;
11 }
12
13 var mainWindow = window.opener || window.top;
14 mainWindow.postMessage(mainWindow.secret, '*');
15 };
16 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698