| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 } | 294 } |
| 295 | 295 |
| 296 void SimulateRWHMouseClick(content::RenderWidgetHost* rwh, | 296 void SimulateRWHMouseClick(content::RenderWidgetHost* rwh, |
| 297 blink::WebMouseEvent::Button button, | 297 blink::WebMouseEvent::Button button, |
| 298 int x, | 298 int x, |
| 299 int y) { | 299 int y) { |
| 300 blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown, | 300 blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown, |
| 301 blink::WebInputEvent::NoModifiers, | 301 blink::WebInputEvent::NoModifiers, |
| 302 blink::WebInputEvent::TimeStampForTesting); | 302 blink::WebInputEvent::TimeStampForTesting); |
| 303 mouse_event.button = button; | 303 mouse_event.button = button; |
| 304 mouse_event.x = x; | 304 mouse_event.position.x = x; |
| 305 mouse_event.y = y; | 305 mouse_event.position.y = y; |
| 306 // Needed for the WebViewTest.ContextMenuPositionAfterCSSTransforms | 306 // Needed for the WebViewTest.ContextMenuPositionAfterCSSTransforms |
| 307 gfx::Rect rect = rwh->GetView()->GetViewBounds(); | 307 gfx::Rect rect = rwh->GetView()->GetViewBounds(); |
| 308 mouse_event.globalX = x + rect.x(); | 308 mouse_event.screenPosition.x = x + rect.x(); |
| 309 mouse_event.globalY = y + rect.y(); | 309 mouse_event.screenPosition.y = y + rect.y(); |
| 310 rwh->ForwardMouseEvent(mouse_event); | 310 rwh->ForwardMouseEvent(mouse_event); |
| 311 mouse_event.setType(blink::WebInputEvent::MouseUp); | 311 mouse_event.setType(blink::WebInputEvent::MouseUp); |
| 312 rwh->ForwardMouseEvent(mouse_event); | 312 rwh->ForwardMouseEvent(mouse_event); |
| 313 } | 313 } |
| 314 | 314 |
| 315 class PopupCreatedObserver { | 315 class PopupCreatedObserver { |
| 316 public: | 316 public: |
| 317 PopupCreatedObserver() | 317 PopupCreatedObserver() |
| 318 : initial_widget_count_(0), | 318 : initial_widget_count_(0), |
| 319 last_render_widget_host_(NULL) {} | 319 last_render_widget_host_(NULL) {} |
| (...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1571 // Get the input value from the guest. | 1571 // Get the input value from the guest. |
| 1572 value.clear(); | 1572 value.clear(); |
| 1573 ASSERT_TRUE(ExecuteScriptAndExtractString(guest_web_contents, | 1573 ASSERT_TRUE(ExecuteScriptAndExtractString(guest_web_contents, |
| 1574 "window.domAutomationController." | 1574 "window.domAutomationController." |
| 1575 "send(document.querySelector('" | 1575 "send(document.querySelector('" |
| 1576 "input').value)", | 1576 "input').value)", |
| 1577 &value)); | 1577 &value)); |
| 1578 EXPECT_EQ("A B C D", value); | 1578 EXPECT_EQ("A B C D", value); |
| 1579 } | 1579 } |
| 1580 #endif // OS_MACOSX | 1580 #endif // OS_MACOSX |
| OLD | NEW |