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

Unified Diff: chrome/browser/extensions/sandboxed_pages_apitest.cc

Issue 2563843002: Restrict app sandbox's CSP to disallow loading web content in them. (Closed)
Patch Set: sync @tott Created 3 years, 12 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/browser/extensions/sandboxed_pages_apitest.cc
diff --git a/chrome/browser/extensions/sandboxed_pages_apitest.cc b/chrome/browser/extensions/sandboxed_pages_apitest.cc
index 45ae8653a4408528c046568353262f70d01fa980..42451062963f463e60c2071717bf91116af9f935 100644
--- a/chrome/browser/extensions/sandboxed_pages_apitest.cc
+++ b/chrome/browser/extensions/sandboxed_pages_apitest.cc
@@ -7,3 +7,14 @@
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, SandboxedPages) {
EXPECT_TRUE(RunExtensionSubtest("sandboxed_pages", "main.html")) << message_;
}
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, SandboxedPagesCSP) {
+ ASSERT_TRUE(StartEmbeddedTestServer());
+
+ // This app attempts to load remote web content inside a sandboxed page.
+ // Loading web content will fail because of CSP. In addition to that we will
+ // show manifest warnings, hence the kFlagIgnoreManifestWarnings.
+ EXPECT_TRUE(RunExtensionSubtest("sandboxed_pages_csp", "main.html",
+ kFlagIgnoreManifestWarnings))
+ << message_;
+}

Powered by Google App Engine
This is Rietveld 408576698