| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/page/scrolling/ScrollState.h" | 5 #include "core/page/scrolling/ScrollState.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 8 #include "core/dom/Element.h" | 9 #include "core/dom/Element.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "wtf/PtrUtil.h" | 11 #include "wtf/PtrUtil.h" |
| 11 #include <memory> | |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 ScrollState* CreateScrollState(double deltaX, | 17 ScrollState* CreateScrollState(double deltaX, |
| 18 double deltaY, | 18 double deltaY, |
| 19 bool beginning, | 19 bool beginning, |
| 20 bool ending) { | 20 bool ending) { |
| 21 std::unique_ptr<ScrollStateData> scrollStateData = | 21 std::unique_ptr<ScrollStateData> scrollStateData = |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 ScrollState* scrollState = CreateScrollState(0, 0, false, false); | 78 ScrollState* scrollState = CreateScrollState(0, 0, false, false); |
| 79 ScrollState* scrollStateEnd = CreateScrollState(0, 0, false, true); | 79 ScrollState* scrollStateEnd = CreateScrollState(0, 0, false, true); |
| 80 EXPECT_FALSE(scrollStateBegin->fullyConsumed()); | 80 EXPECT_FALSE(scrollStateBegin->fullyConsumed()); |
| 81 EXPECT_TRUE(scrollState->fullyConsumed()); | 81 EXPECT_TRUE(scrollState->fullyConsumed()); |
| 82 EXPECT_FALSE(scrollStateEnd->fullyConsumed()); | 82 EXPECT_FALSE(scrollStateEnd->fullyConsumed()); |
| 83 } | 83 } |
| 84 | 84 |
| 85 } // namespace | 85 } // namespace |
| 86 | 86 |
| 87 } // namespace blink | 87 } // namespace blink |
| OLD | NEW |