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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_view_interactive_uitest.cc

Issue 1678163002: mac_views_browser: fixed interactive_ui_tests compilation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unneeded header, enable ActivateOverflowedToolbarActionWithKeyboard test compilation on Mac Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/location.h" 5 #include "base/location.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h" 10 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
11 #include "chrome/browser/ui/views/frame/browser_view.h" 11 #include "chrome/browser/ui/views/frame/browser_view.h"
12 #include "chrome/browser/ui/views/frame/test_with_browser_view.h" 12 #include "chrome/browser/ui/views/frame/test_with_browser_view.h"
13 #include "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h"
14 #include "chrome/browser/ui/views/toolbar/app_menu_button.h" 13 #include "chrome/browser/ui/views/toolbar/app_menu_button.h"
15 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" 14 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h"
16 #include "chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h" 15 #include "chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h"
17 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" 16 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
18 #include "chrome/test/base/interactive_test_utils.h" 17 #include "chrome/test/base/interactive_test_utils.h"
19 #include "extensions/common/feature_switch.h" 18 #include "extensions/common/feature_switch.h"
20 19
21 // Borrowed from chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc, 20 // Borrowed from chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc,
22 // since these are also disabled on Linux for drag and drop. 21 // since these are also disabled on Linux for drag and drop.
23 // TODO(erg): Fix DND tests on linux_aura. crbug.com/163931 22 // TODO(erg): Fix DND tests on linux_aura. crbug.com/163931
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("api_test") 154 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("api_test")
156 .AppendASCII("browser_action") 155 .AppendASCII("browser_action")
157 .AppendASCII("basics"))); 156 .AppendASCII("basics")));
158 base::RunLoop().RunUntilIdle(); // Ensure the extension is fully loaded. 157 base::RunLoop().RunUntilIdle(); // Ensure the extension is fully loaded.
159 158
160 ASSERT_EQ(1u, browser_actions()->VisibleBrowserActions()); 159 ASSERT_EQ(1u, browser_actions()->VisibleBrowserActions());
161 160
162 ToolbarActionView* view = browser_actions()->GetToolbarActionViewAt(0); 161 ToolbarActionView* view = browser_actions()->GetToolbarActionViewAt(0);
163 ASSERT_TRUE(view); 162 ASSERT_TRUE(view);
164 163
165 gfx::Point browser_action_view_loc = test::GetCenterInScreenCoordinates(view); 164 gfx::Point browser_action_view_loc =
166 gfx::Point app_button_loc = 165 ui_test_utils::GetCenterInScreenCoordinates(view);
167 test::GetCenterInScreenCoordinates(toolbar_view()->app_menu_button()); 166 gfx::Point app_button_loc = ui_test_utils::GetCenterInScreenCoordinates(
167 toolbar_view()->app_menu_button());
168 168
169 // Perform a drag and drop from the browser action view to the app button, 169 // Perform a drag and drop from the browser action view to the app button,
170 // which should open the app menu. 170 // which should open the app menu.
171 DoDragAndDrop(browser_action_view_loc, app_button_loc); 171 DoDragAndDrop(browser_action_view_loc, app_button_loc);
172 } 172 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view_interactive_uitest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698