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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 } | 749 } |
750 | 750 |
751 void SimulateMouseEvent(WebInputEvent::Type type, | 751 void SimulateMouseEvent(WebInputEvent::Type type, |
752 int x, | 752 int x, |
753 int y, | 753 int y, |
754 int modifiers, | 754 int modifiers, |
755 bool pressed) { | 755 bool pressed) { |
756 WebMouseEvent event = | 756 WebMouseEvent event = |
757 SyntheticWebMouseEventBuilder::Build(type, x, y, modifiers); | 757 SyntheticWebMouseEventBuilder::Build(type, x, y, modifiers); |
758 if (pressed) | 758 if (pressed) |
759 event.button = WebMouseEvent::Button::Left; | 759 event.button = WebMouseEvent::ButtonLeft; |
760 widget_host_->ForwardMouseEvent(event); | 760 widget_host_->ForwardMouseEvent(event); |
761 } | 761 } |
762 | 762 |
763 void SimulateWheelEventWithPhase(WebMouseWheelEvent::Phase phase) { | 763 void SimulateWheelEventWithPhase(WebMouseWheelEvent::Phase phase) { |
764 widget_host_->ForwardWheelEvent( | 764 widget_host_->ForwardWheelEvent( |
765 SyntheticWebMouseWheelEventBuilder::Build(phase)); | 765 SyntheticWebMouseWheelEventBuilder::Build(phase)); |
766 } | 766 } |
767 | 767 |
768 // Inject provided synthetic WebGestureEvent instance. | 768 // Inject provided synthetic WebGestureEvent instance. |
769 void SimulateGestureEventCore(const WebGestureEvent& gesture_event) { | 769 void SimulateGestureEventCore(const WebGestureEvent& gesture_event) { |
(...skipping 3801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4571 | 4571 |
4572 // Retrieve the selected text from clipboard and verify it is as expected. | 4572 // Retrieve the selected text from clipboard and verify it is as expected. |
4573 base::string16 result_text; | 4573 base::string16 result_text; |
4574 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); | 4574 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); |
4575 EXPECT_EQ(expected_text, result_text); | 4575 EXPECT_EQ(expected_text, result_text); |
4576 } | 4576 } |
4577 } | 4577 } |
4578 #endif | 4578 #endif |
4579 | 4579 |
4580 } // namespace content | 4580 } // namespace content |
OLD | NEW |