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

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

Issue 23480037: Fix RTL scroll bars being misrendered on Android. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: isLeftSideVerticalScrollbar Created 7 years, 3 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 | Annotate | Revision Log
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); 62 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*());
63 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); 63 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint());
64 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); 64 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint());
65 MOCK_CONST_METHOD1(visibleContentRect, IntRect(VisibleContentRectIncludesScr ollbars)); 65 MOCK_CONST_METHOD1(visibleContentRect, IntRect(VisibleContentRectIncludesScr ollbars));
66 MOCK_CONST_METHOD0(contentsSize, IntSize()); 66 MOCK_CONST_METHOD0(contentsSize, IntSize());
67 MOCK_CONST_METHOD0(overhangAmount, IntSize()); 67 MOCK_CONST_METHOD0(overhangAmount, IntSize());
68 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); 68 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool());
69 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); 69 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect());
70 70
71 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE { retu rn true; } 71 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE { retu rn true; }
72 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE { return fa lse; }
72 virtual IntPoint scrollPosition() const OVERRIDE { return IntPoint(); } 73 virtual IntPoint scrollPosition() const OVERRIDE { return IntPoint(); }
73 virtual int visibleHeight() const OVERRIDE { return 768; } 74 virtual int visibleHeight() const OVERRIDE { return 768; }
74 virtual int visibleWidth() const OVERRIDE { return 1024; } 75 virtual int visibleWidth() const OVERRIDE { return 1024; }
75 virtual bool scrollAnimatorEnabled() const OVERRIDE { return m_scrollAnimato rEnabled; } 76 virtual bool scrollAnimatorEnabled() const OVERRIDE { return m_scrollAnimato rEnabled; }
76 virtual int pageStep(ScrollbarOrientation) const OVERRIDE { return 0; } 77 virtual int pageStep(ScrollbarOrientation) const OVERRIDE { return 0; }
77 78
78 private: 79 private:
79 bool m_scrollAnimatorEnabled; 80 bool m_scrollAnimatorEnabled;
80 }; 81 };
81 82
(...skipping 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 EXPECT_TRUE(result); 1041 EXPECT_TRUE(result);
1041 result = result && animateScroll(t); 1042 result = result && animateScroll(t);
1042 double after = m_currentPosition; 1043 double after = m_currentPosition;
1043 EXPECT_GE(before, after); 1044 EXPECT_GE(before, after);
1044 1045
1045 t += kAnimationTime; 1046 t += kAnimationTime;
1046 for (; result && t < kEndTime; t += kAnimationTime) 1047 for (; result && t < kEndTime; t += kAnimationTime)
1047 result = result && animateScroll(t); 1048 result = result && animateScroll(t);
1048 EXPECT_GE(before, m_currentPosition); 1049 EXPECT_GE(before, m_currentPosition);
1049 } 1050 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698