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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/sandboxed_pages/sandboxed.html
diff --git a/chrome/test/data/extensions/api_test/sandboxed_pages/sandboxed.html b/chrome/test/data/extensions/api_test/sandboxed_pages/sandboxed.html
new file mode 100644
index 0000000000000000000000000000000000000000..78e79c1a121f7cf5714a5b7673f4810ea40eebaa
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/sandboxed_pages/sandboxed.html
@@ -0,0 +1,16 @@
+This page should be sandboxed.
+
+<script>
+// We're not served with the extension default CSP, we can use inline script.
+onload = function() {
+ var secret = 'sandboxed_window_secret';
+
+ if (chrome.extension) {
+ chrome.test.notifyFail('Extension APIs should not be injected.');
+ return;
+ }
+
+ var mainWindow = window.opener || window.top;
+ mainWindow.postMessage(mainWindow.secret, '*');
+};
+</script>

Powered by Google App Engine
This is Rietveld 408576698