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

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

Issue 2339523004: Remove old (dead) app list code. (Closed)
Patch Set: Address nonbistytftatl review. Created 4 years, 3 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_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 "ash/aura/wm_window_aura.h" 9 #include "ash/aura/wm_window_aura.h"
10 #include "ash/common/shelf/app_list_button.h" 10 #include "ash/common/shelf/app_list_button.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 int icon_updates() { return icon_updates_; } 121 int icon_updates() { return icon_updates_; }
122 122
123 private: 123 private:
124 Profile* profile_; 124 Profile* profile_;
125 int icon_updates_; 125 int icon_updates_;
126 126
127 DISALLOW_COPY_AND_ASSIGN(TestAppWindowRegistryObserver); 127 DISALLOW_COPY_AND_ASSIGN(TestAppWindowRegistryObserver);
128 }; 128 };
129 129
130 // Click the "All Apps" button from the app launcher start page. Assumes that 130 // Click the "All Apps" button from the app launcher start page. Assumes that
131 // the app launcher is open to the start page. On the non-experimental launcher, 131 // the app launcher is open to the start page.
132 // does nothing.
133 // |display_origin| is the top-left corner of the active display, in screen 132 // |display_origin| is the top-left corner of the active display, in screen
134 // coordinates. 133 // coordinates.
135 void ClickAllAppsButtonFromStartPage(ui::test::EventGenerator* generator, 134 void ClickAllAppsButtonFromStartPage(ui::test::EventGenerator* generator,
136 const gfx::Point& display_origin) { 135 const gfx::Point& display_origin) {
137 if (!app_list::switches::IsExperimentalAppListEnabled())
138 return;
139
140 AppListServiceAshTestApi service_test; 136 AppListServiceAshTestApi service_test;
141 137
142 app_list::StartPageView* start_page_view = service_test.GetStartPageView(); 138 app_list::StartPageView* start_page_view = service_test.GetStartPageView();
143 DCHECK(start_page_view); 139 DCHECK(start_page_view);
144 140
145 app_list::TileItemView* all_apps_button = start_page_view->all_apps_button(); 141 app_list::TileItemView* all_apps_button = start_page_view->all_apps_button();
146 gfx::Rect all_apps_rect = all_apps_button->GetBoundsInScreen(); 142 gfx::Rect all_apps_rect = all_apps_button->GetBoundsInScreen();
147 all_apps_rect.Offset(-display_origin.x(), -display_origin.y()); 143 all_apps_rect.Offset(-display_origin.x(), -display_origin.y());
148 generator->MoveMouseTo(all_apps_rect.CenterPoint().x(), 144 generator->MoveMouseTo(all_apps_rect.CenterPoint().x(),
149 all_apps_rect.CenterPoint().y()); 145 all_apps_rect.CenterPoint().y());
(...skipping 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 2363
2368 // Close all windows via the menu item. 2364 // Close all windows via the menu item.
2369 CloseBrowserWindow(browser(), menu1.get(), LauncherContextMenu::MENU_CLOSE); 2365 CloseBrowserWindow(browser(), menu1.get(), LauncherContextMenu::MENU_CLOSE);
2370 EXPECT_EQ(0u, BrowserList::GetInstance()->size()); 2366 EXPECT_EQ(0u, BrowserList::GetInstance()->size());
2371 2367
2372 // Check if "Close" is removed from the context menu. 2368 // Check if "Close" is removed from the context menu.
2373 std::unique_ptr<LauncherContextMenu> menu2 = CreateBrowserItemContextMenu(); 2369 std::unique_ptr<LauncherContextMenu> menu2 = CreateBrowserItemContextMenu();
2374 ASSERT_FALSE( 2370 ASSERT_FALSE(
2375 IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE)); 2371 IsItemPresentInMenu(menu2.get(), LauncherContextMenu::MENU_CLOSE));
2376 } 2372 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698