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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_mac_interactive_uitest.mm

Issue 671653002: Standardize usage of virtual/override/final in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #import "chrome/browser/ui/app_list/app_list_service_mac.h" 5 #import "chrome/browser/ui/app_list/app_list_service_mac.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/apps/app_shim/app_shim_handler_mac.h" 10 #include "chrome/browser/apps/app_shim/app_shim_handler_mac.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // browser shutdown. References to browser-owned objects must be removed 55 // browser shutdown. References to browser-owned objects must be removed
56 // from the app list UI. 56 // from the app list UI.
57 AppListViewController* view_controller = GetViewController(); 57 AppListViewController* view_controller = GetViewController();
58 // Note this first check will fail if the test doesn't ever show the 58 // Note this first check will fail if the test doesn't ever show the
59 // app list, but currently all tests in this file do. 59 // app list, but currently all tests in this file do.
60 EXPECT_TRUE(view_controller); 60 EXPECT_TRUE(view_controller);
61 EXPECT_FALSE([view_controller delegate]); 61 EXPECT_FALSE([view_controller delegate]);
62 } 62 }
63 63
64 // AppShimHandler::Host overrides: 64 // AppShimHandler::Host overrides:
65 virtual void OnAppLaunchComplete(apps::AppShimLaunchResult result) override { 65 void OnAppLaunchComplete(apps::AppShimLaunchResult result) override {
66 // AppList shims are always given APP_SHIM_LAUNCH_DUPLICATE_HOST, indicating 66 // AppList shims are always given APP_SHIM_LAUNCH_DUPLICATE_HOST, indicating
67 // that the shim process should immediately close. 67 // that the shim process should immediately close.
68 EXPECT_EQ(apps::APP_SHIM_LAUNCH_DUPLICATE_HOST, result); 68 EXPECT_EQ(apps::APP_SHIM_LAUNCH_DUPLICATE_HOST, result);
69 ++launch_count_; 69 ++launch_count_;
70 } 70 }
71 virtual void OnAppClosed() override { 71 void OnAppClosed() override { NOTREACHED(); }
72 NOTREACHED(); 72 void OnAppHide() override {}
73 } 73 void OnAppRequestUserAttention(apps::AppShimAttentionType type) override {}
74 virtual void OnAppHide() override {} 74 base::FilePath GetProfilePath() const override {
75 virtual void OnAppRequestUserAttention(
76 apps::AppShimAttentionType type) override {}
77 virtual base::FilePath GetProfilePath() const override {
78 NOTREACHED(); // Currently unused in this test. 75 NOTREACHED(); // Currently unused in this test.
79 return base::FilePath(); 76 return base::FilePath();
80 } 77 }
81 virtual std::string GetAppId() const override { 78 std::string GetAppId() const override { return app_mode::kAppListModeId; }
82 return app_mode::kAppListModeId;
83 }
84 79
85 int launch_count_; 80 int launch_count_;
86 81
87 private: 82 private:
88 DISALLOW_COPY_AND_ASSIGN(AppListServiceMacInteractiveTest); 83 DISALLOW_COPY_AND_ASSIGN(AppListServiceMacInteractiveTest);
89 }; 84 };
90 85
91 } // namespace 86 } // namespace
92 87
93 IN_PROC_BROWSER_TEST_F(AppListServiceMacInteractiveTest, ShowAppListUsingShim) { 88 IN_PROC_BROWSER_TEST_F(AppListServiceMacInteractiveTest, ShowAppListUsingShim) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 EXPECT_TRUE(service->IsAppListVisible()); 120 EXPECT_TRUE(service->IsAppListVisible());
126 EXPECT_EQ(3, launch_count_); 121 EXPECT_EQ(3, launch_count_);
127 service->DismissAppList(); 122 service->DismissAppList();
128 EXPECT_FALSE(service->IsAppListVisible()); 123 EXPECT_FALSE(service->IsAppListVisible());
129 124
130 // View sticks around until shutdown. 125 // View sticks around until shutdown.
131 AppListViewController* view_controller = GetViewController(); 126 AppListViewController* view_controller = GetViewController();
132 EXPECT_TRUE(view_controller); 127 EXPECT_TRUE(view_controller);
133 EXPECT_TRUE([view_controller delegate]); 128 EXPECT_TRUE([view_controller delegate]);
134 } 129 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698