Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 2227563003: Refactoring button field and its type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac/win errors Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698