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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 645223003: Change overscroll functions to pass floats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void Reset() { 70 void Reset() {
71 count_ = 0; 71 count_ = 0;
72 completed_ = false; 72 completed_ = false;
73 } 73 }
74 74
75 private: 75 private:
76 virtual bool CanOverscrollContent() const override { 76 virtual bool CanOverscrollContent() const override {
77 return true; 77 return true;
78 } 78 }
79 79
80 virtual void OverscrollUpdate(int delta_y) override { 80 virtual void OverscrollUpdate(float delta_y) override {
81 ++count_; 81 ++count_;
82 } 82 }
83 83
84 virtual void OverscrollComplete() override { 84 virtual void OverscrollComplete() override {
85 completed_ = true; 85 completed_ = true;
86 } 86 }
87 87
88 int count_; 88 int count_;
89 bool completed_; 89 bool completed_;
90 90
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 details = dispatcher->OnEventFromSource(&release); 1148 details = dispatcher->OnEventFromSource(&release);
1149 ASSERT_FALSE(details.dispatcher_destroyed); 1149 ASSERT_FALSE(details.dispatcher_destroyed);
1150 WaitAFrame(); 1150 WaitAFrame();
1151 1151
1152 EXPECT_LT(0, tracker.num_overscroll_updates()); 1152 EXPECT_LT(0, tracker.num_overscroll_updates());
1153 EXPECT_FALSE(tracker.overscroll_completed()); 1153 EXPECT_FALSE(tracker.overscroll_completed());
1154 } 1154 }
1155 } 1155 }
1156 1156
1157 } // namespace content 1157 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698