OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/test_runner/event_sender.h" | 5 #include "components/test_runner/event_sender.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 int click_count, | 86 int click_count, |
87 int modifiers, | 87 int modifiers, |
88 WebMouseEvent* e) { | 88 WebMouseEvent* e) { |
89 e->type = t; | 89 e->type = t; |
90 e->button = b; | 90 e->button = b; |
91 e->modifiers = modifiers | GetWebMouseEventModifierForButton(b); | 91 e->modifiers = modifiers | GetWebMouseEventModifierForButton(b); |
92 e->x = pos.x; | 92 e->x = pos.x; |
93 e->y = pos.y; | 93 e->y = pos.y; |
94 e->globalX = pos.x; | 94 e->globalX = pos.x; |
95 e->globalY = pos.y; | 95 e->globalY = pos.y; |
| 96 e->pointerType = blink::WebPointerProperties::PointerType::Mouse; |
96 e->timeStampSeconds = time_stamp; | 97 e->timeStampSeconds = time_stamp; |
97 e->clickCount = click_count; | 98 e->clickCount = click_count; |
98 } | 99 } |
99 | 100 |
100 int GetKeyModifier(const std::string& modifier_name) { | 101 int GetKeyModifier(const std::string& modifier_name) { |
101 const char* characters = modifier_name.c_str(); | 102 const char* characters = modifier_name.c_str(); |
102 if (!strcmp(characters, "ctrlKey") | 103 if (!strcmp(characters, "ctrlKey") |
103 #ifndef __APPLE__ | 104 #ifndef __APPLE__ |
104 || !strcmp(characters, "addSelectionKey") | 105 || !strcmp(characters, "addSelectionKey") |
105 #endif | 106 #endif |
(...skipping 2447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2553 last_event_timestamp_ = event.timeStampSeconds; | 2554 last_event_timestamp_ = event.timeStampSeconds; |
2554 | 2555 |
2555 if (WebPagePopup* popup = view_->pagePopup()) { | 2556 if (WebPagePopup* popup = view_->pagePopup()) { |
2556 if (!WebInputEvent::isKeyboardEventType(event.type)) | 2557 if (!WebInputEvent::isKeyboardEventType(event.type)) |
2557 return popup->handleInputEvent(event); | 2558 return popup->handleInputEvent(event); |
2558 } | 2559 } |
2559 return view_->handleInputEvent(event); | 2560 return view_->handleInputEvent(event); |
2560 } | 2561 } |
2561 | 2562 |
2562 } // namespace test_runner | 2563 } // namespace test_runner |
OLD | NEW |