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

Unified Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

Issue 2649573003: Revert of Move compositor InputHandler from RenderViewImpl to RenderWidget. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/WebViewTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
index 2c0e54c3d9d12073a72cacf18ea3433c3c131fbf..5ceb8a0af3a7fcb129e091edcb8fa8c6dc1c0e98 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -3353,8 +3353,8 @@
m_webViewHelper.reset();
}
-class TouchEventHandlerWebWidgetClient
- : public FrameTestHelpers::TestWebWidgetClient {
+class TouchEventHandlerWebViewClient
+ : public FrameTestHelpers::TestWebViewClient {
public:
// WebWidgetClient methods
void hasTouchEventHandlers(bool state) override {
@@ -3362,7 +3362,7 @@
}
// Local methods
- TouchEventHandlerWebWidgetClient() : m_hasTouchEventHandlerCount() {}
+ TouchEventHandlerWebViewClient() : m_hasTouchEventHandlerCount() {}
int getAndResetHasTouchEventHandlerCallCount(bool state) {
int value = m_hasTouchEventHandlerCount[state];
@@ -3379,24 +3379,20 @@
// RemoveAll}EventHandler(..., TouchEvent). Verifying that those calls are made
// correctly is the job of LayoutTests/fast/events/event-handler-count.html.
TEST_P(WebViewTest, HasTouchEventHandlers) {
- TouchEventHandlerWebWidgetClient client;
- // We need to create a LayerTreeView for the client before loading the page,
- // otherwise ChromeClient will default to assuming there are touch handlers.
- WebLayerTreeView* layerTreeView = client.initializeLayerTreeView();
+ TouchEventHandlerWebViewClient client;
std::string url = m_baseURL + "has_touch_event_handlers.html";
URLTestHelpers::registerMockedURLLoad(toKURL(url),
"has_touch_event_handlers.html");
WebViewImpl* webViewImpl =
- m_webViewHelper.initializeAndLoad(url, true, 0, 0, &client);
- ASSERT_TRUE(layerTreeView);
+ m_webViewHelper.initializeAndLoad(url, true, 0, &client);
const EventHandlerRegistry::EventHandlerClass touchEvent =
EventHandlerRegistry::TouchStartOrMoveEventBlocking;
// The page is initialized with at least one no-handlers call.
// In practice we get two such calls because WebViewHelper::initializeAndLoad
- // first initializes an empty frame, and then loads a document into it, so
+ // first initializes and empty frame, and then loads a document into it, so
// there are two FrameLoader::commitProvisionalLoad calls.
- EXPECT_LT(0, client.getAndResetHasTouchEventHandlerCallCount(false));
+ EXPECT_GE(client.getAndResetHasTouchEventHandlerCallCount(false), 1);
EXPECT_EQ(0, client.getAndResetHasTouchEventHandlerCallCount(true));
// Adding the first document handler results in a has-handlers call.
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp ('k') | third_party/WebKit/public/platform/WebLayerTreeView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698