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

Side by Side Diff: chrome/installer/util/run_all_unittests.cc

Issue 2476573004: Use InstallDetails in installer_util. (Closed)
Patch Set: sync to position 451835 Created 3 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « chrome/installer/util/install_util_unittest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 }
OLDNEW
« no previous file with comments | « chrome/installer/util/install_util_unittest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698