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

Side by Side Diff: ui/app_list/test/run_all_unittests.cc

Issue 1802473002: Add deprecation warning banner to App Launcher on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20170310-MacViews-ViewsUnittests
Patch Set: Separate function Created 4 years, 9 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/app_list/cocoa/apps_grid_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/command_line.h"
6 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
7 #include "base/macros.h" 8 #include "base/macros.h"
8 #include "base/path_service.h" 9 #include "base/path_service.h"
9 #include "base/test/launcher/unit_test_launcher.h" 10 #include "base/test/launcher/unit_test_launcher.h"
10 #include "base/test/test_discardable_memory_allocator.h" 11 #include "base/test/test_discardable_memory_allocator.h"
11 #include "base/test/test_suite.h" 12 #include "base/test/test_suite.h"
12 #include "build/build_config.h" 13 #include "build/build_config.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 #include "ui/base/resource/resource_bundle.h" 15 #include "ui/base/resource/resource_bundle.h"
15 #include "ui/base/ui_base_paths.h" 16 #include "ui/base/ui_base_paths.h"
16 17
17 #if defined(OS_MACOSX) 18 #if defined(OS_MACOSX)
18 #include "base/test/mock_chrome_application_mac.h" 19 #include "base/test/mock_chrome_application_mac.h"
19 #endif 20 #endif
20 21
21 #if defined(TOOLKIT_VIEWS) 22 #if defined(TOOLKIT_VIEWS)
22 #include "ui/gl/test/gl_surface_test_support.h" 23 #include "ui/gl/test/gl_surface_test_support.h"
23 #endif 24 #endif
24 25
25 namespace { 26 namespace {
26 27
28 // Use the pattern established in content_switches.h, but don't add a content
29 // dependency -- app list shouldn't have one.
30 const char kTestType[] = "test-type";
31
27 class AppListTestSuite : public base::TestSuite { 32 class AppListTestSuite : public base::TestSuite {
28 public: 33 public:
29 AppListTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} 34 AppListTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
30 35
31 protected: 36 protected:
32 void Initialize() override { 37 void Initialize() override {
38 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
39 command_line->AppendSwitchASCII(kTestType, "applist");
40
33 #if defined(OS_MACOSX) 41 #if defined(OS_MACOSX)
34 mock_cr_app::RegisterMockCrApp(); 42 mock_cr_app::RegisterMockCrApp();
35 #endif 43 #endif
36 #if defined(TOOLKIT_VIEWS) 44 #if defined(TOOLKIT_VIEWS)
37 gfx::GLSurfaceTestSupport::InitializeOneOff(); 45 gfx::GLSurfaceTestSupport::InitializeOneOff();
38 #endif 46 #endif
39 base::TestSuite::Initialize(); 47 base::TestSuite::Initialize();
40 ui::RegisterPathProvider(); 48 ui::RegisterPathProvider();
41 49
42 base::FilePath ui_test_pak_path; 50 base::FilePath ui_test_pak_path;
(...skipping 18 matching lines...) Expand all
61 } // namespace 69 } // namespace
62 70
63 int main(int argc, char** argv) { 71 int main(int argc, char** argv) {
64 AppListTestSuite test_suite(argc, argv); 72 AppListTestSuite test_suite(argc, argv);
65 73
66 return base::LaunchUnitTests( 74 return base::LaunchUnitTests(
67 argc, 75 argc,
68 argv, 76 argv,
69 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite))); 77 base::Bind(&AppListTestSuite::Run, base::Unretained(&test_suite)));
70 } 78 }
OLDNEW
« no previous file with comments | « ui/app_list/cocoa/apps_grid_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698