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

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

Powered by Google App Engine
This is Rietveld 408576698