| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 | 447 |
| 448 // A class to facilitate testing that events are correctly received by plugins. | 448 // A class to facilitate testing that events are correctly received by plugins. |
| 449 class EventTestPlugin : public FakeWebPlugin { | 449 class EventTestPlugin : public FakeWebPlugin { |
| 450 public: | 450 public: |
| 451 EventTestPlugin(WebFrame* frame, const WebPluginParams& params) | 451 EventTestPlugin(WebFrame* frame, const WebPluginParams& params) |
| 452 : FakeWebPlugin(frame, params), | 452 : FakeWebPlugin(frame, params), |
| 453 m_lastEventType(WebInputEvent::Undefined) {} | 453 m_lastEventType(WebInputEvent::Undefined) {} |
| 454 | 454 |
| 455 WebInputEventResult handleInputEvent(const WebInputEvent& event, | 455 WebInputEventResult handleInputEvent(const WebInputEvent& event, |
| 456 WebCursorInfo&) override { | 456 WebCursorInfo&) override { |
| 457 m_lastEventType = event.type; | 457 m_lastEventType = event.type(); |
| 458 return WebInputEventResult::HandledSystem; | 458 return WebInputEventResult::HandledSystem; |
| 459 } | 459 } |
| 460 WebInputEvent::Type getLastInputEventType() { return m_lastEventType; } | 460 WebInputEvent::Type getLastInputEventType() { return m_lastEventType; } |
| 461 | 461 |
| 462 private: | 462 private: |
| 463 WebInputEvent::Type m_lastEventType; | 463 WebInputEvent::Type m_lastEventType; |
| 464 }; | 464 }; |
| 465 | 465 |
| 466 TEST_F(WebPluginContainerTest, GestureLongPressReachesPlugin) { | 466 TEST_F(WebPluginContainerTest, GestureLongPressReachesPlugin) { |
| 467 URLTestHelpers::registerMockedURLFromBaseURL( | 467 URLTestHelpers::registerMockedURLFromBaseURL( |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 WebString::fromUTF8("translated-plugin")); | 773 WebString::fromUTF8("translated-plugin")); |
| 774 pluginContainerOneElement.pluginContainer()->setWantsWheelEvents(true); | 774 pluginContainerOneElement.pluginContainer()->setWantsWheelEvents(true); |
| 775 | 775 |
| 776 runPendingTasks(); | 776 runPendingTasks(); |
| 777 EXPECT_TRUE( | 777 EXPECT_TRUE( |
| 778 webView->page()->frameHost().eventHandlerRegistry().hasEventHandlers( | 778 webView->page()->frameHost().eventHandlerRegistry().hasEventHandlers( |
| 779 EventHandlerRegistry::WheelEventBlocking)); | 779 EventHandlerRegistry::WheelEventBlocking)); |
| 780 } | 780 } |
| 781 | 781 |
| 782 } // namespace blink | 782 } // namespace blink |
| OLD | NEW |