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

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

Issue 2408333004: Move persistent gesture state to Document, add DocumentUserGestureToken (Closed)
Patch Set: Re-add dropped null check Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/tests/WebUserGestureTokenTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebUserGestureTokenTest.cpp b/third_party/WebKit/Source/web/tests/WebUserGestureTokenTest.cpp
index 0095ec9eb15182e0b6f03a0a20f5d62d02b0ee22..9a67b40a0fc947b05b9ebfcc12bb867ed86abb9b 100644
--- a/third_party/WebKit/Source/web/tests/WebUserGestureTokenTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebUserGestureTokenTest.cpp
@@ -30,6 +30,7 @@
#include "public/web/WebUserGestureToken.h"
+#include "core/dom/DocumentUserGestureToken.h"
#include "platform/UserGestureIndicator.h"
#include "public/web/WebScopedUserGesture.h"
#include "public/web/WebUserGestureIndicator.h"
@@ -40,8 +41,6 @@ namespace blink {
TEST(WebUserGestureTokenTest, Basic) {
WebUserGestureToken token;
EXPECT_FALSE(token.hasGestures());
- UserGestureIndicator::clearProcessedUserGestureSinceLoad();
- EXPECT_FALSE(UserGestureIndicator::processedUserGestureSinceLoad());
{
WebScopedUserGesture indicator(token);
@@ -49,11 +48,10 @@ TEST(WebUserGestureTokenTest, Basic) {
}
{
- UserGestureIndicator indicator(
- UserGestureToken::create(UserGestureToken::NewGesture));
+ UserGestureIndicator indicator(DocumentUserGestureToken::create(
+ nullptr, UserGestureToken::NewGesture));
EXPECT_TRUE(WebUserGestureIndicator::isProcessingUserGesture());
token = WebUserGestureIndicator::currentUserGestureToken();
- EXPECT_TRUE(UserGestureIndicator::processedUserGestureSinceLoad());
}
EXPECT_TRUE(token.hasGestures());
@@ -72,8 +70,6 @@ TEST(WebUserGestureTokenTest, Basic) {
WebScopedUserGesture indicator(token);
EXPECT_FALSE(WebUserGestureIndicator::isProcessingUserGesture());
}
-
- EXPECT_TRUE(UserGestureIndicator::processedUserGestureSinceLoad());
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebFrameTest.cpp ('k') | third_party/WebKit/public/web/WebScopedUserGesture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698