ananta | d936bc1 | 2016-06-22 21:40:31 | [diff] [blame] | 1 | // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "base/bind.h" |
| 6 | #include "base/command_line.h" |
| 7 | #include "base/test/launcher/unit_test_launcher.h" |
| 8 | #include "base/test/test_suite.h" |
| 9 | #include "build/build_config.h" |
grt | b4cab81 | 2017-03-31 06:58:43 | [diff] [blame] | 10 | #include "chrome/install_static/test/scoped_install_details.h" |
ananta | d936bc1 | 2016-06-22 21:40:31 | [diff] [blame] | 11 | |
| 12 | int main(int argc, char** argv) { |
| 13 | // Ensure that the CommandLine instance honors the command line passed in |
| 14 | // instead of the default behavior on Windows which is to use the shell32 |
| 15 | // CommandLineToArgvW API. The chrome_elf_unittests test suite should not |
| 16 | // depend on user32 directly or indirectly (For the curious shell32 depends |
| 17 | // on user32) |
| 18 | base::CommandLine::InitUsingArgvForTesting(argc, argv); |
grt | b4cab81 | 2017-03-31 06:58:43 | [diff] [blame] | 19 | |
| 20 | install_static::ScopedInstallDetails scoped_install_details; |
| 21 | |
ananta | d936bc1 | 2016-06-22 21:40:31 | [diff] [blame] | 22 | base::TestSuite test_suite(argc, argv); |
Penny MacNeil | a9753d0 | 2017-10-02 16:57:45 | [diff] [blame] | 23 | return base::LaunchUnitTests( |
jam | 2435ed2 | 2017-05-10 19:37:29 | [diff] [blame] | 24 | argc, argv, |
ananta | d936bc1 | 2016-06-22 21:40:31 | [diff] [blame] | 25 | base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); |
ananta | d936bc1 | 2016-06-22 21:40:31 | [diff] [blame] | 26 | } |