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

Unified Diff: third_party/WebKit/Source/platform/scheduler/renderer/user_model_unittest.cc

Issue 2476263002: scheduler: Reset pending input event count on navigation (Closed)
Patch Set: Formatting Created 4 years, 1 month 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 | « third_party/WebKit/Source/platform/scheduler/renderer/user_model.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scheduler/renderer/user_model_unittest.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/user_model_unittest.cc b/third_party/WebKit/Source/platform/scheduler/renderer/user_model_unittest.cc
index 695a19df332062806ab218e451c0d75708288245..52be407ce00fcc470fa3f6b0a54e3992c1330384 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/user_model_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/user_model_unittest.cc
@@ -252,5 +252,15 @@ TEST_F(UserModelTest, IsGestureExpectedToContinue_LongAfterGestureStarted) {
EXPECT_EQ(base::TimeDelta(), prediction_valid_duration);
}
+TEST_F(UserModelTest, ResetPendingInputCount) {
+ user_model_->DidStartProcessingInputEvent(
+ blink::WebInputEvent::Type::GestureScrollBegin, clock_->NowTicks());
+ EXPECT_EQ(priority_escalation_after_input_duration(),
+ user_model_->TimeLeftInUserGesture(clock_->NowTicks()));
+ user_model_->Reset(clock_->NowTicks());
+ EXPECT_EQ(base::TimeDelta(),
+ user_model_->TimeLeftInUserGesture(clock_->NowTicks()));
+}
+
} // namespace scheduler
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/renderer/user_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698