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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc

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 #include "chrome/browser/ui/app_list/app_list_service.h" 5 #include "chrome/browser/ui/app_list/app_list_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_file_value_serializer.h" 8 #include "base/json/json_file_value_serializer.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 controller->DismissView(); 139 controller->DismissView();
140 ASSERT_FALSE(service->IsAppListVisible()); 140 ASSERT_FALSE(service->IsAppListVisible());
141 } 141 }
142 142
143 // Interactive UI test that adds the --show-app-list command line switch. 143 // Interactive UI test that adds the --show-app-list command line switch.
144 class ShowAppListInteractiveTest : public InProcessBrowserTest { 144 class ShowAppListInteractiveTest : public InProcessBrowserTest {
145 public: 145 public:
146 ShowAppListInteractiveTest() {} 146 ShowAppListInteractiveTest() {}
147 147
148 virtual void SetUpCommandLine(CommandLine* command_line) override { 148 void SetUpCommandLine(CommandLine* command_line) override {
149 command_line->AppendSwitch(switches::kShowAppList); 149 command_line->AppendSwitch(switches::kShowAppList);
150 } 150 }
151 151
152 private: 152 private:
153 DISALLOW_COPY_AND_ASSIGN(ShowAppListInteractiveTest); 153 DISALLOW_COPY_AND_ASSIGN(ShowAppListInteractiveTest);
154 }; 154 };
155 155
156 // Test showing the app list using the command line switch. 156 // Test showing the app list using the command line switch.
157 #if defined(OS_CHROMEOS) 157 #if defined(OS_CHROMEOS)
158 // http://crbug.com/396499 158 // http://crbug.com/396499
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 // Interactive UI test that creates a non-default profile and configures it for 192 // Interactive UI test that creates a non-default profile and configures it for
193 // the --show-app-list flag. 193 // the --show-app-list flag.
194 class ShowAppListNonDefaultInteractiveTest : public ShowAppListInteractiveTest { 194 class ShowAppListNonDefaultInteractiveTest : public ShowAppListInteractiveTest {
195 public: 195 public:
196 ShowAppListNonDefaultInteractiveTest() 196 ShowAppListNonDefaultInteractiveTest()
197 : second_profile_name_(FILE_PATH_LITERAL("Profile 1")) { 197 : second_profile_name_(FILE_PATH_LITERAL("Profile 1")) {
198 } 198 }
199 199
200 virtual bool SetUpUserDataDirectory() override { 200 bool SetUpUserDataDirectory() override {
201 // Create a temp dir for "Profile 1" and seed the user data dir with a Local 201 // Create a temp dir for "Profile 1" and seed the user data dir with a Local
202 // State file configuring the app list to use it. 202 // State file configuring the app list to use it.
203 base::FilePath user_data_dir; 203 base::FilePath user_data_dir;
204 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); 204 CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir));
205 base::FilePath profile_path = user_data_dir.Append(second_profile_name_); 205 base::FilePath profile_path = user_data_dir.Append(second_profile_name_);
206 CHECK(second_profile_temp_dir_.Set(profile_path)); 206 CHECK(second_profile_temp_dir_.Set(profile_path));
207 207
208 base::FilePath local_pref_path = 208 base::FilePath local_pref_path =
209 user_data_dir.Append(chrome::kLocalStateFilename); 209 user_data_dir.Append(chrome::kLocalStateFilename);
210 base::DictionaryValue dict; 210 base::DictionaryValue dict;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 CreateBrowser(profile_manager->GetLastUsedProfile()); 261 CreateBrowser(profile_manager->GetLastUsedProfile());
262 262
263 // Delete the profile being used by the app list. 263 // Delete the profile being used by the app list.
264 profile_manager->ScheduleProfileForDeletion( 264 profile_manager->ScheduleProfileForDeletion(
265 service->GetCurrentAppListProfile()->GetPath(), 265 service->GetCurrentAppListProfile()->GetPath(),
266 ProfileManager::CreateCallback()); 266 ProfileManager::CreateCallback());
267 267
268 // App Launcher should get closed immediately and nothing should explode. 268 // App Launcher should get closed immediately and nothing should explode.
269 EXPECT_FALSE(service->IsAppListVisible()); 269 EXPECT_FALSE(service->IsAppListVisible());
270 } 270 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698