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

Unified Diff: cc/trees/layer_tree_impl_unittest.cc

Issue 2580493002: Splitting DidSwap in cc::SwapPromise into WillSwap and DidSwap (Closed)
Patch Set: x Created 4 years 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/trees/layer_tree_impl.cc ('k') | cc/trees/swap_promise_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl_unittest.cc
diff --git a/cc/trees/layer_tree_impl_unittest.cc b/cc/trees/layer_tree_impl_unittest.cc
index 213d9d2106f28857cd6deaa625dd05b3bfb44b19..2ea1edbaf1dd1cb40d74ea9a718d8f03c6d04fa5 100644
--- a/cc/trees/layer_tree_impl_unittest.cc
+++ b/cc/trees/layer_tree_impl_unittest.cc
@@ -2313,7 +2313,8 @@ class PersistentSwapPromise
~PersistentSwapPromise() override = default;
void DidActivate() override {}
- MOCK_METHOD1(DidSwap, void(CompositorFrameMetadata* metadata));
+ MOCK_METHOD1(WillSwap, void(CompositorFrameMetadata* metadata));
+ MOCK_METHOD0(DidSwap, void());
DidNotSwapAction DidNotSwap(DidNotSwapReason reason) override {
return DidNotSwapAction::KEEP_ACTIVE;
@@ -2331,7 +2332,8 @@ class NotPersistentSwapPromise
~NotPersistentSwapPromise() override = default;
void DidActivate() override {}
- void DidSwap(CompositorFrameMetadata* metadata) override {}
+ void WillSwap(CompositorFrameMetadata* metadata) override {}
+ void DidSwap() override {}
DidNotSwapAction DidNotSwap(DidNotSwapReason reason) override {
return DidNotSwapAction::BREAK_PROMISE;
@@ -2368,7 +2370,7 @@ TEST_F(LayerTreeImplTest, PersistentSwapPromisesAreKeptAlive) {
for (size_t i = 0; i < persistent_promises.size(); ++i) {
SCOPED_TRACE(testing::Message() << "While checking case #" << i);
ASSERT_TRUE(persistent_promises[i]);
- EXPECT_CALL(*persistent_promises[i], DidSwap(testing::_));
+ EXPECT_CALL(*persistent_promises[i], WillSwap(testing::_));
}
host_impl().active_tree()->FinishSwapPromises(nullptr);
}
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/swap_promise_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698