| OLD | NEW |
| 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/ash/launcher/chrome_launcher_controller_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <set> | 12 #include <set> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <utility> | 14 #include <utility> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "ash/common/ash_switches.h" | |
| 18 #include "ash/common/shelf/shelf_constants.h" | 17 #include "ash/common/shelf/shelf_constants.h" |
| 19 #include "ash/common/shelf/shelf_controller.h" | 18 #include "ash/common/shelf/shelf_controller.h" |
| 20 #include "ash/common/shelf/shelf_item_types.h" | 19 #include "ash/common/shelf/shelf_item_types.h" |
| 21 #include "ash/common/shelf/shelf_model.h" | 20 #include "ash/common/shelf/shelf_model.h" |
| 22 #include "ash/common/shelf/shelf_model_observer.h" | 21 #include "ash/common/shelf/shelf_model_observer.h" |
| 23 #include "ash/common/test/test_session_state_delegate.h" | 22 #include "ash/common/test/test_session_state_delegate.h" |
| 24 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 23 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
| 25 #include "ash/common/wm_shell.h" | 24 #include "ash/common/wm_shell.h" |
| 26 #include "ash/display/screen_orientation_controller_chromeos.h" | 25 #include "ash/display/screen_orientation_controller_chromeos.h" |
| 27 #include "ash/shell.h" | 26 #include "ash/shell.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 class ChromeLauncherControllerImplTest : public BrowserWithTestWindowTest { | 286 class ChromeLauncherControllerImplTest : public BrowserWithTestWindowTest { |
| 288 protected: | 287 protected: |
| 289 ChromeLauncherControllerImplTest() | 288 ChromeLauncherControllerImplTest() |
| 290 : BrowserWithTestWindowTest(Browser::TYPE_TABBED, false) {} | 289 : BrowserWithTestWindowTest(Browser::TYPE_TABBED, false) {} |
| 291 | 290 |
| 292 ~ChromeLauncherControllerImplTest() override {} | 291 ~ChromeLauncherControllerImplTest() override {} |
| 293 | 292 |
| 294 void SetUp() override { | 293 void SetUp() override { |
| 295 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 294 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 296 command_line->AppendSwitch(switches::kUseFirstDisplayAsInternal); | 295 command_line->AppendSwitch(switches::kUseFirstDisplayAsInternal); |
| 297 command_line->AppendSwitch(ash::switches::kAshEnableTouchViewTesting); | |
| 298 | 296 |
| 299 app_list::AppListSyncableServiceFactory::SetUseInTesting(); | 297 app_list::AppListSyncableServiceFactory::SetUseInTesting(); |
| 300 | 298 |
| 301 BrowserWithTestWindowTest::SetUp(); | 299 BrowserWithTestWindowTest::SetUp(); |
| 302 | 300 |
| 303 if (!profile_manager_) { | 301 if (!profile_manager_) { |
| 304 profile_manager_.reset( | 302 profile_manager_.reset( |
| 305 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); | 303 new TestingProfileManager(TestingBrowserProcess::GetGlobal())); |
| 306 ASSERT_TRUE(profile_manager_->SetUp()); | 304 ASSERT_TRUE(profile_manager_->SetUp()); |
| 307 } | 305 } |
| (...skipping 3755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4063 | 4061 |
| 4064 // Pinned state should not change. | 4062 // Pinned state should not change. |
| 4065 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); | 4063 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); |
| 4066 launcher_controller_->UnpinAppWithID(extension2_->id()); | 4064 launcher_controller_->UnpinAppWithID(extension2_->id()); |
| 4067 EXPECT_EQ("AppList, Chrome, App1", GetPinnedAppStatus()); | 4065 EXPECT_EQ("AppList, Chrome, App1", GetPinnedAppStatus()); |
| 4068 | 4066 |
| 4069 // Resume syncing and sync information overrides local copy. | 4067 // Resume syncing and sync information overrides local copy. |
| 4070 StartAppSyncService(copy_sync_list); | 4068 StartAppSyncService(copy_sync_list); |
| 4071 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); | 4069 EXPECT_EQ("AppList, Chrome, App1, App2", GetPinnedAppStatus()); |
| 4072 } | 4070 } |
| OLD | NEW |