| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 webView->resize(WebSize(300, 300)); | 348 webView->resize(WebSize(300, 300)); |
| 349 webView->layout(); | 349 webView->layout(); |
| 350 runPendingTasks(); | 350 runPendingTasks(); |
| 351 | 351 |
| 352 WebElement pluginContainerOneElement = webView->mainFrame()->document().getE
lementById(WebString::fromUTF8("translated-plugin")); | 352 WebElement pluginContainerOneElement = webView->mainFrame()->document().getE
lementById(WebString::fromUTF8("translated-plugin")); |
| 353 WebPlugin* plugin = static_cast<WebPluginContainerImpl*>(pluginContainerOneE
lement.pluginContainer())->plugin(); | 353 WebPlugin* plugin = static_cast<WebPluginContainerImpl*>(pluginContainerOneE
lement.pluginContainer())->plugin(); |
| 354 EventTestPlugin* testPlugin = static_cast<EventTestPlugin*>(plugin); | 354 EventTestPlugin* testPlugin = static_cast<EventTestPlugin*>(plugin); |
| 355 | 355 |
| 356 WebGestureEvent event; | 356 WebGestureEvent event; |
| 357 event.type = WebInputEvent::GestureLongPress; | 357 event.type = WebInputEvent::GestureLongPress; |
| 358 event.sourceDevice = WebGestureDeviceTouchscreen; |
| 358 | 359 |
| 359 // First, send an event that doesn't hit the plugin to verify that the | 360 // First, send an event that doesn't hit the plugin to verify that the |
| 360 // plugin doesn't receive it. | 361 // plugin doesn't receive it. |
| 361 event.x = 0; | 362 event.x = 0; |
| 362 event.y = 0; | 363 event.y = 0; |
| 363 | 364 |
| 364 webView->handleInputEvent(event); | 365 webView->handleInputEvent(event); |
| 365 runPendingTasks(); | 366 runPendingTasks(); |
| 366 | 367 |
| 367 EXPECT_EQ(WebInputEvent::Undefined, testPlugin->getLastInputEventType()); | 368 EXPECT_EQ(WebInputEvent::Undefined, testPlugin->getLastInputEventType()); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 TopmostPlugin* testPlugin = static_cast<TopmostPlugin*>(pluginContainerImpl-
>plugin()); | 453 TopmostPlugin* testPlugin = static_cast<TopmostPlugin*>(pluginContainerImpl-
>plugin()); |
| 453 EXPECT_TRUE(testPlugin->isRectTopmost()); | 454 EXPECT_TRUE(testPlugin->isRectTopmost()); |
| 454 | 455 |
| 455 // Cause the plugin's frame to be detached. | 456 // Cause the plugin's frame to be detached. |
| 456 webViewHelper.reset(); | 457 webViewHelper.reset(); |
| 457 | 458 |
| 458 EXPECT_FALSE(pluginContainerImpl->isRectTopmost(topmostRect)); | 459 EXPECT_FALSE(pluginContainerImpl->isRectTopmost(topmostRect)); |
| 459 } | 460 } |
| 460 | 461 |
| 461 } // namespace blink | 462 } // namespace blink |
| OLD | NEW |