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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp

Issue 1403893003: Plumb gesture source value through Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make compilers happy. Created 5 years, 2 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 /* 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 webView->resize(WebSize(300, 300)); 332 webView->resize(WebSize(300, 300));
333 webView->layout(); 333 webView->layout();
334 runPendingTasks(); 334 runPendingTasks();
335 335
336 WebElement pluginContainerOneElement = webView->mainFrame()->document().getE lementById(WebString::fromUTF8("translated-plugin")); 336 WebElement pluginContainerOneElement = webView->mainFrame()->document().getE lementById(WebString::fromUTF8("translated-plugin"));
337 WebPlugin* plugin = static_cast<WebPluginContainerImpl*>(pluginContainerOneE lement.pluginContainer())->plugin(); 337 WebPlugin* plugin = static_cast<WebPluginContainerImpl*>(pluginContainerOneE lement.pluginContainer())->plugin();
338 EventTestPlugin* testPlugin = static_cast<EventTestPlugin*>(plugin); 338 EventTestPlugin* testPlugin = static_cast<EventTestPlugin*>(plugin);
339 339
340 WebGestureEvent event; 340 WebGestureEvent event;
341 event.type = WebInputEvent::GestureLongPress; 341 event.type = WebInputEvent::GestureLongPress;
342 event.sourceDevice = WebGestureDeviceTouchpad;
tdresser 2015/10/19 12:52:39 touchscreen
wjmaclean 2015/10/19 15:26:55 Done.
342 343
343 // First, send an event that doesn't hit the plugin to verify that the 344 // First, send an event that doesn't hit the plugin to verify that the
344 // plugin doesn't receive it. 345 // plugin doesn't receive it.
345 event.x = 0; 346 event.x = 0;
346 event.y = 0; 347 event.y = 0;
347 348
348 webView->handleInputEvent(event); 349 webView->handleInputEvent(event);
349 runPendingTasks(); 350 runPendingTasks();
350 351
351 EXPECT_EQ(WebInputEvent::Undefined, testPlugin->getLastInputEventType()); 352 EXPECT_EQ(WebInputEvent::Undefined, testPlugin->getLastInputEventType());
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 TopmostPlugin* testPlugin = static_cast<TopmostPlugin*>(pluginContainerImpl- >plugin()); 437 TopmostPlugin* testPlugin = static_cast<TopmostPlugin*>(pluginContainerImpl- >plugin());
437 EXPECT_TRUE(testPlugin->isRectTopmost()); 438 EXPECT_TRUE(testPlugin->isRectTopmost());
438 439
439 // Cause the plugin's frame to be detached. 440 // Cause the plugin's frame to be detached.
440 webViewHelper.reset(); 441 webViewHelper.reset();
441 442
442 EXPECT_FALSE(pluginContainerImpl->isRectTopmost(topmostRect)); 443 EXPECT_FALSE(pluginContainerImpl->isRectTopmost(topmostRect));
443 } 444 }
444 445
445 } // namespace blink 446 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698