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.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/shelf/shelf.h" | 10 #include "ash/shelf/shelf.h" |
(...skipping 1804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1815 AppListService* service = AppListService::Get(chrome::GetActiveDesktop()); | 1815 AppListService* service = AppListService::Get(chrome::GetActiveDesktop()); |
1816 | 1816 |
1817 // There should be two items in our shelf by this time. | 1817 // There should be two items in our shelf by this time. |
1818 EXPECT_EQ(2, model_->item_count()); | 1818 EXPECT_EQ(2, model_->item_count()); |
1819 EXPECT_FALSE(service->IsAppListVisible()); | 1819 EXPECT_FALSE(service->IsAppListVisible()); |
1820 | 1820 |
1821 // Open the app list menu and check that the drag and drop host was set. | 1821 // Open the app list menu and check that the drag and drop host was set. |
1822 gfx::Rect app_list_bounds = | 1822 gfx::Rect app_list_bounds = |
1823 test.shelf_view()->GetAppListButtonView()->GetBoundsInScreen(); | 1823 test.shelf_view()->GetAppListButtonView()->GetBoundsInScreen(); |
1824 gfx::Display display = | 1824 gfx::Display display = |
1825 ash::Shell::GetScreen()->GetDisplayNearestWindow(secondary_root_window); | 1825 gfx::Screen::GetScreen()->GetDisplayNearestWindow(secondary_root_window); |
1826 const gfx::Point& origin = display.bounds().origin(); | 1826 const gfx::Point& origin = display.bounds().origin(); |
1827 app_list_bounds.Offset(-origin.x(), -origin.y()); | 1827 app_list_bounds.Offset(-origin.x(), -origin.y()); |
1828 | 1828 |
1829 generator.MoveMouseTo(app_list_bounds.CenterPoint().x(), | 1829 generator.MoveMouseTo(app_list_bounds.CenterPoint().x(), |
1830 app_list_bounds.CenterPoint().y()); | 1830 app_list_bounds.CenterPoint().y()); |
1831 generator.ClickLeftButton(); | 1831 generator.ClickLeftButton(); |
1832 base::MessageLoop::current()->RunUntilIdle(); | 1832 base::MessageLoop::current()->RunUntilIdle(); |
1833 EXPECT_TRUE(service->IsAppListVisible()); | 1833 EXPECT_TRUE(service->IsAppListVisible()); |
1834 | 1834 |
1835 // Click the "all apps" button on the start page. | 1835 // Click the "all apps" button on the start page. |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2292 controller_->ActivateApp(bookmark_app->id(), ash::LAUNCH_FROM_APP_LIST, 0); | 2292 controller_->ActivateApp(bookmark_app->id(), ash::LAUNCH_FROM_APP_LIST, 0); |
2293 | 2293 |
2294 // There should be two new browsers. | 2294 // There should be two new browsers. |
2295 EXPECT_EQ(3u, chrome::GetTotalBrowserCountForProfile(browser()->profile())); | 2295 EXPECT_EQ(3u, chrome::GetTotalBrowserCountForProfile(browser()->profile())); |
2296 | 2296 |
2297 // The apps should now be running, with the last opened app active. | 2297 // The apps should now be running, with the last opened app active. |
2298 EXPECT_EQ(ash::STATUS_RUNNING, model_->ItemByID(hosted_app_shelf_id)->status); | 2298 EXPECT_EQ(ash::STATUS_RUNNING, model_->ItemByID(hosted_app_shelf_id)->status); |
2299 EXPECT_EQ(ash::STATUS_ACTIVE, | 2299 EXPECT_EQ(ash::STATUS_ACTIVE, |
2300 model_->ItemByID(bookmark_app_shelf_id)->status); | 2300 model_->ItemByID(bookmark_app_shelf_id)->status); |
2301 } | 2301 } |
OLD | NEW |