OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/test/launcher/unit_test_launcher.h" | 6 #include "base/test/launcher/unit_test_launcher.h" |
7 #include "base/test/test_suite.h" | 7 #include "base/test/test_suite.h" |
8 #include "base/win/scoped_com_initializer.h" | 8 #include "base/win/scoped_com_initializer.h" |
9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
10 #include "chrome/installer/util/install_util.h" | 10 #include "chrome/install_static/test/scoped_install_details.h" |
11 | 11 |
12 int main(int argc, char** argv) { | 12 int main(int argc, char** argv) { |
13 base::TestSuite test_suite(argc, argv); | 13 base::TestSuite test_suite(argc, argv); |
14 | 14 |
15 // Register Chrome Path provider so that we can get test data dir. | 15 // Register Chrome Path provider so that we can get test data dir. |
16 chrome::RegisterPathProvider(); | 16 chrome::RegisterPathProvider(); |
17 | 17 |
18 // Drop CHROME_PROBED_PROGRAM_FILES_PATH if it leaked into the environment. | |
19 InstallUtil::ResetIsPerUserInstallForTest(); | |
20 | |
21 base::win::ScopedCOMInitializer com_initializer; | 18 base::win::ScopedCOMInitializer com_initializer; |
22 if (!com_initializer.succeeded()) | 19 if (!com_initializer.succeeded()) |
23 return -1; | 20 return -1; |
| 21 |
| 22 install_static::ScopedInstallDetails scoped_install_details; |
| 23 |
24 return base::LaunchUnitTests( | 24 return base::LaunchUnitTests( |
25 argc, | 25 argc, |
26 argv, | 26 argv, |
27 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); | 27 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); |
28 } | 28 } |
OLD | NEW |