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

Side by Side Diff: cc/resources/picture_pile_unittest.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <map> 5 #include <map>
6 #include <utility> 6 #include <utility>
7 7
8 #include "cc/resources/picture_pile.h" 8 #include "cc/resources/picture_pile.h"
9 #include "cc/test/fake_content_layer_client.h" 9 #include "cc/test/fake_content_layer_client.h"
10 #include "cc/test/fake_rendering_stats_instrumentation.h" 10 #include "cc/test/fake_rendering_stats_instrumentation.h"
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 // Add a rect that doesn't cover the viewport completely, the solid state 1449 // Add a rect that doesn't cover the viewport completely, the solid state
1450 // will be false. 1450 // will be false.
1451 gfx::Rect smallRect = visible_rect; 1451 gfx::Rect smallRect = visible_rect;
1452 smallRect.Inset(10, 10, 10, 10); 1452 smallRect.Inset(10, 10, 10, 10);
1453 client_.add_draw_rect(smallRect, paint); 1453 client_.add_draw_rect(smallRect, paint);
1454 Region invalidation(visible_rect); 1454 Region invalidation(visible_rect);
1455 UpdateAndExpandInvalidation(&invalidation, tiling_size, visible_rect); 1455 UpdateAndExpandInvalidation(&invalidation, tiling_size, visible_rect);
1456 EXPECT_FALSE(pile_.is_solid_color()); 1456 EXPECT_FALSE(pile_.is_solid_color());
1457 } 1457 }
1458 1458
1459 TEST_F(PicturePileTest, SetEmptyBounds) {
1460 EXPECT_TRUE(pile_.is_solid_color());
1461 EXPECT_FALSE(pile_.tiling_size().IsEmpty());
1462 EXPECT_FALSE(pile_.picture_map().empty());
1463 EXPECT_TRUE(pile_.HasRecordings());
1464 pile_.SetEmptyBounds();
1465 EXPECT_FALSE(pile_.is_solid_color());
1466 EXPECT_TRUE(pile_.tiling_size().IsEmpty());
1467 EXPECT_TRUE(pile_.picture_map().empty());
1468 EXPECT_FALSE(pile_.HasRecordings());
1469 }
1470
1459 } // namespace 1471 } // namespace
1460 } // namespace cc 1472 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_impl_unittest.cc ('k') | cc/resources/pixel_buffer_raster_worker_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698