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

Unified Diff: chrome/browser/extensions/extension_startup_unittest.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/extension_startup_unittest.cc
===================================================================
--- chrome/browser/extensions/extension_startup_unittest.cc (revision 32232)
+++ chrome/browser/extensions/extension_startup_unittest.cc (working copy)
@@ -131,13 +131,10 @@
void TestInjection(bool expect_css, bool expect_script) {
// Load a page affected by the content script and test to see the effect.
- FilePath test_file;
- PathService::Get(chrome::DIR_TEST_DATA, &test_file);
- test_file = test_file.AppendASCII("extensions")
- .AppendASCII("test_file.html");
+ HTTPTestServer* server = StartHTTPServer();
+ GURL url = server->TestServerPage("file/extensions/test_file.html");
+ ui_test_utils::NavigateToURL(browser(), url);
- ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(test_file));
-
bool result = false;
ui_test_utils::ExecuteJavaScriptAndExtractBool(
browser()->GetSelectedTabContents()->render_view_host(), L"",
« no previous file with comments | « chrome/browser/extensions/extension_browsertests_misc.cc ('k') | chrome/browser/extensions/extensions_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698