| 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 "cc/tile_priority.h" | 5 #include "cc/resources/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 namespace { |
| 11 | 11 |
| 12 TEST(TilePriorityTest, TimeForBoundsToIntersectWithScroll) { | 12 TEST(TilePriorityTest, TimeForBoundsToIntersectWithScroll) { |
| 13 const float inf = std::numeric_limits<float>::infinity(); | 13 const float inf = std::numeric_limits<float>::infinity(); |
| 14 gfx::Rect target(0, 0, 800, 600); | 14 gfx::Rect target(0, 0, 800, 600); |
| 15 gfx::Rect current(100, 100, 100, 100); | 15 gfx::Rect current(100, 100, 100, 100); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 EXPECT_EQ(1, TilePriority::manhattanDistance( | 59 EXPECT_EQ(1, TilePriority::manhattanDistance( |
| 60 gfx::Rect(0, 0, 400, 400), gfx::Rect(0, -100, 100, 100))); | 60 gfx::Rect(0, 0, 400, 400), gfx::Rect(0, -100, 100, 100))); |
| 61 | 61 |
| 62 EXPECT_EQ(202, TilePriority::manhattanDistance( | 62 EXPECT_EQ(202, TilePriority::manhattanDistance( |
| 63 gfx::Rect(0, 0, 100, 100), gfx::Rect(200, 200, 100, 100))); | 63 gfx::Rect(0, 0, 100, 100), gfx::Rect(200, 200, 100, 100))); |
| 64 } | 64 } |
| 65 | 65 |
| 66 } // namespace | 66 } // namespace |
| 67 } // namespace cc | 67 } // namespace cc |
| OLD | NEW |