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

Unified Diff: cc/scheduler/scheduler_state_machine_unittest.cc

Issue 1432463002: cc: Track BeginMainFrame more precisely in CompositorTimingHistory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests. New tests to be added. Created 5 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
Index: cc/scheduler/scheduler_state_machine_unittest.cc
diff --git a/cc/scheduler/scheduler_state_machine_unittest.cc b/cc/scheduler/scheduler_state_machine_unittest.cc
index 20e8188584d84c37ca4d2cac3b0c50d98c140ea7..fcd4516594cec97fe1f4ad0716bfc5b6150926f4 100644
--- a/cc/scheduler/scheduler_state_machine_unittest.cc
+++ b/cc/scheduler/scheduler_state_machine_unittest.cc
@@ -1233,6 +1233,7 @@ TEST(SchedulerStateMachineTest, TestAbortBeginMainFrameBecauseInvisible) {
// Become invisible and abort BeginMainFrame.
state.SetVisible(false);
+ state.NotifyBeginMainFrameStarted();
state.BeginMainFrameAborted(CommitEarlyOutReason::ABORTED_NOT_VISIBLE);
// NeedsCommit should now be true again because we never actually did a
@@ -1288,6 +1289,7 @@ TEST(SchedulerStateMachineTest, TestAbortBeginMainFrameBecauseCommitNotNeeded) {
// Abort the commit, true means that the BeginMainFrame was sent but there
// was no work to do on the main thread.
+ state.NotifyBeginMainFrameStarted();
state.BeginMainFrameAborted(CommitEarlyOutReason::FINISHED_NO_UPDATES);
// NeedsCommit should now be false because the commit was actually handled.
@@ -1849,6 +1851,7 @@ TEST(SchedulerStateMachineTest,
// Since only the scroll offset changed, the main thread will abort the
// commit.
+ state.NotifyBeginMainFrameStarted();
state.BeginMainFrameAborted(CommitEarlyOutReason::FINISHED_NO_UPDATES);
// Since the commit was aborted, we should draw right away instead of waiting

Powered by Google App Engine
This is Rietveld 408576698