OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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/test/launcher/unit_test_launcher.h" |
| 7 #include "base/test/test_suite.h" |
| 8 |
| 9 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 10 #include "base/test/mock_chrome_application_mac.h" |
| 11 #endif |
| 12 |
| 13 namespace { |
| 14 |
| 15 class GlTestSuite : public base::TestSuite { |
| 16 public: |
| 17 GlTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) { |
| 18 } |
| 19 |
| 20 protected: |
| 21 void Initialize() override { |
| 22 base::TestSuite::Initialize(); |
| 23 |
| 24 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 25 mock_cr_app::RegisterMockCrApp(); |
| 26 #endif |
| 27 } |
| 28 |
| 29 void Shutdown() override { |
| 30 base::TestSuite::Shutdown(); |
| 31 } |
| 32 |
| 33 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(GlTestSuite); |
| 35 }; |
| 36 |
| 37 } // namespace |
| 38 |
| 39 int main(int argc, char** argv) { |
| 40 GlTestSuite test_suite(argc, argv); |
| 41 |
| 42 return base::LaunchUnitTests( |
| 43 argc, |
| 44 argv, |
| 45 base::Bind(&GlTestSuite::Run, base::Unretained(&test_suite))); |
| 46 } |
OLD | NEW |