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

Side by Side Diff: cc/tile_priority_unittest.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/tiled_layer_test_common.cc ('k') | cc/tiled_layer_impl_unittest.cc » ('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/tile_priority.h" 5 #include "cc/tile_priority.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 11
11 TEST(TilePriorityTest, TimeForBoundsToIntersectWithScroll) { 12 TEST(TilePriorityTest, TimeForBoundsToIntersectWithScroll) {
12 gfx::Rect target(0, 0, 800, 600); 13 gfx::Rect target(0, 0, 800, 600);
13 gfx::Rect current(100, 100, 100, 100); 14 gfx::Rect current(100, 100, 100, 100);
14 EXPECT_EQ(0, TilePriority::TimeForBoundsToIntersect( 15 EXPECT_EQ(0, TilePriority::TimeForBoundsToIntersect(
15 gfx::Rect(-200, 0, 100, 100), current, 1, target)); 16 gfx::Rect(-200, 0, 100, 100), current, 1, target));
16 EXPECT_EQ(0, TilePriority::TimeForBoundsToIntersect( 17 EXPECT_EQ(0, TilePriority::TimeForBoundsToIntersect(
17 gfx::Rect(-100, 0, 100, 100), current, 1, target)); 18 gfx::Rect(-100, 0, 100, 100), current, 1, target));
18 EXPECT_EQ(0, TilePriority::TimeForBoundsToIntersect( 19 EXPECT_EQ(0, TilePriority::TimeForBoundsToIntersect(
19 gfx::Rect(400, 400, 100, 100), current, 1, target)); 20 gfx::Rect(400, 400, 100, 100), current, 1, target));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 EXPECT_EQ(2, TilePriority::manhattanDistance( 54 EXPECT_EQ(2, TilePriority::manhattanDistance(
54 gfx::Rect(0, 0, 400, 400), gfx::Rect(-100, -100, 100, 100))); 55 gfx::Rect(0, 0, 400, 400), gfx::Rect(-100, -100, 100, 100)));
55 56
56 EXPECT_EQ(1, TilePriority::manhattanDistance( 57 EXPECT_EQ(1, TilePriority::manhattanDistance(
57 gfx::Rect(0, 0, 400, 400), gfx::Rect(0, -100, 100, 100))); 58 gfx::Rect(0, 0, 400, 400), gfx::Rect(0, -100, 100, 100)));
58 59
59 EXPECT_EQ(202, TilePriority::manhattanDistance( 60 EXPECT_EQ(202, TilePriority::manhattanDistance(
60 gfx::Rect(0, 0, 100, 100), gfx::Rect(200, 200, 100, 100))); 61 gfx::Rect(0, 0, 100, 100), gfx::Rect(200, 200, 100, 100)));
61 } 62 }
62 63
64 } // namespace
63 } // namespace cc 65 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/tiled_layer_test_common.cc ('k') | cc/tiled_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698