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

Unified Diff: cc/scheduler/scheduler_unittest.cc

Issue 798323003: cc: Only send a BeginMainFrame inside an BeginImplFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing for rename. Created 6 years 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 | « cc/scheduler/scheduler_state_machine_unittest.cc ('k') | cc/test/fake_external_begin_frame_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/scheduler_unittest.cc
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc
index 7f8d8908c8a74dff95498315592a3773050dcdc7..80d54d2306d093771f092d799be69feeb543c953 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -192,16 +192,20 @@ class FakeSchedulerClient : public SchedulerClient {
EXPECT_SINGLE_ACTION("ScheduledActionBeginOutputSurfaceCreation", (*this));
Reset();
- // Finish the initial output surface creation and run the first commit.
+ // We don't see anything happening until the first impl frame.
scheduler->DidCreateAndInitializeOutputSurface();
scheduler->SetNeedsCommit();
- scheduler->NotifyBeginMainFrameStarted();
- scheduler->NotifyReadyToCommitThenActivateIfNeeded();
+ EXPECT_TRUE(needs_begin_frames());
+ EXPECT_FALSE(scheduler->BeginImplFrameDeadlinePending());
+ Reset();
{
- SCOPED_TRACE("Go through the motions to draw the commit");
+ SCOPED_TRACE("Do first frame to commit after initialize.");
AdvanceFrame();
+ scheduler->NotifyBeginMainFrameStarted();
+ scheduler->NotifyReadyToCommitThenActivateIfNeeded();
+
// Run the posted deadline task.
EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
task_runner().RunTasksWhile(ImplFrameDeadlinePending(true));
« no previous file with comments | « cc/scheduler/scheduler_state_machine_unittest.cc ('k') | cc/test/fake_external_begin_frame_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698