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

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: Address danakj's review comments 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..b014a673e457e860ba4c4fc4e29d0b9a54cd67d4 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 {

Powered by Google App Engine
This is Rietveld 408576698