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

Unified Diff: Source/WebKit/chromium/tests/LinkHighlightTest.cpp

Issue 12315056: Merge 142913 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/tests/LinkHighlightTest.cpp
===================================================================
--- Source/WebKit/chromium/tests/LinkHighlightTest.cpp (revision 143774)
+++ Source/WebKit/chromium/tests/LinkHighlightTest.cpp (working copy)
@@ -27,12 +27,15 @@
#include "LinkHighlight.h"
#include "FrameTestHelpers.h"
+#include "FrameView.h"
#include "IntRect.h"
#include "Node.h"
#include "URLTestHelpers.h"
#include "WebCompositorInitializer.h"
#include "WebFrame.h"
+#include "WebFrameImpl.h"
#include "WebInputEvent.h"
+#include "WebInputEventConversion.h"
#include "WebViewImpl.h"
#include <gtest/gtest.h>
#include <public/WebContentLayer.h>
@@ -66,16 +69,27 @@
// The coordinates below are linked to absolute positions in the referenced .html file.
touchEvent.x = 20;
touchEvent.y = 20;
- Node* touchNode = webViewImpl->bestTouchLinkNode(touchEvent);
- ASSERT_TRUE(touchNode);
+ {
+ PlatformGestureEventBuilder platformEvent(webViewImpl->mainFrameImpl()->frameView(), touchEvent);
+ Node* touchNode = webViewImpl->bestTapNode(platformEvent);
+ ASSERT_TRUE(touchNode);
+ }
+
touchEvent.y = 40;
- EXPECT_FALSE(webViewImpl->bestTouchLinkNode(touchEvent));
+ {
+ PlatformGestureEventBuilder platformEvent(webViewImpl->mainFrameImpl()->frameView(), touchEvent);
+ EXPECT_FALSE(webViewImpl->bestTapNode(platformEvent));
+ }
touchEvent.y = 20;
// Shouldn't crash.
- webViewImpl->enableTouchHighlight(touchEvent);
+ {
+ PlatformGestureEventBuilder platformEvent(webViewImpl->mainFrameImpl()->frameView(), touchEvent);
+ webViewImpl->enableTapHighlight(platformEvent);
+ }
+
EXPECT_TRUE(webViewImpl->linkHighlight());
EXPECT_TRUE(webViewImpl->linkHighlight()->contentLayer());
EXPECT_TRUE(webViewImpl->linkHighlight()->clipLayer());
@@ -83,16 +97,26 @@
// Find a target inside a scrollable div
touchEvent.y = 100;
- webViewImpl->enableTouchHighlight(touchEvent);
+ {
+ PlatformGestureEventBuilder platformEvent(webViewImpl->mainFrameImpl()->frameView(), touchEvent);
+ webViewImpl->enableTapHighlight(platformEvent);
+ }
+
ASSERT_TRUE(webViewImpl->linkHighlight());
// Don't highlight if no "hand cursor"
touchEvent.y = 220; // An A-link with cross-hair cursor.
- webViewImpl->enableTouchHighlight(touchEvent);
+ {
+ PlatformGestureEventBuilder platformEvent(webViewImpl->mainFrameImpl()->frameView(), touchEvent);
+ webViewImpl->enableTapHighlight(platformEvent);
+ }
ASSERT_FALSE(webViewImpl->linkHighlight());
touchEvent.y = 260; // A text input box.
- webViewImpl->enableTouchHighlight(touchEvent);
+ {
+ PlatformGestureEventBuilder platformEvent(webViewImpl->mainFrameImpl()->frameView(), touchEvent);
+ webViewImpl->enableTapHighlight(platformEvent);
+ }
ASSERT_FALSE(webViewImpl->linkHighlight());
webViewImpl->close();
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698