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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros Created 4 years, 11 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/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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/browser_status_monitor.cc ('k') | chrome/browser/ui/ash/window_positioner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698