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

Unified Diff: cc/layers/layer_unittest.cc

Issue 5831706594508800: cc: Cleanup Layer::SetNeedsDisplayInRect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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.cc ('k') | cc/layers/nine_patch_layer.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 0c2fca6d6286ca145c3ae289cb775bf81cdfb946..c338195675c1c6bfcde9787d5f41a239e3651d0a 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -510,7 +510,13 @@ TEST_F(LayerTest, CheckSetNeedsDisplayCausesCorrectBehavior) {
EXPECT_TRUE(test_layer->NeedsDisplayForTesting());
test_layer->ResetNeedsDisplayForTesting();
- // Case 3: SetNeedsDisplay() with a non-drawable layer
+ // Case 3: SetNeedsDisplay() with an empty rect.
+ test_layer->ResetNeedsDisplayForTesting();
+ EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
+ EXPECT_SET_NEEDS_COMMIT(0, test_layer->SetNeedsDisplayRect(gfx::Rect()));
+ EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
+
+ // Case 4: SetNeedsDisplay() with a non-drawable layer
EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetIsDrawable(false));
test_layer->ResetNeedsDisplayForTesting();
EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/nine_patch_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698