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

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

Issue 239963005: Fixes in UserGestureIndicator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed, tests fixed Created 6 years, 8 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/platform/UserGestureIndicator.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/WebUserGestureTokenTest.cpp
diff --git a/Source/web/tests/WebUserGestureTokenTest.cpp b/Source/web/tests/WebUserGestureTokenTest.cpp
index 0c39c39f1130759e29d2a3a4772e4a35a831a178..ba914a043998bc2f33813d91dcb758f04c9200a6 100644
--- a/Source/web/tests/WebUserGestureTokenTest.cpp
+++ b/Source/web/tests/WebUserGestureTokenTest.cpp
@@ -46,6 +46,8 @@ TEST(WebUserGestureTokenTest, Basic)
{
WebUserGestureToken token;
EXPECT_FALSE(token.hasGestures());
+ UserGestureIndicator::clearProcessedUserGestureInPast();
+ EXPECT_FALSE(UserGestureIndicator::processedUserGestureInPast());
{
WebScopedUserGesture indicator(token);
@@ -56,6 +58,7 @@ TEST(WebUserGestureTokenTest, Basic)
UserGestureIndicator indicator(DefinitelyProcessingNewUserGesture);
EXPECT_TRUE(WebUserGestureIndicator::isProcessingUserGesture());
token = WebUserGestureIndicator::currentUserGestureToken();
+ EXPECT_TRUE(UserGestureIndicator::processedUserGestureInPast());
}
EXPECT_TRUE(token.hasGestures());
@@ -74,6 +77,8 @@ TEST(WebUserGestureTokenTest, Basic)
WebScopedUserGesture indicator(token);
EXPECT_FALSE(WebUserGestureIndicator::isProcessingUserGesture());
}
+
+ EXPECT_TRUE(UserGestureIndicator::processedUserGestureInPast());
}
}
« no previous file with comments | « Source/platform/UserGestureIndicator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698