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

Side by Side Diff: cc/picture_layer_tiling_unittest.cc

Issue 11946008: cc: Fix tree activation when invisible layers exist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit test Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/picture_layer_tiling.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/picture_layer_tiling.h" 5 #include "cc/picture_layer_tiling.h"
6 6
7 #include "cc/test/fake_picture_layer_tiling_client.h" 7 #include "cc/test/fake_picture_layer_tiling_client.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/gfx/size_conversions.h" 9 #include "ui/gfx/size_conversions.h"
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 VerifyTilesExactlyCoverRect(2.0f, gfx::Rect(512, 365, 253, 182)); 112 VerifyTilesExactlyCoverRect(2.0f, gfx::Rect(512, 365, 253, 182));
113 113
114 float scale = 6.7f; 114 float scale = 6.7f;
115 gfx::Size bounds(800, 600); 115 gfx::Size bounds(800, 600);
116 gfx::Rect full_rect(gfx::ToCeiledSize(gfx::ScaleSize(bounds, scale))); 116 gfx::Rect full_rect(gfx::ToCeiledSize(gfx::ScaleSize(bounds, scale)));
117 Initialize(gfx::Size(256, 512), 5.2f, bounds); 117 Initialize(gfx::Size(256, 512), 5.2f, bounds);
118 VerifyTilesExactlyCoverRect(scale, full_rect); 118 VerifyTilesExactlyCoverRect(scale, full_rect);
119 VerifyTilesExactlyCoverRect(scale, gfx::Rect(2014, 1579, 867, 1033)); 119 VerifyTilesExactlyCoverRect(scale, gfx::Rect(2014, 1579, 867, 1033));
120 } 120 }
121 121
122 TEST_F(PictureLayerTilingIteratorTest, IteratorEmptyRect) {
123 Initialize(gfx::Size(100, 100), 1, gfx::Size(800, 600));
124
125 gfx::Rect empty;
126 PictureLayerTiling::Iterator iter(tiling_.get(), 1, empty);
127 EXPECT_FALSE(iter);
128 }
129
122 } // namespace 130 } // namespace
123 } // namespace cc 131 } // namespace cc
OLDNEW
« no previous file with comments | « cc/picture_layer_tiling.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698