OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/layers/layer.h" | 5 #include "cc/layers/layer.h" |
6 #include "content/browser/android/overscroll_refresh.h" | |
7 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 #include "ui/android/overscroll_refresh.h" |
8 | 8 |
9 namespace content { | 9 namespace ui { |
10 | 10 |
11 class OverscrollRefreshTest : public OverscrollRefreshHandler, | 11 class OverscrollRefreshTest : public OverscrollRefreshHandler, |
12 public testing::Test { | 12 public testing::Test { |
13 public: | 13 public: |
14 OverscrollRefreshTest() {} | 14 OverscrollRefreshTest() {} |
15 | 15 |
16 // OverscrollRefreshHandler implementation. | 16 // OverscrollRefreshHandler implementation. |
17 bool PullStart() override { | 17 bool PullStart() override { |
18 started_ = true; | 18 started_ = true; |
19 return true; | 19 return true; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 ASSERT_TRUE(effect.IsActive()); | 231 ASSERT_TRUE(effect.IsActive()); |
232 EXPECT_TRUE(GetAndResetPullStarted()); | 232 EXPECT_TRUE(GetAndResetPullStarted()); |
233 | 233 |
234 // An early reset should prevent the refresh action from firing. | 234 // An early reset should prevent the refresh action from firing. |
235 effect.Reset(); | 235 effect.Reset(); |
236 EXPECT_TRUE(GetAndResetPullReset()); | 236 EXPECT_TRUE(GetAndResetPullReset()); |
237 effect.OnScrollEnd(gfx::Vector2dF()); | 237 effect.OnScrollEnd(gfx::Vector2dF()); |
238 EXPECT_FALSE(GetAndResetPullReleased()); | 238 EXPECT_FALSE(GetAndResetPullReleased()); |
239 } | 239 } |
240 | 240 |
241 } // namespace content | 241 } // namespace ui |
OLD | NEW |