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

Unified Diff: chrome/test/data/extensions/api_test/extension_resource_request_policy/sandboxed/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: Rebase 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/extension_resource_request_policy/sandboxed/sandboxed.html
diff --git a/chrome/test/data/extensions/api_test/extension_resource_request_policy/sandboxed/sandboxed.html b/chrome/test/data/extensions/api_test/extension_resource_request_policy/sandboxed/sandboxed.html
new file mode 100644
index 0000000000000000000000000000000000000000..6652ac957c9586121dd9b8463ef3c4937c06e489
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/extension_resource_request_policy/sandboxed/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.
+var secret = 'sandboxed_window_secret';
+
+try {
+ chrome.extension.getViews();
+ chrome.test.notifyFail('Should not be able to use extension APIs');
+} catch (err) {
+ // Expected
+}
+
+var mainWindow = window.opener || window.top;
+mainWindow.postMessage(mainWindow.secret, '*');
+</script>

Powered by Google App Engine
This is Rietveld 408576698