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

Side by Side Diff: ui/views/run_all_unittests.cc

Issue 1667273002: Creates BackgroundShell and uses it in test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android Created 4 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 | « ui/views/run_all_unittests.h ('k') | ui/views/run_all_unittests_main.cc » ('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) 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/bind.h" 5 #include "base/bind.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/test/launcher/unit_test_launcher.h" 9 #include "base/test/launcher/unit_test_launcher.h"
10 #include "base/test/test_suite.h" 10 #include "base/test/test_suite.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
13 #include "ui/base/ui_base_paths.h" 13 #include "ui/base/ui_base_paths.h"
14 #include "ui/gl/test/gl_surface_test_support.h" 14 #include "ui/gl/test/gl_surface_test_support.h"
15 15
16 #if defined(USE_AURA) 16 #if defined(USE_AURA)
17 #include "ui/aura/env.h" 17 #include "ui/aura/env.h"
18 #endif 18 #endif
19 19
20 namespace views {
21
20 class ViewTestSuite : public base::TestSuite { 22 class ViewTestSuite : public base::TestSuite {
21 public: 23 public:
22 ViewTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} 24 ViewTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
23 25
24 protected: 26 protected:
25 void Initialize() override { 27 void Initialize() override {
26 base::TestSuite::Initialize(); 28 base::TestSuite::Initialize();
27 gfx::GLSurfaceTestSupport::InitializeOneOff(); 29 gfx::GLSurfaceTestSupport::InitializeOneOff();
28 ui::RegisterPathProvider(); 30 ui::RegisterPathProvider();
29 31
(...skipping 10 matching lines...) Expand all
40 aura::Env::DeleteInstance(); 42 aura::Env::DeleteInstance();
41 #endif 43 #endif
42 ui::ResourceBundle::CleanupSharedInstance(); 44 ui::ResourceBundle::CleanupSharedInstance();
43 base::TestSuite::Shutdown(); 45 base::TestSuite::Shutdown();
44 } 46 }
45 47
46 private: 48 private:
47 DISALLOW_COPY_AND_ASSIGN(ViewTestSuite); 49 DISALLOW_COPY_AND_ASSIGN(ViewTestSuite);
48 }; 50 };
49 51
50 int main(int argc, char** argv) { 52 int RunAllUnittests(int argc, char** argv) {
51 ViewTestSuite test_suite(argc, argv); 53 ViewTestSuite test_suite(argc, argv);
52 54
53 return base::LaunchUnitTests( 55 return base::LaunchUnitTests(
54 argc, argv, base::Bind(&ViewTestSuite::Run, 56 argc, argv, base::Bind(&ViewTestSuite::Run,
55 base::Unretained(&test_suite))); 57 base::Unretained(&test_suite)));
56 } 58 }
59
60 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/run_all_unittests.h ('k') | ui/views/run_all_unittests_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698