| OLD | NEW |
| 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/run_loop.h" | 5 #include "base/run_loop.h" |
| 6 #include "chrome/browser/extensions/extension_browsertest.h" | 6 #include "chrome/browser/extensions/extension_browsertest.h" |
| 7 #include "chrome/browser/ui/views/frame/browser_view.h" | 7 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 8 #include "chrome/browser/ui/views/frame/test_with_browser_view.h" | 8 #include "chrome/browser/ui/views/frame/test_with_browser_view.h" |
| 9 #include "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h" | 9 #include "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h" |
| 10 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" | 10 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 IN_PROC_BROWSER_TEST_F(ToolbarViewInteractiveUITest, | 145 IN_PROC_BROWSER_TEST_F(ToolbarViewInteractiveUITest, |
| 146 MAYBE(TestWrenchMenuOpensOnDrag)) { | 146 MAYBE(TestWrenchMenuOpensOnDrag)) { |
| 147 // Load an extension that has a browser action. | 147 // Load an extension that has a browser action. |
| 148 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("api_test") | 148 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("api_test") |
| 149 .AppendASCII("browser_action") | 149 .AppendASCII("browser_action") |
| 150 .AppendASCII("basics"))); | 150 .AppendASCII("basics"))); |
| 151 base::RunLoop().RunUntilIdle(); // Ensure the extension is fully loaded. | 151 base::RunLoop().RunUntilIdle(); // Ensure the extension is fully loaded. |
| 152 | 152 |
| 153 ASSERT_EQ(1u, browser_actions()->VisibleBrowserActions()); | 153 ASSERT_EQ(1u, browser_actions()->VisibleBrowserActions()); |
| 154 | 154 |
| 155 ToolbarActionView* view = browser_actions()->GetToolbarActionViewAt(0); | 155 BrowserActionView* view = browser_actions()->GetBrowserActionViewAt(0); |
| 156 ASSERT_TRUE(view); | 156 ASSERT_TRUE(view); |
| 157 | 157 |
| 158 gfx::Point browser_action_view_loc = test::GetCenterInScreenCoordinates(view); | 158 gfx::Point browser_action_view_loc = test::GetCenterInScreenCoordinates(view); |
| 159 gfx::Point wrench_button_loc = | 159 gfx::Point wrench_button_loc = |
| 160 test::GetCenterInScreenCoordinates(toolbar_view()->app_menu()); | 160 test::GetCenterInScreenCoordinates(toolbar_view()->app_menu()); |
| 161 | 161 |
| 162 // Perform a drag and drop from the browser action view to the wrench button, | 162 // Perform a drag and drop from the browser action view to the wrench button, |
| 163 // which should open the wrench menu. | 163 // which should open the wrench menu. |
| 164 DoDragAndDrop(browser_action_view_loc, wrench_button_loc); | 164 DoDragAndDrop(browser_action_view_loc, wrench_button_loc); |
| 165 } | 165 } |
| OLD | NEW |