summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorachuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-11 22:19:00 +0000
committerachuith@chromium.org <achuith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-11 22:19:00 +0000
commitabb26096d64316448c4203de724e02a3258a2dce (patch)
treee420ffe07316fe21161f0245dedfb42c5fd4afc7 /chrome/test
parentaab8b552b9901487f0288169f4b05d7cb2d14d11 (diff)
downloadchromium_src-abb26096d64316448c4203de724e02a3258a2dce.zip
chromium_src-abb26096d64316448c4203de724e02a3258a2dce.tar.gz
chromium_src-abb26096d64316448c4203de724e02a3258a2dce.tar.bz2
Restrict file protocol on chromeos to certain whitelisted directories. Disable this for tests.
BUG=chromium-os:3412 TEST=Access file: directories on chromeos. browser, ui, interactive ui and unit tests should continue to pass. Review URL: http://codereview.chromium.org/4160003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/out_of_proc_test_runner.cc3
-rw-r--r--chrome/test/ui/ui_test.cc3
2 files changed, 6 insertions, 0 deletions
diff --git a/chrome/test/out_of_proc_test_runner.cc b/chrome/test/out_of_proc_test_runner.cc
index a14a38a..43a7525 100644
--- a/chrome/test/out_of_proc_test_runner.cc
+++ b/chrome/test/out_of_proc_test_runner.cc
@@ -273,6 +273,9 @@ int RunTest(const std::string& test_name) {
}
new_cmd_line.AppendSwitchPath(switches::kUserDataDir, temp_dir.path());
+ // file:// access for ChromeOS.
+ new_cmd_line.AppendSwitch(switches::kAllowFileAccess);
+
base::ProcessHandle process_handle;
#if defined(OS_POSIX)
const char* browser_wrapper = getenv("BROWSER_WRAPPER");
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 29075b3..34cd0d2 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -751,6 +751,9 @@ bool UITestBase::LaunchBrowserHelper(const CommandLine& arguments,
// Disable TabCloseableStateWatcher for tests.
command_line.AppendSwitch(switches::kDisableTabCloseableStateWatcher);
+ // Allow file:// access on ChromeOS.
+ command_line.AppendSwitch(switches::kAllowFileAccess);
+
test_launcher_utils::PrepareBrowserCommandLineForTests(&command_line);
DebugFlags::ProcessDebugFlags(