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

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

Issue 430003: Revert change that disallowed content scripts access to file:// (Closed)
Patch Set: Can't go back, only through 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
diff --git a/chrome/browser/extensions/extension_startup_unittest.cc b/chrome/browser/extensions/extension_startup_unittest.cc
index f076b3710e58f10bbb8d7eacf2e6ac1de7b9eb22..00089ae3ca7fd5bd9c74f98ffa48801843eea37e 100644
--- a/chrome/browser/extensions/extension_startup_unittest.cc
+++ b/chrome/browser/extensions/extension_startup_unittest.cc
@@ -131,9 +131,12 @@ class ExtensionStartupTestBase
void TestInjection(bool expect_css, bool expect_script) {
// Load a page affected by the content script and test to see the effect.
- HTTPTestServer* server = StartHTTPServer();
- GURL url = server->TestServerPage("file/extensions/test_file.html");
- ui_test_utils::NavigateToURL(browser(), url);
+ FilePath test_file;
+ PathService::Get(chrome::DIR_TEST_DATA, &test_file);
+ test_file = test_file.AppendASCII("extensions")
+ .AppendASCII("test_file.html");
+
+ ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(test_file));
bool result = false;
ui_test_utils::ExecuteJavaScriptAndExtractBool(

Powered by Google App Engine
This is Rietveld 408576698