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

Side by Side Diff: cc/region_unittest.cc

Issue 11410022: cc: Remove forbidden using namespace directives. (Closed) Base URL: svn://svn.chromium.org/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 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" 5 #include "config.h"
6 6
7 #include "cc/region.h" 7 #include "cc/region.h"
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 using namespace cc; 11 namespace cc {
12
13 namespace { 12 namespace {
14 13
15 #define TEST_INSIDE_RECT(r, x, y, w, h) \ 14 #define TEST_INSIDE_RECT(r, x, y, w, h) \
16 EXPECT_TRUE(r.Contains(gfx::Point(x, y))); \ 15 EXPECT_TRUE(r.Contains(gfx::Point(x, y))); \
17 EXPECT_TRUE(r.Contains(gfx::Point(x + w - 1, y))); \ 16 EXPECT_TRUE(r.Contains(gfx::Point(x + w - 1, y))); \
18 EXPECT_TRUE(r.Contains(gfx::Point(x, y + h - 1))); \ 17 EXPECT_TRUE(r.Contains(gfx::Point(x, y + h - 1))); \
19 EXPECT_TRUE(r.Contains(gfx::Point(x + w - 1, y + h - 1))); \ 18 EXPECT_TRUE(r.Contains(gfx::Point(x + w - 1, y + h - 1))); \
20 EXPECT_TRUE(r.Contains(gfx::Point(x, y + h / 2))); \ 19 EXPECT_TRUE(r.Contains(gfx::Point(x, y + h / 2))); \
21 EXPECT_TRUE(r.Contains(gfx::Point(x + w - 1, y + h / 2))); \ 20 EXPECT_TRUE(r.Contains(gfx::Point(x + w - 1, y + h / 2))); \
22 EXPECT_TRUE(r.Contains(gfx::Point(x + w / 2, y))); \ 21 EXPECT_TRUE(r.Contains(gfx::Point(x + w / 2, y))); \
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 r1 = gfx::Rect(0, 0, 50, 50); 446 r1 = gfx::Rect(0, 0, 50, 50);
448 r1.Union(gfx::Rect(100, 0, 50, 50)); 447 r1.Union(gfx::Rect(100, 0, 50, 50));
449 r1.Union(gfx::Rect(0, 0, 500, 500)); 448 r1.Union(gfx::Rect(0, 0, 500, 500));
450 r3 = r1; 449 r3 = r1;
451 r1.Swap(r2); 450 r1.Swap(r2);
452 EXPECT_EQ(r1.ToString(), Region(gfx::Rect(0, 0, 50, 50)).ToString()); 451 EXPECT_EQ(r1.ToString(), Region(gfx::Rect(0, 0, 50, 50)).ToString());
453 EXPECT_EQ(r2.ToString(), r3.ToString()); 452 EXPECT_EQ(r2.ToString(), r3.ToString());
454 } 453 }
455 454
456 } // namespace 455 } // namespace
456 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698