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

Unified Diff: cc/scheduler/scheduler_unittest.cc

Issue 655783002: Attempt to fix flaky ChromeOS test timeouts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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: cc/scheduler/scheduler_unittest.cc
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc
index 9c459b5b0be6286cc7dc4fe017aaf08f32e5a7b2..add50ca6b0ffe013d3ab31c0cd41328bb331d902 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -1331,12 +1331,11 @@ TEST(SchedulerTest, BeginRetroFrame_SwapThrottled) {
EXPECT_TRUE(client.needs_begin_frames());
client.Reset();
- // While swap throttled, BeginRetroFrames should trigger BeginImplFrames and
- // BeginMainFrame, but not draw.
+ // While swap throttled, BeginRetroFrames should trigger BeginImplFrames
+ // but not a BeginMainFrame or draw.
scheduler->SetNeedsCommit();
client.task_runner().RunPendingTasks(); // Run posted BeginRetroFrame.
- EXPECT_ACTION("WillBeginImplFrame", client, 0, 2);
- EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client, 1, 2);
+ EXPECT_ACTION("WillBeginImplFrame", client, 0, 1);
EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
EXPECT_TRUE(client.needs_begin_frames());
client.Reset();
@@ -1351,7 +1350,7 @@ TEST(SchedulerTest, BeginRetroFrame_SwapThrottled) {
// Take us out of a swap throttled state.
scheduler->DidSwapBuffersComplete();
- EXPECT_EQ(0, client.num_actions_());
+ EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client, 0, 1);
EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
EXPECT_TRUE(client.needs_begin_frames());
client.Reset();
@@ -1511,19 +1510,18 @@ void BeginFramesNotFromClient_SwapThrottled(bool begin_frame_scheduling_enabled,
EXPECT_FALSE(client.needs_begin_frames());
client.Reset();
- // While swap throttled, BeginFrames should trigger BeginImplFrames and
- // BeginMainFrame, but not draw.
+ // While swap throttled, BeginFrames should trigger BeginImplFrames,
+ // but not a BeginMainFrame or draw.
scheduler->SetNeedsCommit();
client.task_runner().RunPendingTasks(); // Run posted BeginFrame.
- EXPECT_ACTION("WillBeginImplFrame", client, 0, 2);
- EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client, 1, 2);
+ EXPECT_ACTION("WillBeginImplFrame", client, 0, 1);
EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
EXPECT_FALSE(client.needs_begin_frames());
client.Reset();
// Take us out of a swap throttled state.
scheduler->DidSwapBuffersComplete();
- EXPECT_EQ(0, client.num_actions_());
+ EXPECT_ACTION("ScheduledActionSendBeginMainFrame", client, 0, 1);
EXPECT_TRUE(scheduler->BeginImplFrameDeadlinePending());
EXPECT_FALSE(client.needs_begin_frames());
client.Reset();

Powered by Google App Engine
This is Rietveld 408576698