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

Unified Diff: cc/layers/layer_unittest.cc

Issue 19106007: cc: Allow the main thread to cancel commits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another test 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
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_unittest.cc
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index fb3a75287c99f3e9a7b15978257221b29eeaf78c..b7fa16646b1634c481ca62d4cebc13822aef2e05 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -44,6 +44,7 @@ class MockLayerTreeHost : public LayerTreeHost {
}
MOCK_METHOD0(SetNeedsCommit, void());
+ MOCK_METHOD0(SetNeedsUpdateLayers, void());
MOCK_METHOD0(SetNeedsFullTreeSync, void());
};
@@ -446,7 +447,7 @@ TEST_F(LayerTest, GetRootLayerAfterTreeManipulations) {
TEST_F(LayerTest, CheckSetNeedsDisplayCausesCorrectBehavior) {
// The semantics for SetNeedsDisplay which are tested here:
// 1. sets NeedsDisplay flag appropriately.
- // 2. indirectly calls SetNeedsCommit, exactly once for each call to
+ // 2. indirectly calls SetNeedsUpdate, exactly once for each call to
// SetNeedsDisplay.
scoped_refptr<Layer> test_layer = Layer::Create();
@@ -476,7 +477,7 @@ TEST_F(LayerTest, CheckSetNeedsDisplayCausesCorrectBehavior) {
// Case 1: Layer should accept dirty rects that go beyond its bounds.
test_layer->ResetNeedsDisplayForTesting();
EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
- EXPECT_SET_NEEDS_COMMIT(
+ EXPECT_SET_NEEDS_UPDATE(
1, test_layer->SetNeedsDisplayRect(out_of_bounds_dirty_rect));
EXPECT_TRUE(test_layer->NeedsDisplayForTesting());
test_layer->ResetNeedsDisplayForTesting();
@@ -484,7 +485,7 @@ TEST_F(LayerTest, CheckSetNeedsDisplayCausesCorrectBehavior) {
// Case 2: SetNeedsDisplay() without the dirty rect arg.
test_layer->ResetNeedsDisplayForTesting();
EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
- EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNeedsDisplay());
+ EXPECT_SET_NEEDS_UPDATE(1, test_layer->SetNeedsDisplay());
EXPECT_TRUE(test_layer->NeedsDisplayForTesting());
test_layer->ResetNeedsDisplayForTesting();
@@ -492,7 +493,7 @@ TEST_F(LayerTest, CheckSetNeedsDisplayCausesCorrectBehavior) {
EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetIsDrawable(false));
test_layer->ResetNeedsDisplayForTesting();
EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
- EXPECT_SET_NEEDS_COMMIT(0, test_layer->SetNeedsDisplayRect(dirty1));
+ EXPECT_SET_NEEDS_UPDATE(0, test_layer->SetNeedsDisplayRect(dirty1));
EXPECT_TRUE(test_layer->NeedsDisplayForTesting());
}
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698