| OLD | NEW |
| 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 "config.h" | |
| 6 | |
| 7 #include "cc/region.h" | 5 #include "cc/region.h" |
| 8 | 6 |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 8 |
| 11 using namespace cc; | 9 using namespace cc; |
| 12 | 10 |
| 13 namespace { | 11 namespace { |
| 14 | 12 |
| 15 #define TEST_INSIDE_RECT(r, x, y, w, h) \ | 13 #define TEST_INSIDE_RECT(r, x, y, w, h) \ |
| 16 EXPECT_TRUE(r.Contains(gfx::Point(x, y))); \ | 14 EXPECT_TRUE(r.Contains(gfx::Point(x, y))); \ |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 r1 = gfx::Rect(0, 0, 50, 50); | 445 r1 = gfx::Rect(0, 0, 50, 50); |
| 448 r1.Union(gfx::Rect(100, 0, 50, 50)); | 446 r1.Union(gfx::Rect(100, 0, 50, 50)); |
| 449 r1.Union(gfx::Rect(0, 0, 500, 500)); | 447 r1.Union(gfx::Rect(0, 0, 500, 500)); |
| 450 r3 = r1; | 448 r3 = r1; |
| 451 r1.Swap(r2); | 449 r1.Swap(r2); |
| 452 EXPECT_EQ(r1.ToString(), Region(gfx::Rect(0, 0, 50, 50)).ToString()); | 450 EXPECT_EQ(r1.ToString(), Region(gfx::Rect(0, 0, 50, 50)).ToString()); |
| 453 EXPECT_EQ(r2.ToString(), r3.ToString()); | 451 EXPECT_EQ(r2.ToString(), r3.ToString()); |
| 454 } | 452 } |
| 455 | 453 |
| 456 } // namespace | 454 } // namespace |
| OLD | NEW |