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

Side by Side Diff: Source/core/page/scrolling/ScrollStateTest.cpp

Issue 988823003: Use scroll customization primitives for touch scrolling (behind REF). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address rbyers' nit. Created 5 years, 9 months 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
« no previous file with comments | « Source/core/page/scrolling/ScrollState.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "config.h" 5 #include "config.h"
6 #include "core/page/scrolling/ScrollState.h" 6 #include "core/page/scrolling/ScrollState.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/Element.h" 9 #include "core/dom/Element.h"
10 #include <gtest/gtest.h> 10 #include <gtest/gtest.h>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 { 56 {
57 RefPtrWillBeRawPtr<ScrollState> scrollState = 57 RefPtrWillBeRawPtr<ScrollState> scrollState =
58 ScrollState::create(0, 0, 0, 0, 0, false, false); 58 ScrollState::create(0, 0, 0, 0, 0, false, false);
59 RefPtrWillBeRawPtr<Element> element = Element::create( 59 RefPtrWillBeRawPtr<Element> element = Element::create(
60 QualifiedName::null(), Document::create().get()); 60 QualifiedName::null(), Document::create().get());
61 scrollState->setCurrentNativeScrollingElement(element.get()); 61 scrollState->setCurrentNativeScrollingElement(element.get());
62 62
63 EXPECT_EQ(element, scrollState->currentNativeScrollingElement()); 63 EXPECT_EQ(element, scrollState->currentNativeScrollingElement());
64 } 64 }
65 65
66 TEST_F(ScrollStateTest, FullyConsumed)
67 {
68 RefPtrWillBeRawPtr<ScrollState> scrollStateBegin =
69 ScrollState::create(0, 0, 0, 0, 0, false, true, false);
70 RefPtrWillBeRawPtr<ScrollState> scrollState =
71 ScrollState::create(0, 0, 0, 0, 0, false, false, false);
72 RefPtrWillBeRawPtr<ScrollState> scrollStateEnd =
73 ScrollState::create(0, 0, 0, 0, 0, false, false, true);
74 EXPECT_FALSE(scrollStateBegin->fullyConsumed());
75 EXPECT_TRUE(scrollState->fullyConsumed());
76 EXPECT_FALSE(scrollStateEnd->fullyConsumed());
66 } 77 }
78
79 }
OLDNEW
« no previous file with comments | « Source/core/page/scrolling/ScrollState.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698