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

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

Issue 402029: Don't allow content scripts to execute on file:// urls.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
Index: chrome/browser/extensions/stubs_apitest.cc
===================================================================
--- chrome/browser/extensions/stubs_apitest.cc (revision 32232)
+++ chrome/browser/extensions/stubs_apitest.cc (working copy)
@@ -15,15 +15,15 @@
// should be available in content scripts) or update the list of privileged APIs
// in renderer_extension_bindings.js.
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Stubs) {
+ HTTPTestServer* server = StartHTTPServer();
+
ASSERT_TRUE(RunExtensionTest("stubs")) << message_;
- // Navigate to a simple file:// page, which should get the content script
+ // Navigate to a simple http:// page, which should get the content script
// injected and run the rest of the test.
- FilePath test_dir;
- ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
- FilePath simple_html_path = test_dir.AppendASCII("simple.html");
- ui_test_utils::NavigateToURL(browser(),
- GURL(simple_html_path.value()));
+ GURL url = server->TestServerPage("file/extensions/test_file.html");
+ ui_test_utils::NavigateToURL(browser(), url);
+
ResultCatcher catcher;
ASSERT_TRUE(catcher.GetNextResult());
}
« no previous file with comments | « chrome/browser/extensions/extensions_service_unittest.cc ('k') | chrome/browser/extensions/user_script_listener_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698