| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test/base/ui_test_utils.h" | 5 #include "chrome/test/base/interactive_test_utils.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 11 #include "ui/ui_controls/ui_controls.h" | 11 #include "ui/ui_controls/ui_controls.h" |
| 12 #include "ui/views/focus/focus_manager.h" | 12 #include "ui/views/focus/focus_manager.h" |
| 13 | 13 |
| 14 namespace ui_test_utils { | 14 namespace ui_test_utils { |
| 15 | 15 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 45 const base::Closure& closure) { | 45 const base::Closure& closure) { |
| 46 DCHECK(view); | 46 DCHECK(view); |
| 47 DCHECK(view->GetWidget()); | 47 DCHECK(view->GetWidget()); |
| 48 gfx::Point view_center(view->width() / 2, view->height() / 2); | 48 gfx::Point view_center(view->width() / 2, view->height() / 2); |
| 49 views::View::ConvertPointToScreen(view, &view_center); | 49 views::View::ConvertPointToScreen(view, &view_center); |
| 50 ui_controls::SendMouseMove(view_center.x(), view_center.y()); | 50 ui_controls::SendMouseMove(view_center.x(), view_center.y()); |
| 51 ui_controls::SendMouseEventsNotifyWhenDone(button, state, closure); | 51 ui_controls::SendMouseEventsNotifyWhenDone(button, state, closure); |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace ui_test_utils | 54 } // namespace ui_test_utils |
| OLD | NEW |