OLD | NEW |
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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
6 | 6 |
| 7 #include "apps/shell_window.h" |
7 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
8 #include "ash/launcher/launcher.h" | 9 #include "ash/launcher/launcher.h" |
9 #include "ash/launcher/launcher_model.h" | 10 #include "ash/launcher/launcher_model.h" |
10 #include "ash/shell.h" | 11 #include "ash/shell.h" |
11 #include "ash/test/launcher_view_test_api.h" | 12 #include "ash/test/launcher_view_test_api.h" |
12 #include "ash/test/shell_test_api.h" | 13 #include "ash/test/shell_test_api.h" |
13 #include "ash/wm/window_util.h" | 14 #include "ash/wm/window_util.h" |
14 #include "base/command_line.h" | 15 #include "base/command_line.h" |
15 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
16 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
17 #include "chrome/browser/automation/automation_util.h" | 18 #include "chrome/browser/automation/automation_util.h" |
18 #include "chrome/browser/extensions/extension_apitest.h" | 19 #include "chrome/browser/extensions/extension_apitest.h" |
19 #include "chrome/browser/extensions/extension_browsertest.h" | 20 #include "chrome/browser/extensions/extension_browsertest.h" |
20 #include "chrome/browser/extensions/extension_function_test_utils.h" | 21 #include "chrome/browser/extensions/extension_function_test_utils.h" |
21 #include "chrome/browser/extensions/extension_service.h" | 22 #include "chrome/browser/extensions/extension_service.h" |
22 #include "chrome/browser/extensions/extension_system.h" | 23 #include "chrome/browser/extensions/extension_system.h" |
23 #include "chrome/browser/extensions/extension_test_message_listener.h" | 24 #include "chrome/browser/extensions/extension_test_message_listener.h" |
24 #include "chrome/browser/extensions/platform_app_browsertest_util.h" | 25 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
25 #include "chrome/browser/extensions/shell_window_registry.h" | 26 #include "chrome/browser/extensions/shell_window_registry.h" |
26 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
27 #include "chrome/browser/ui/browser.h" | 28 #include "chrome/browser/ui/browser.h" |
28 #include "chrome/browser/ui/browser_commands.h" | 29 #include "chrome/browser/ui/browser_commands.h" |
29 #include "chrome/browser/ui/browser_window.h" | 30 #include "chrome/browser/ui/browser_window.h" |
30 #include "chrome/browser/ui/extensions/application_launch.h" | 31 #include "chrome/browser/ui/extensions/application_launch.h" |
31 #include "chrome/browser/ui/extensions/native_app_window.h" | 32 #include "chrome/browser/ui/extensions/native_app_window.h" |
32 #include "chrome/browser/ui/extensions/shell_window.h" | |
33 #include "chrome/browser/ui/host_desktop.h" | 33 #include "chrome/browser/ui/host_desktop.h" |
34 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 34 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
35 #include "chrome/common/chrome_notification_types.h" | 35 #include "chrome/common/chrome_notification_types.h" |
36 #include "chrome/common/chrome_switches.h" | 36 #include "chrome/common/chrome_switches.h" |
37 #include "chrome/common/extensions/extension_constants.h" | 37 #include "chrome/common/extensions/extension_constants.h" |
38 #include "chrome/test/base/ui_test_utils.h" | 38 #include "chrome/test/base/ui_test_utils.h" |
39 #include "content/public/browser/notification_service.h" | 39 #include "content/public/browser/notification_service.h" |
40 #include "content/public/browser/notification_source.h" | 40 #include "content/public/browser/notification_source.h" |
41 #include "content/public/browser/web_contents.h" | 41 #include "content/public/browser/web_contents.h" |
42 #include "testing/gtest/include/gtest/gtest.h" | 42 #include "testing/gtest/include/gtest/gtest.h" |
43 #include "ui/aura/client/aura_constants.h" | 43 #include "ui/aura/client/aura_constants.h" |
44 #include "ui/aura/window.h" | 44 #include "ui/aura/window.h" |
45 | 45 |
| 46 using apps::ShellWindow; |
46 using extensions::Extension; | 47 using extensions::Extension; |
47 using content::WebContents; | 48 using content::WebContents; |
48 | 49 |
49 namespace { | 50 namespace { |
50 // TODO(skuhne): Remove this temporary fix once M28 is out and CL 11596003 | 51 // TODO(skuhne): Remove this temporary fix once M28 is out and CL 11596003 |
51 // has landed. See also launcher.cc for the offset introduction. | 52 // has landed. See also launcher.cc for the offset introduction. |
52 const int kChromeItemOffset = 1; | 53 const int kChromeItemOffset = 1; |
53 } | 54 } |
54 | 55 |
55 class LauncherPlatformAppBrowserTest | 56 class LauncherPlatformAppBrowserTest |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
843 EXPECT_TRUE(launcher_->IsShowingOverflowBubble()); | 844 EXPECT_TRUE(launcher_->IsShowingOverflowBubble()); |
844 | 845 |
845 // Unpin first pinned app and there should be no crash. | 846 // Unpin first pinned app and there should be no crash. |
846 ChromeLauncherController* controller = | 847 ChromeLauncherController* controller = |
847 static_cast<ChromeLauncherController*>(launcher_->delegate()); | 848 static_cast<ChromeLauncherController*>(launcher_->delegate()); |
848 controller->UnpinAppsWithID(std::string("fake_app_0")); | 849 controller->UnpinAppsWithID(std::string("fake_app_0")); |
849 | 850 |
850 test.RunMessageLoopUntilAnimationsDone(); | 851 test.RunMessageLoopUntilAnimationsDone(); |
851 EXPECT_FALSE(launcher_->IsShowingOverflowBubble()); | 852 EXPECT_FALSE(launcher_->IsShowingOverflowBubble()); |
852 } | 853 } |
OLD | NEW |