| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/renderer/paint_aggregator.h" | 5 #include "content/renderer/paint_aggregator.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 | 7 |
| 8 TEST(PaintAggregator, InitialState) { | 8 TEST(PaintAggregator, InitialState) { |
| 9 PaintAggregator greg; | 9 PaintAggregator greg; |
| 10 EXPECT_FALSE(greg.HasPendingUpdate()); | 10 EXPECT_FALSE(greg.HasPendingUpdate()); |
| 11 } | 11 } |
| 12 | 12 |
| 13 TEST(PaintAggregator, SingleInvalidation) { | 13 TEST(PaintAggregator, SingleInvalidation) { |
| 14 PaintAggregator greg; | 14 PaintAggregator greg; |
| 15 | 15 |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 EXPECT_TRUE(greg.HasPendingUpdate()); | 428 EXPECT_TRUE(greg.HasPendingUpdate()); |
| 429 PaintAggregator::PendingUpdate update; | 429 PaintAggregator::PendingUpdate update; |
| 430 greg.PopPendingUpdate(&update); | 430 greg.PopPendingUpdate(&update); |
| 431 | 431 |
| 432 EXPECT_FALSE(update.scroll_rect.IsEmpty()); | 432 EXPECT_FALSE(update.scroll_rect.IsEmpty()); |
| 433 EXPECT_TRUE(update.paint_rects.empty()); | 433 EXPECT_TRUE(update.paint_rects.empty()); |
| 434 | 434 |
| 435 EXPECT_EQ(scroll_rect, update.scroll_rect); | 435 EXPECT_EQ(scroll_rect, update.scroll_rect); |
| 436 EXPECT_EQ(expected_scroll_damage, update.GetScrollDamage()); | 436 EXPECT_EQ(expected_scroll_damage, update.GetScrollDamage()); |
| 437 } | 437 } |
| OLD | NEW |