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

Side by Side Diff: Source/web/tests/ScrollAnimatorNoneTest.cpp

Issue 260353003: isActiveFocus() is a more meaningful name (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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/web/ScrollbarGroup.cpp ('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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 using testing::AtLeast; 43 using testing::AtLeast;
44 using testing::Return; 44 using testing::Return;
45 using testing::_; 45 using testing::_;
46 46
47 class MockScrollableArea : public ScrollableArea { 47 class MockScrollableArea : public ScrollableArea {
48 public: 48 public:
49 MockScrollableArea(bool scrollAnimatorEnabled) 49 MockScrollableArea(bool scrollAnimatorEnabled)
50 : m_scrollAnimatorEnabled(scrollAnimatorEnabled) { } 50 : m_scrollAnimatorEnabled(scrollAnimatorEnabled) { }
51 51
52 MOCK_CONST_METHOD0(isActive, bool()); 52 MOCK_CONST_METHOD0(isActiveFocus, bool());
53 MOCK_CONST_METHOD1(scrollSize, int(ScrollbarOrientation)); 53 MOCK_CONST_METHOD1(scrollSize, int(ScrollbarOrientation));
54 MOCK_METHOD2(invalidateScrollbar, void(Scrollbar*, const IntRect&)); 54 MOCK_METHOD2(invalidateScrollbar, void(Scrollbar*, const IntRect&));
55 MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); 55 MOCK_CONST_METHOD0(isScrollCornerVisible, bool());
56 MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); 56 MOCK_CONST_METHOD0(scrollCornerRect, IntRect());
57 MOCK_METHOD1(setScrollOffset, void(const IntPoint&)); 57 MOCK_METHOD1(setScrollOffset, void(const IntPoint&));
58 MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&)); 58 MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&));
59 MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&)); 59 MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&));
60 MOCK_METHOD1(setScrollOffsetFromAnimation, void(const IntPoint&)); 60 MOCK_METHOD1(setScrollOffsetFromAnimation, void(const IntPoint&));
61 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); 61 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*());
62 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); 62 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint());
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 EXPECT_TRUE(result); 1044 EXPECT_TRUE(result);
1045 result = result && animateScroll(t); 1045 result = result && animateScroll(t);
1046 double after = m_currentPosition; 1046 double after = m_currentPosition;
1047 EXPECT_GE(before, after); 1047 EXPECT_GE(before, after);
1048 1048
1049 t += kAnimationTime; 1049 t += kAnimationTime;
1050 for (; result && t < kEndTime; t += kAnimationTime) 1050 for (; result && t < kEndTime; t += kAnimationTime)
1051 result = result && animateScroll(t); 1051 result = result && animateScroll(t);
1052 EXPECT_GE(before, m_currentPosition); 1052 EXPECT_GE(before, m_currentPosition);
1053 } 1053 }
OLDNEW
« no previous file with comments | « Source/web/ScrollbarGroup.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698