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

Unified Diff: cc/layers/layer_impl_unittest.cc

Issue 256303006: Make LayerScrollOffsetDelegate updates consistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer_impl_unittest.cc
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc
index 7aea7c7ebf34832e3fe24a27e269c1cbbbc48228..ca3a93df66ef4f8a03d9b5cb14c409646cbfdc6e 100644
--- a/cc/layers/layer_impl_unittest.cc
+++ b/cc/layers/layer_impl_unittest.cc
@@ -490,8 +490,6 @@ TEST_F(LayerImplScrollTest, ScrollByWithNonZeroOffset) {
class ScrollDelegateIgnore : public LayerScrollOffsetDelegate {
public:
- virtual void SetMaxScrollOffset(
- const gfx::Vector2dF& max_scroll_offset) OVERRIDE {}
virtual void SetTotalScrollOffset(const gfx::Vector2dF& new_value) OVERRIDE {}
virtual gfx::Vector2dF GetTotalScrollOffset() OVERRIDE {
return fixed_offset_;
@@ -501,12 +499,14 @@ class ScrollDelegateIgnore : public LayerScrollOffsetDelegate {
void set_fixed_offset(const gfx::Vector2dF& fixed_offset) {
fixed_offset_ = fixed_offset;
}
-
- virtual void SetTotalPageScaleFactorAndLimits(
- float page_scale_factor,
- float min_page_scale_factor,
- float max_page_scale_factor) OVERRIDE {}
- virtual void SetScrollableSize(const gfx::SizeF& scrollable_size) OVERRIDE {}
+ virtual void UpdateRootLayerState(const gfx::Vector2dF& total_scroll_offset,
+ const gfx::Vector2dF& max_scroll_offset,
+ const gfx::SizeF& scrollable_size,
+ float page_scale_factor,
+ float min_page_scale_factor,
+ float max_page_scale_factor) OVERRIDE {
+ NOTREACHED();
+ }
private:
gfx::Vector2dF fixed_offset_;
@@ -547,8 +547,6 @@ TEST_F(LayerImplScrollTest, ScrollByWithIgnoringDelegate) {
class ScrollDelegateAccept : public LayerScrollOffsetDelegate {
public:
- virtual void SetMaxScrollOffset(
- const gfx::Vector2dF& max_scroll_offset) OVERRIDE {}
virtual void SetTotalScrollOffset(const gfx::Vector2dF& new_value) OVERRIDE {
current_offset_ = new_value;
}
@@ -556,11 +554,14 @@ class ScrollDelegateAccept : public LayerScrollOffsetDelegate {
return current_offset_;
}
virtual bool IsExternalFlingActive() const OVERRIDE { return false; }
- virtual void SetTotalPageScaleFactorAndLimits(
- float page_scale_factor,
- float min_page_scale_factor,
- float max_page_scale_factor) OVERRIDE {}
- virtual void SetScrollableSize(const gfx::SizeF& scrollable_size) OVERRIDE {}
+ virtual void UpdateRootLayerState(const gfx::Vector2dF& total_scroll_offset,
+ const gfx::Vector2dF& max_scroll_offset,
+ const gfx::SizeF& scrollable_size,
+ float page_scale_factor,
+ float min_page_scale_factor,
+ float max_page_scale_factor) OVERRIDE {
+ NOTREACHED();
+ }
private:
gfx::Vector2dF current_offset_;

Powered by Google App Engine
This is Rietveld 408576698