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

Unified Diff: chrome/browser/apps/web_view_browsertest.cc

Issue 22793018: <webview>: Implement support for package-local chrome-extension:// URLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a test to verify that a privileged partition can access a local resource Created 7 years, 3 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/apps/web_view_browsertest.cc
diff --git a/chrome/browser/apps/web_view_browsertest.cc b/chrome/browser/apps/web_view_browsertest.cc
index c5d4fa3bd653ad15c5ad9a13fa0942e66ed51ce8..90031ed7cc8e84c6048b71d06a5b6f6f5c7a66c6 100644
--- a/chrome/browser/apps/web_view_browsertest.cc
+++ b/chrome/browser/apps/web_view_browsertest.cc
@@ -481,7 +481,8 @@ class WebViewTest : public extensions::PlatformAppBrowserTest {
const std::string& app_location) {
ASSERT_TRUE(StartEmbeddedTestServer()); // For serving guest pages.
ExtensionTestMessageListener launched_listener("Launched", false);
- LoadAndLaunchPlatformApp(app_location.c_str());
+ const extensions::Extension* extension =
+ InstallAndLaunchPlatformApp(app_location.c_str());
ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
embedded_test_server()->RegisterRequestHandler(
@@ -500,7 +501,9 @@ class WebViewTest : public extensions::PlatformAppBrowserTest {
done_listener.AlsoListenForFailureMessage(test_failed_msg);
EXPECT_TRUE(content::ExecuteScript(
embedder_web_contents,
- base::StringPrintf("runTest('%s')", test_name.c_str())));
+ base::StringPrintf("runTest('%s', '%s')",
+ test_name.c_str(),
+ extension->id().c_str())));
ASSERT_TRUE(done_listener.WaitUntilSatisfied());
}
@@ -670,6 +673,13 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestWebRequestAPIExistence) {
"web_view/shim");
}
+IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestChromeExtensionURL) {
+ TestHelper("testChromeExtensionURL",
+ "DoneShimTest.PASSED",
+ "DoneShimTest.FAILED",
+ "web_view/shim");
+}
+
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestEventName) {
TestHelper("testEventName",
"DoneShimTest.PASSED",
@@ -860,6 +870,14 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadStartLoadRedirect) {
"web_view/shim");
}
+IN_PROC_BROWSER_TEST_F(WebViewTest,
+ Shim_TestLoadAbortChromeExtensionURLWrongPartition) {
+ TestHelper("testLoadAbortChromeExtensionURLWrongPartition",
+ "DoneShimTest.PASSED",
+ "DoneShimTest.FAILED",
+ "web_view/shim");
+}
+
IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestLoadAbortEmptyResponse) {
TestHelper("testLoadAbortEmptyResponse",
"DoneShimTest.PASSED",
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_protocols.cc » ('j') | chrome/browser/extensions/extension_protocols.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698