unittest_main.cc revision 5821806d5e7f356e8fa4b058a389a808ea183019
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
3// found in the LICENSE file.
4
5#include "base/at_exit.h"
6#include "base/command_line.h"
7#include "testing/gmock/include/gmock/gmock.h"
8#include "testing/gtest/include/gtest/gtest.h"
9#include "ui/gl/gl_implementation.h"
10
11int main(int argc, char** argv) {
12  // On Android, AtExitManager is created in
13  // testing/android/native_test_wrapper.cc before main() is called.
14  // The same thing is also done in base/test/test_suite.cc
15#if !defined(OS_ANDROID)
16  base::AtExitManager exit_manager;
17#endif
18  gfx::InitializeGLBindings(gfx::kGLImplementationMockGL);
19  CommandLine::Init(argc, argv);
20  testing::InitGoogleMock(&argc, argv);
21  return RUN_ALL_TESTS();
22}
23