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

Side by Side Diff: content/renderer/paint_aggregator_unittest.cc

Issue 11225045: Move a bunch of content\common code into the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
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 "content/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 namespace content {
9
8 TEST(PaintAggregator, InitialState) { 10 TEST(PaintAggregator, InitialState) {
9 PaintAggregator greg; 11 PaintAggregator greg;
10 EXPECT_FALSE(greg.HasPendingUpdate()); 12 EXPECT_FALSE(greg.HasPendingUpdate());
11 } 13 }
12 14
13 TEST(PaintAggregator, SingleInvalidation) { 15 TEST(PaintAggregator, SingleInvalidation) {
14 PaintAggregator greg; 16 PaintAggregator greg;
15 17
16 gfx::Rect rect(2, 4, 10, 16); 18 gfx::Rect rect(2, 4, 10, 16);
17 greg.InvalidateRect(rect); 19 greg.InvalidateRect(rect);
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 EXPECT_TRUE(greg.HasPendingUpdate()); 430 EXPECT_TRUE(greg.HasPendingUpdate());
429 PaintAggregator::PendingUpdate update; 431 PaintAggregator::PendingUpdate update;
430 greg.PopPendingUpdate(&update); 432 greg.PopPendingUpdate(&update);
431 433
432 EXPECT_FALSE(update.scroll_rect.IsEmpty()); 434 EXPECT_FALSE(update.scroll_rect.IsEmpty());
433 EXPECT_TRUE(update.paint_rects.empty()); 435 EXPECT_TRUE(update.paint_rects.empty());
434 436
435 EXPECT_EQ(scroll_rect, update.scroll_rect); 437 EXPECT_EQ(scroll_rect, update.scroll_rect);
436 EXPECT_EQ(expected_scroll_damage, update.GetScrollDamage()); 438 EXPECT_EQ(expected_scroll_damage, update.GetScrollDamage());
437 } 439 }
440
441 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698