| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/test/base/chrome_test_launcher.h" | 5 #include "chrome/test/base/chrome_test_launcher.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // Strip out user-data-dir if present. We will add it back in again later. | 81 // Strip out user-data-dir if present. We will add it back in again later. |
| 82 switches.erase(switches::kUserDataDir); | 82 switches.erase(switches::kUserDataDir); |
| 83 | 83 |
| 84 for (base::CommandLine::SwitchMap::const_iterator iter = switches.begin(); | 84 for (base::CommandLine::SwitchMap::const_iterator iter = switches.begin(); |
| 85 iter != switches.end(); ++iter) { | 85 iter != switches.end(); ++iter) { |
| 86 new_command_line.AppendSwitchNative((*iter).first, (*iter).second); | 86 new_command_line.AppendSwitchNative((*iter).first, (*iter).second); |
| 87 } | 87 } |
| 88 | 88 |
| 89 new_command_line.AppendSwitchPath(switches::kUserDataDir, temp_data_dir); | 89 new_command_line.AppendSwitchPath(switches::kUserDataDir, temp_data_dir); |
| 90 | 90 |
| 91 // file:// access for ChromeOS. | |
| 92 new_command_line.AppendSwitch(switches::kAllowFileAccess); | |
| 93 | |
| 94 *command_line = new_command_line; | 91 *command_line = new_command_line; |
| 95 return true; | 92 return true; |
| 96 } | 93 } |
| 97 | 94 |
| 98 content::ContentMainDelegate* | 95 content::ContentMainDelegate* |
| 99 ChromeTestLauncherDelegate::CreateContentMainDelegate() { | 96 ChromeTestLauncherDelegate::CreateContentMainDelegate() { |
| 100 return new ChromeMainDelegate(); | 97 return new ChromeMainDelegate(); |
| 101 } | 98 } |
| 102 | 99 |
| 103 int LaunchChromeTests(int default_jobs, | 100 int LaunchChromeTests(int default_jobs, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 121 #if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) | 118 #if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) |
| 122 // We leak this pointer intentionally. The crash client needs to outlive | 119 // We leak this pointer intentionally. The crash client needs to outlive |
| 123 // all other code. | 120 // all other code. |
| 124 ChromeCrashReporterClient* crash_client = new ChromeCrashReporterClient(); | 121 ChromeCrashReporterClient* crash_client = new ChromeCrashReporterClient(); |
| 125 ANNOTATE_LEAKING_OBJECT_PTR(crash_client); | 122 ANNOTATE_LEAKING_OBJECT_PTR(crash_client); |
| 126 crash_reporter::SetCrashReporterClient(crash_client); | 123 crash_reporter::SetCrashReporterClient(crash_client); |
| 127 #endif | 124 #endif |
| 128 | 125 |
| 129 return content::LaunchTests(delegate, default_jobs, argc, argv); | 126 return content::LaunchTests(delegate, default_jobs, argc, argv); |
| 130 } | 127 } |
| OLD | NEW |