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

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

Issue 8587052: When allowing an extension file:/// URL access, grant its process access to that scheme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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_apitest.cc
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index 0631151cc60931313017adeb7bd31dbfe8a6519c..893a25d49dff91686b211c8f8e95580fd1385b69 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -18,6 +18,7 @@
namespace {
const char kTestServerPort[] = "testServer.port";
+const char kTestDataDirectory[] = "testDataDirectory";
}; // namespace
@@ -93,6 +94,8 @@ void ExtensionApiTest::ResultCatcher::Observe(
void ExtensionApiTest::SetUpInProcessBrowserTestFixture() {
DCHECK(!test_config_.get()) << "Previous test did not clear config state.";
test_config_.reset(new DictionaryValue());
+ test_config_->SetString(kTestDataDirectory,
+ net::FilePathToFileURL(test_data_dir_).spec());
ExtensionTestGetConfigFunction::set_test_config_state(test_config_.get());
}
@@ -233,8 +236,8 @@ bool ExtensionApiTest::StartTestServer() {
return false;
// Build a dictionary of values that tests can use to build URLs that
- // access the test server. Tests can see these values using the extension
- // API function chrome.test.getConfig().
+ // access the test server and local file system. Tests can see these values
+ // using the extension API function chrome.test.getConfig().
test_config_->SetInteger(kTestServerPort,
test_server()->host_port_pair().port());

Powered by Google App Engine
This is Rietveld 408576698