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

Unified Diff: cc/trees/layer_tree_host_unittest_context.cc

Issue 2158973002: cc: Clean up LayerTreeTest and TestHooks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: proxy-impls: android-build Created 4 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/trees/layer_tree_host_unittest_context.cc
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index e8032d315a5be44391092790d45d0f988cc40eae..7e0a729119c0d347f5f0f2a6d7e2b9a960f85f95 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -1569,13 +1569,16 @@ class LayerTreeHostContextTestLoseAfterSendingBeginMainFrame
PostSetNeedsCommitToMainThread();
}
- void ScheduledActionWillSendBeginMainFrame() override {
+ void WillBeginMainFrame() override {
+ // Don't begin a frame with a lost surface.
+ EXPECT_FALSE(layer_tree_host()->output_surface_lost());
+
if (deferred_)
return;
deferred_ = true;
- // Defer commits before the BeginFrame arrives, causing it to be delayed.
- PostSetDeferCommitsToMainThread(true);
+ // Defer commits before the BeginFrame completes, causing it to be delayed.
+ layer_tree_host()->SetDeferCommits(true);
// Meanwhile, lose the context while we are in defer commits.
ImplThreadTaskRunner()->PostTask(
FROM_HERE,
@@ -1591,11 +1594,6 @@ class LayerTreeHostContextTestLoseAfterSendingBeginMainFrame
PostSetDeferCommitsToMainThread(false);
}
- void WillBeginMainFrame() override {
- // Don't begin a frame with a lost surface.
- EXPECT_FALSE(layer_tree_host()->output_surface_lost());
- }
-
void DidCommitAndDrawFrame() override { EndTest(); }
void AfterTest() override {}

Powered by Google App Engine
This is Rietveld 408576698