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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 } | 739 } |
740 | 740 |
741 void SimulateMouseEvent(WebInputEvent::Type type, | 741 void SimulateMouseEvent(WebInputEvent::Type type, |
742 int x, | 742 int x, |
743 int y, | 743 int y, |
744 int modifiers, | 744 int modifiers, |
745 bool pressed) { | 745 bool pressed) { |
746 WebMouseEvent event = | 746 WebMouseEvent event = |
747 SyntheticWebMouseEventBuilder::Build(type, x, y, modifiers); | 747 SyntheticWebMouseEventBuilder::Build(type, x, y, modifiers); |
748 if (pressed) | 748 if (pressed) |
749 event.button = WebMouseEvent::ButtonLeft; | 749 event.button = WebMouseEvent::Button::Left; |
750 widget_host_->ForwardMouseEvent(event); | 750 widget_host_->ForwardMouseEvent(event); |
751 } | 751 } |
752 | 752 |
753 void SimulateWheelEventWithPhase(WebMouseWheelEvent::Phase phase) { | 753 void SimulateWheelEventWithPhase(WebMouseWheelEvent::Phase phase) { |
754 widget_host_->ForwardWheelEvent( | 754 widget_host_->ForwardWheelEvent( |
755 SyntheticWebMouseWheelEventBuilder::Build(phase)); | 755 SyntheticWebMouseWheelEventBuilder::Build(phase)); |
756 } | 756 } |
757 | 757 |
758 // Inject provided synthetic WebGestureEvent instance. | 758 // Inject provided synthetic WebGestureEvent instance. |
759 void SimulateGestureEventCore(const WebGestureEvent& gesture_event) { | 759 void SimulateGestureEventCore(const WebGestureEvent& gesture_event) { |
(...skipping 3818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4578 | 4578 |
4579 // Retrieve the selected text from clipboard and verify it is as expected. | 4579 // Retrieve the selected text from clipboard and verify it is as expected. |
4580 base::string16 result_text; | 4580 base::string16 result_text; |
4581 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); | 4581 clipboard->ReadText(ui::CLIPBOARD_TYPE_SELECTION, &result_text); |
4582 EXPECT_EQ(expected_text, result_text); | 4582 EXPECT_EQ(expected_text, result_text); |
4583 } | 4583 } |
4584 } | 4584 } |
4585 #endif | 4585 #endif |
4586 | 4586 |
4587 } // namespace content | 4587 } // namespace content |
OLD | NEW |