Index: cc/scheduler/scheduler_unittest.cc |
diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc |
index 0a3c250d335047c6c8a8a3d5365e741096b70f1d..930111c1b2a7fd1c104bd48108b6a7e7f6b06a4f 100644 |
--- a/cc/scheduler/scheduler_unittest.cc |
+++ b/cc/scheduler/scheduler_unittest.cc |
@@ -378,12 +378,17 @@ TEST(SchedulerTest, VisibilitySwitchWithTextureAcquisition) { |
client); |
client.Reset(); |
+ // Already sent a begin frame on this current frame, so wait. |
+ scheduler->SetVisible(true); |
+ EXPECT_EQ(0, client.num_actions_()); |
+ client.Reset(); |
+ |
// Regaining visibility with textures acquired by main thread while |
// compositor is waiting for first draw should result in a request |
// for a new frame in order to escape a deadlock. |
- scheduler->SetVisible(true); |
- EXPECT_SINGLE_ACTION("ScheduledActionSendBeginFrameToMainThread", client); |
- client.Reset(); |
+ scheduler->BeginFrame(BeginFrameArgs::CreateForTesting()); |
+ EXPECT_ACTION("ScheduledActionSendBeginFrameToMainThread", client, 0, 2); |
+ EXPECT_ACTION("SetNeedsBeginFrameOnImplThread", client, 1, 2); |
} |
class SchedulerClientThatsetNeedsDrawInsideDraw : public FakeSchedulerClient { |