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

Unified Diff: chrome/test/data/extensions/api_test/default_content_security_policy/test.js

Issue 8585020: Enable CSP by default for extensions with manifest_version >= 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
« no previous file with comments | « chrome/test/data/extensions/api_test/default_content_security_policy/test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/default_content_security_policy/test.js
===================================================================
--- chrome/test/data/extensions/api_test/default_content_security_policy/test.js (revision 0)
+++ chrome/test/data/extensions/api_test/default_content_security_policy/test.js (revision 0)
@@ -0,0 +1,21 @@
+window.externalCanary = "Alive";
+
+chrome.test.getConfig(function(config) {
+
+ function inlineScriptDoesNotRun() {
+ chrome.test.assertEq(window.inlineCanary, undefined);
+ chrome.test.runNextTest();
+ }
+
+ function externalScriptDoesRun() {
+ // This test is somewhat zen in the sense that if external scripts are
+ // blocked, we don't be able to even execute the test harness...
+ chrome.test.assertEq(window.externalCanary, "Alive");
+ chrome.test.runNextTest();
+ }
+
+ chrome.test.runTests([
+ inlineScriptDoesNotRun,
+ externalScriptDoesRun
+ ]);
+});
« no previous file with comments | « chrome/test/data/extensions/api_test/default_content_security_policy/test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698