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

Unified Diff: chrome/browser/extensions/stubs_apitest.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/stubs_apitest.cc
diff --git a/chrome/browser/extensions/stubs_apitest.cc b/chrome/browser/extensions/stubs_apitest.cc
index bdbf69c1879cb340170f5e8e3705467528f3dba2..4ba81c7204ab4b7b9fed1690c0bb4207e81f6ecd 100644
--- a/chrome/browser/extensions/stubs_apitest.cc
+++ b/chrome/browser/extensions/stubs_apitest.cc
@@ -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 http:// page, which should get the content script
+ // Navigate to a simple file:// page, which should get the content script
// injected and run the rest of the test.
- GURL url = server->TestServerPage("file/extensions/test_file.html");
- ui_test_utils::NavigateToURL(browser(), url);
-
+ 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()));
ResultCatcher catcher;
ASSERT_TRUE(catcher.GetNextResult());
}

Powered by Google App Engine
This is Rietveld 408576698