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

Side by Side Diff: cc/base/region_unittest.cc

Issue 13051003: cpplint.py pass on cc/(base|debug|quads|resources)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix prioritized_resource_unittest Created 7 years, 9 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/base/math_util.h ('k') | cc/base/scoped_ptr_deque.h » ('j') | 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/base/region.h" 5 #include "cc/base/region.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace cc { 9 namespace cc {
10 namespace { 10 namespace {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 TEST_INSIDE_RECT(r, 30, 30, 10, 10); 64 TEST_INSIDE_RECT(r, 30, 30, 10, 10);
65 TEST_LEFT_OF_RECT(r, 30, 30, 10, 10); 65 TEST_LEFT_OF_RECT(r, 30, 30, 10, 10);
66 TEST_RIGHT_OF_RECT(r, 30, 30, 10, 10); 66 TEST_RIGHT_OF_RECT(r, 30, 30, 10, 10);
67 TEST_TOP_OF_RECT(r, 30, 30, 10, 10); 67 TEST_TOP_OF_RECT(r, 30, 30, 10, 10);
68 TEST_INSIDE_RECT(r, 31, 40, 10, 10); 68 TEST_INSIDE_RECT(r, 31, 40, 10, 10);
69 TEST_LEFT_OF_RECT(r, 31, 40, 10, 10); 69 TEST_LEFT_OF_RECT(r, 31, 40, 10, 10);
70 TEST_RIGHT_OF_RECT(r, 31, 40, 10, 10); 70 TEST_RIGHT_OF_RECT(r, 31, 40, 10, 10);
71 TEST_BOTTOM_OF_RECT(r, 31, 40, 10, 10); 71 TEST_BOTTOM_OF_RECT(r, 31, 40, 10, 10);
72 72
73 r.Union(gfx::Rect(42, 40, 10, 10)); 73 r.Union(gfx::Rect(42, 40, 10, 10));
74 74
75 TEST_INSIDE_RECT(r, 42, 40, 10, 10); 75 TEST_INSIDE_RECT(r, 42, 40, 10, 10);
76 TEST_LEFT_OF_RECT(r, 42, 40, 10, 10); 76 TEST_LEFT_OF_RECT(r, 42, 40, 10, 10);
77 TEST_RIGHT_OF_RECT(r, 42, 40, 10, 10); 77 TEST_RIGHT_OF_RECT(r, 42, 40, 10, 10);
78 TEST_TOP_OF_RECT(r, 42, 40, 10, 10); 78 TEST_TOP_OF_RECT(r, 42, 40, 10, 10);
79 TEST_BOTTOM_OF_RECT(r, 42, 40, 10, 10); 79 TEST_BOTTOM_OF_RECT(r, 42, 40, 10, 10);
80 80
81 TEST_INSIDE_RECT(r, 30, 30, 10, 10); 81 TEST_INSIDE_RECT(r, 30, 30, 10, 10);
82 TEST_LEFT_OF_RECT(r, 30, 30, 10, 10); 82 TEST_LEFT_OF_RECT(r, 30, 30, 10, 10);
83 TEST_RIGHT_OF_RECT(r, 30, 30, 10, 10); 83 TEST_RIGHT_OF_RECT(r, 30, 30, 10, 10);
84 TEST_TOP_OF_RECT(r, 30, 30, 10, 10); 84 TEST_TOP_OF_RECT(r, 30, 30, 10, 10);
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 r1.Union(gfx::Rect(100, 0, 50, 50)); 445 r1.Union(gfx::Rect(100, 0, 50, 50));
446 r1.Union(gfx::Rect(0, 0, 500, 500)); 446 r1.Union(gfx::Rect(0, 0, 500, 500));
447 r3 = r1; 447 r3 = r1;
448 r1.Swap(r2); 448 r1.Swap(r2);
449 EXPECT_EQ(r1.ToString(), Region(gfx::Rect(0, 0, 50, 50)).ToString()); 449 EXPECT_EQ(r1.ToString(), Region(gfx::Rect(0, 0, 50, 50)).ToString());
450 EXPECT_EQ(r2.ToString(), r3.ToString()); 450 EXPECT_EQ(r2.ToString(), r3.ToString());
451 } 451 }
452 452
453 } // namespace 453 } // namespace
454 } // namespace cc 454 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/math_util.h ('k') | cc/base/scoped_ptr_deque.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698