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

Unified Diff: cc/scheduler/scheduler_unittest.cc

Issue 19106007: cc: Allow the main thread to cancel commits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix scheduler tests Created 7 years, 5 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 2824510a8685da3910430e261d39c022022e53c0..4a3fd4faf7f74db260d0199222e9a07f5253b496 100644
--- a/cc/scheduler/scheduler_unittest.cc
+++ b/cc/scheduler/scheduler_unittest.cc
@@ -378,11 +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);
+ scheduler->BeginFrame(BeginFrameArgs::CreateForTesting());
danakj 2013/07/17 20:53:24 I'm having trouble convincing myself that we will
enne (OOO) 2013/07/18 17:36:37 Different begin frames. SetNeedsBeginFrameOnImplT
+ EXPECT_ACTION("ScheduledActionSendBeginFrameToMainThread", client, 0, 2);
+ EXPECT_ACTION("SetNeedsBeginFrameOnImplThread", client, 1, 2);
client.Reset();
}

Powered by Google App Engine
This is Rietveld 408576698