OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/test/launcher/unit_test_launcher.h" | 7 #include "base/test/launcher/unit_test_launcher.h" |
8 #include "base/test/test_suite.h" | 8 #include "base/test/test_suite.h" |
9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
| 10 #include "chrome/install_static/test/scoped_install_details.h" |
10 #include "chrome/installer/setup/setup_util_unittest.h" | 11 #include "chrome/installer/setup/setup_util_unittest.h" |
11 | 12 |
12 int main(int argc, char** argv) { | 13 int main(int argc, char** argv) { |
13 base::TestSuite test_suite(argc, argv); | 14 base::TestSuite test_suite(argc, argv); |
14 | 15 |
15 // Handle the --adjust-process-priority switch, which is used to test the | 16 // Handle the --adjust-process-priority switch, which is used to test the |
16 // installer::AdjustProcessPriority() function in a subprocess. | 17 // installer::AdjustProcessPriority() function in a subprocess. |
17 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kAdjustProcessPriority)) | 18 if (base::CommandLine::ForCurrentProcess()->HasSwitch(kAdjustProcessPriority)) |
18 return DoProcessPriorityAdjustment(); | 19 return DoProcessPriorityAdjustment(); |
19 | 20 |
20 // Register Chrome Path provider so that we can get test data dir. | 21 // Register Chrome Path provider so that we can get test data dir. |
21 chrome::RegisterPathProvider(); | 22 chrome::RegisterPathProvider(); |
22 | 23 |
| 24 install_static::ScopedInstallDetails scoped_install_details; |
| 25 |
23 return base::LaunchUnitTests( | 26 return base::LaunchUnitTests( |
24 argc, | 27 argc, |
25 argv, | 28 argv, |
26 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); | 29 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); |
27 } | 30 } |
OLD | NEW |