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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 2698673006: Add User Actions and adding more details to UMA metrics for overscroll navigation (Closed)
Patch Set: Created 3 years, 10 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/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <tuple> 10 #include <tuple>
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return true; 149 return true;
150 } 150 }
151 151
152 void OnOverscrollComplete(OverscrollMode overscroll_mode) override { 152 void OnOverscrollComplete(OverscrollMode overscroll_mode) override {
153 EXPECT_EQ(current_mode_, overscroll_mode); 153 EXPECT_EQ(current_mode_, overscroll_mode);
154 completed_mode_ = overscroll_mode; 154 completed_mode_ = overscroll_mode;
155 current_mode_ = OVERSCROLL_NONE; 155 current_mode_ = OVERSCROLL_NONE;
156 } 156 }
157 157
158 void OnOverscrollModeChange(OverscrollMode old_mode, 158 void OnOverscrollModeChange(OverscrollMode old_mode,
159 OverscrollMode new_mode) override { 159 OverscrollMode new_mode,
160 OverscrollSource source) override {
160 EXPECT_EQ(current_mode_, old_mode); 161 EXPECT_EQ(current_mode_, old_mode);
161 current_mode_ = new_mode; 162 current_mode_ = new_mode;
162 delta_x_ = delta_y_ = 0.f; 163 delta_x_ = delta_y_ = 0.f;
163 } 164 }
164 165
165 RenderWidgetHostView* view_; 166 RenderWidgetHostView* view_;
166 OverscrollMode current_mode_; 167 OverscrollMode current_mode_;
167 OverscrollMode completed_mode_; 168 OverscrollMode completed_mode_;
168 float delta_x_; 169 float delta_x_;
169 float delta_y_; 170 float delta_y_;
(...skipping 4597 matching lines...) Expand 10 before | Expand all | Expand 10 after
4767 // There is no composition in the beginning. 4768 // There is no composition in the beginning.
4768 EXPECT_FALSE(has_composition_text()); 4769 EXPECT_FALSE(has_composition_text());
4769 SetHasCompositionTextToTrue(); 4770 SetHasCompositionTextToTrue();
4770 view->ImeCancelComposition(); 4771 view->ImeCancelComposition();
4771 // The composition must have been canceled. 4772 // The composition must have been canceled.
4772 EXPECT_FALSE(has_composition_text()); 4773 EXPECT_FALSE(has_composition_text());
4773 } 4774 }
4774 } 4775 }
4775 4776
4776 } // namespace content 4777 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698