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 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1750 } | 1750 } |
1751 | 1751 |
1752 double radius_y = radius_x; | 1752 double radius_y = radius_x; |
1753 if (!args->PeekNext().IsEmpty()) { | 1753 if (!args->PeekNext().IsEmpty()) { |
1754 if (!args->GetNext(&radius_y)) { | 1754 if (!args->GetNext(&radius_y)) { |
1755 args->ThrowError(); | 1755 args->ThrowError(); |
1756 return; | 1756 return; |
1757 } | 1757 } |
1758 } | 1758 } |
1759 | 1759 |
1760 touch_point.radiusX = static_cast<float>(radius_x); | 1760 touch_point.width = static_cast<float>(radius_x); |
1761 touch_point.radiusY = static_cast<float>(radius_y); | 1761 touch_point.height = static_cast<float>(radius_y); |
1762 } | 1762 } |
1763 | 1763 |
1764 int lowest_id = 0; | 1764 int lowest_id = 0; |
1765 for (size_t i = 0; i < touch_points_.size(); i++) { | 1765 for (size_t i = 0; i < touch_points_.size(); i++) { |
1766 if (touch_points_[i].id == lowest_id) | 1766 if (touch_points_[i].pointerId == lowest_id) |
1767 lowest_id++; | 1767 lowest_id++; |
1768 } | 1768 } |
1769 touch_point.id = lowest_id; | 1769 touch_point.pointerId = lowest_id; |
1770 touch_points_.push_back(touch_point); | 1770 touch_points_.push_back(touch_point); |
1771 } | 1771 } |
1772 | 1772 |
1773 void EventSender::MouseDragBegin() { | 1773 void EventSender::MouseDragBegin() { |
1774 WebMouseWheelEvent event; | 1774 WebMouseWheelEvent event; |
1775 InitMouseEvent(WebInputEvent::MouseWheel, | 1775 InitMouseEvent(WebInputEvent::MouseWheel, |
1776 WebMouseEvent::ButtonNone, | 1776 WebMouseEvent::ButtonNone, |
1777 last_mouse_pos_, | 1777 last_mouse_pos_, |
1778 GetCurrentEventTimeSec(), | 1778 GetCurrentEventTimeSec(), |
1779 click_count_, | 1779 click_count_, |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2481 | 2481 |
2482 bool EventSender::HandleInputEventOnViewOrPopup(const WebInputEvent& event) { | 2482 bool EventSender::HandleInputEventOnViewOrPopup(const WebInputEvent& event) { |
2483 if (WebPagePopup* popup = view_->pagePopup()) { | 2483 if (WebPagePopup* popup = view_->pagePopup()) { |
2484 if (!WebInputEvent::isKeyboardEventType(event.type)) | 2484 if (!WebInputEvent::isKeyboardEventType(event.type)) |
2485 return popup->handleInputEvent(event); | 2485 return popup->handleInputEvent(event); |
2486 } | 2486 } |
2487 return view_->handleInputEvent(event); | 2487 return view_->handleInputEvent(event); |
2488 } | 2488 } |
2489 | 2489 |
2490 } // namespace test_runner | 2490 } // namespace test_runner |
OLD | NEW |