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

Unified Diff: cc/resources/resource_update_controller_unittest.cc

Issue 190543012: cc: Don't call ReadyToFinalizeTextureUpdates multiple times (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 9 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
« no previous file with comments | « cc/resources/resource_update_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_update_controller_unittest.cc
diff --git a/cc/resources/resource_update_controller_unittest.cc b/cc/resources/resource_update_controller_unittest.cc
index 53bf9a2b5e9172b0753dd4d00420d516153b68a9..69e4b8bd6ac96e05d8f027e9dfc60c5abc844995 100644
--- a/cc/resources/resource_update_controller_unittest.cc
+++ b/cc/resources/resource_update_controller_unittest.cc
@@ -455,15 +455,16 @@ TEST_F(ResourceUpdateControllerTest, NoMoreUpdates) {
EXPECT_TRUE(client.ReadyToFinalizeCalled());
EXPECT_EQ(2, num_total_uploads_);
+ client.Reset();
controller->SetUpdateTextureTime(base::TimeDelta::FromMilliseconds(100));
controller->SetUpdateMoreTexturesSize(1);
// Enough time for updates but no more updates left.
controller->PerformMoreUpdates(controller->Now() +
base::TimeDelta::FromMilliseconds(310));
- // 0-delay task used to call ReadyToFinalizeTextureUpdates().
- RunPendingTask(task_runner.get(), controller.get());
+
+ // ReadyToFinalizeTextureUpdates should only be called once.
EXPECT_FALSE(task_runner->HasPendingTask());
- EXPECT_TRUE(client.ReadyToFinalizeCalled());
+ EXPECT_FALSE(client.ReadyToFinalizeCalled());
EXPECT_EQ(2, num_total_uploads_);
}
« no previous file with comments | « cc/resources/resource_update_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698