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 #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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 apps::APP_SHIM_LAUNCH_NORMAL, | 43 apps::APP_SHIM_LAUNCH_NORMAL, |
44 std::vector<base::FilePath>()); | 44 std::vector<base::FilePath>()); |
45 } | 45 } |
46 | 46 |
47 AppListViewController* GetViewController() { | 47 AppListViewController* GetViewController() { |
48 return [test::AppListServiceMacTestApi::window_controller() | 48 return [test::AppListServiceMacTestApi::window_controller() |
49 appListViewController]; | 49 appListViewController]; |
50 } | 50 } |
51 | 51 |
52 // testing::Test overrides: | 52 // testing::Test overrides: |
53 virtual void TearDown() override { | 53 void TearDown() override { |
54 // At tear-down, NOTIFICATION_APP_TERMINATING should have been sent for the | 54 // At tear-down, NOTIFICATION_APP_TERMINATING should have been sent for the |
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 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 EXPECT_TRUE(service->IsAppListVisible()); | 120 EXPECT_TRUE(service->IsAppListVisible()); |
121 EXPECT_EQ(3, launch_count_); | 121 EXPECT_EQ(3, launch_count_); |
122 service->DismissAppList(); | 122 service->DismissAppList(); |
123 EXPECT_FALSE(service->IsAppListVisible()); | 123 EXPECT_FALSE(service->IsAppListVisible()); |
124 | 124 |
125 // View sticks around until shutdown. | 125 // View sticks around until shutdown. |
126 AppListViewController* view_controller = GetViewController(); | 126 AppListViewController* view_controller = GetViewController(); |
127 EXPECT_TRUE(view_controller); | 127 EXPECT_TRUE(view_controller); |
128 EXPECT_TRUE([view_controller delegate]); | 128 EXPECT_TRUE([view_controller delegate]); |
129 } | 129 } |
OLD | NEW |