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

Unified Diff: Source/web/tests/LinkHighlightTest.cpp

Issue 15663005: Expand tap highlight to allow multiple highlights for touch disambiguation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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
« Source/web/WebViewImpl.h ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/LinkHighlightTest.cpp
diff --git a/Source/web/tests/LinkHighlightTest.cpp b/Source/web/tests/LinkHighlightTest.cpp
index 4fcf06d73b72db25fba34cbeca9beb9c0b4f6ccf..e1dfb33dc621044508b7904e4fb524a13e00cf56 100644
--- a/Source/web/tests/LinkHighlightTest.cpp
+++ b/Source/web/tests/LinkHighlightTest.cpp
@@ -89,37 +89,37 @@ TEST(LinkHighlightTest, verifyWebViewImplIntegration)
{
PlatformGestureEventBuilder platformEvent(webViewImpl->mainFrameImpl()->frameView(), touchEvent);
- webViewImpl->enableTapHighlight(platformEvent);
+ webViewImpl->enableTapHighlightAtPoint(platformEvent);
}
- EXPECT_TRUE(webViewImpl->linkHighlight());
- EXPECT_TRUE(webViewImpl->linkHighlight()->contentLayer());
- EXPECT_TRUE(webViewImpl->linkHighlight()->clipLayer());
+ EXPECT_TRUE(webViewImpl->linkHighlight(0));
+ EXPECT_TRUE(webViewImpl->linkHighlight(0)->contentLayer());
+ EXPECT_TRUE(webViewImpl->linkHighlight(0)->clipLayer());
// Find a target inside a scrollable div
touchEvent.y = 100;
{
PlatformGestureEventBuilder platformEvent(webViewImpl->mainFrameImpl()->frameView(), touchEvent);
- webViewImpl->enableTapHighlight(platformEvent);
+ webViewImpl->enableTapHighlightAtPoint(platformEvent);
}
- ASSERT_TRUE(webViewImpl->linkHighlight());
+ ASSERT_TRUE(webViewImpl->linkHighlight(0));
// Don't highlight if no "hand cursor"
touchEvent.y = 220; // An A-link with cross-hair cursor.
{
PlatformGestureEventBuilder platformEvent(webViewImpl->mainFrameImpl()->frameView(), touchEvent);
- webViewImpl->enableTapHighlight(platformEvent);
+ webViewImpl->enableTapHighlightAtPoint(platformEvent);
}
- ASSERT_FALSE(webViewImpl->linkHighlight());
+ ASSERT_FALSE(webViewImpl->linkHighlight(0));
touchEvent.y = 260; // A text input box.
{
PlatformGestureEventBuilder platformEvent(webViewImpl->mainFrameImpl()->frameView(), touchEvent);
- webViewImpl->enableTapHighlight(platformEvent);
+ webViewImpl->enableTapHighlightAtPoint(platformEvent);
}
- ASSERT_FALSE(webViewImpl->linkHighlight());
+ ASSERT_FALSE(webViewImpl->linkHighlight(0));
webViewImpl->close();
Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
@@ -180,16 +180,16 @@ TEST(LinkHighlightTest, resetDuringNodeRemoval)
Node* touchNode = webViewImpl->bestTapNode(platformEvent);
ASSERT_TRUE(touchNode);
- webViewImpl->enableTapHighlight(platformEvent);
- ASSERT_TRUE(webViewImpl->linkHighlight());
+ webViewImpl->enableTapHighlightAtPoint(platformEvent);
+ ASSERT_TRUE(webViewImpl->linkHighlight(0));
- GraphicsLayer* highlightLayer = webViewImpl->linkHighlight()->currentGraphicsLayerForTesting();
+ GraphicsLayer* highlightLayer = webViewImpl->linkHighlight(0)->currentGraphicsLayerForTesting();
ASSERT_TRUE(highlightLayer);
- EXPECT_TRUE(highlightLayer->linkHighlight());
+ EXPECT_TRUE(highlightLayer->linkHighlight(0));
touchNode->remove(IGNORE_EXCEPTION);
webViewImpl->layout();
- EXPECT_FALSE(highlightLayer->linkHighlight());
+ EXPECT_FALSE(highlightLayer->linkHighlight(0));
webViewImpl->close();
Platform::current()->unitTestSupport()->unregisterAllMockedURLs();
« Source/web/WebViewImpl.h ('K') | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698