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

Side by Side Diff: cc/test/layer_test_common.cc

Issue 11474050: cc: Unify namespaces for all test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years 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/test/layer_test_common.h ('k') | cc/test/layer_tree_test_common.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/test/layer_test_common.h" 5 #include "cc/test/layer_test_common.h"
6 6
7 #include "cc/draw_quad.h" 7 #include "cc/draw_quad.h"
8 #include "cc/math_util.h" 8 #include "cc/math_util.h"
9 #include "cc/region.h" 9 #include "cc/region.h"
10 #include "cc/render_pass.h" 10 #include "cc/render_pass.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
13 #include "ui/gfx/point_conversions.h" 13 #include "ui/gfx/point_conversions.h"
14 #include "ui/gfx/rect_conversions.h" 14 #include "ui/gfx/rect_conversions.h"
15 #include "ui/gfx/size_conversions.h" 15 #include "ui/gfx/size_conversions.h"
16 16
17 namespace cc {
17 namespace LayerTestCommon { 18 namespace LayerTestCommon {
18 19
19 // Align with expected and actual output 20 // Align with expected and actual output
20 const char* quadString = " Quad: "; 21 const char* quadString = " Quad: ";
21 22
22 bool canRectFBeSafelyRoundedToRect(const gfx::RectF& r) 23 bool canRectFBeSafelyRoundedToRect(const gfx::RectF& r)
23 { 24 {
24 // Ensure that range of float values is not beyond integer range. 25 // Ensure that range of float values is not beyond integer range.
25 if (!r.IsExpressibleAsRect()) 26 if (!r.IsExpressibleAsRect())
26 return false; 27 return false;
(...skipping 21 matching lines...) Expand all
48 49
49 EXPECT_TRUE(rect.Contains(quadRect)) << quadString << i; 50 EXPECT_TRUE(rect.Contains(quadRect)) << quadString << i;
50 EXPECT_TRUE(remaining.Contains(quadRect)) << quadString << i; 51 EXPECT_TRUE(remaining.Contains(quadRect)) << quadString << i;
51 remaining.Subtract(quadRect); 52 remaining.Subtract(quadRect);
52 } 53 }
53 54
54 EXPECT_TRUE(remaining.IsEmpty()); 55 EXPECT_TRUE(remaining.IsEmpty());
55 } 56 }
56 57
57 } // namespace LayerTestCommon 58 } // namespace LayerTestCommon
59 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_test_common.h ('k') | cc/test/layer_tree_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698