OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #if defined(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
10 #include "base/mac/scoped_nsautorelease_pool.h" | 10 #include "base/mac/scoped_nsautorelease_pool.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 return testSuite->Run(); | 28 return testSuite->Run(); |
29 } | 29 } |
30 | 30 |
31 } // namespace | 31 } // namespace |
32 | 32 |
33 int main(int argc, char** argv) { | 33 int main(int argc, char** argv) { |
34 #if defined(OS_ANDROID) | 34 #if defined(OS_ANDROID) |
35 ui::gl::android::RegisterJni(base::android::AttachCurrentThread()); | 35 ui::gl::android::RegisterJni(base::android::AttachCurrentThread()); |
36 #endif | 36 #endif |
37 base::TestSuite test_suite(argc, argv); | 37 base::TestSuite test_suite(argc, argv); |
38 CommandLine::Init(argc, argv); | 38 base::CommandLine::Init(argc, argv); |
39 #if defined(OS_MACOSX) | 39 #if defined(OS_MACOSX) |
40 base::mac::ScopedNSAutoreleasePool pool; | 40 base::mac::ScopedNSAutoreleasePool pool; |
41 #endif | 41 #endif |
42 gfx::GLSurface::InitializeOneOff(); | 42 gfx::GLSurface::InitializeOneOff(); |
43 ::gles2::Initialize(); | 43 ::gles2::Initialize(); |
44 gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); | 44 gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess()); |
45 testing::InitGoogleMock(&argc, argv); | 45 testing::InitGoogleMock(&argc, argv); |
46 return base::LaunchUnitTestsSerially( | 46 return base::LaunchUnitTestsSerially( |
47 argc, | 47 argc, |
48 argv, | 48 argv, |
49 base::Bind(&RunHelper, base::Unretained(&test_suite))); | 49 base::Bind(&RunHelper, base::Unretained(&test_suite))); |
50 } | 50 } |
OLD | NEW |