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

Side by Side Diff: ios/chrome/browser/ui/omnibox_perftest.mm

Issue 2863303002: Fixes a DCHECK in tools_menu_button_observer_bridge during tests (Closed)
Patch Set: fixed component_unittests Created 3 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
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 #import <UIKit/UIKit.h> 5 #import <UIKit/UIKit.h>
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #import "base/test/ios/wait_util.h" 10 #import "base/test/ios/wait_util.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 std::unique_ptr<WebStateList> web_state_list_; 208 std::unique_ptr<WebStateList> web_state_list_;
209 std::unique_ptr<ToolbarModelDelegateIOS> toolbar_model_delegate_; 209 std::unique_ptr<ToolbarModelDelegateIOS> toolbar_model_delegate_;
210 std::unique_ptr<ToolbarModelIOS> toolbar_model_ios_; 210 std::unique_ptr<ToolbarModelIOS> toolbar_model_ios_;
211 WebToolbarController* toolbar_; 211 WebToolbarController* toolbar_;
212 UIWindow* window_; 212 UIWindow* window_;
213 KeyboardAppearanceListener* keyboard_listener_; 213 KeyboardAppearanceListener* keyboard_listener_;
214 }; 214 };
215 215
216 // Measures the amount of time it takes the Omnibox text field to activate 216 // Measures the amount of time it takes the Omnibox text field to activate
217 // the on-screen keyboard. 217 // the on-screen keyboard.
218 // TODO(crbug.com/717300): Test disabled because of a DCHECK in Reading List. 218 TEST_F(OmniboxPerfTest, TestTextFieldDidBeginEditing) {
219 TEST_F(OmniboxPerfTest, DISABLED_TestTextFieldDidBeginEditing) {
220 LogPerfTiming("Keyboard preload", PreLoadKeyboard()); 219 LogPerfTiming("Keyboard preload", PreLoadKeyboard());
221 OmniboxTextFieldIOS* textField = (OmniboxTextFieldIOS*)FindViewByClass( 220 OmniboxTextFieldIOS* textField = (OmniboxTextFieldIOS*)FindViewByClass(
222 [toolbar_ view], [OmniboxTextFieldIOS class]); 221 [toolbar_ view], [OmniboxTextFieldIOS class]);
223 222
224 // Time how long it takes to "focus" on omnibox. 223 // Time how long it takes to "focus" on omnibox.
225 RepeatTimedRuns("Begin editing", 224 RepeatTimedRuns("Begin editing",
226 ^base::TimeDelta(int index) { 225 ^base::TimeDelta(int index) {
227 return EnableKeyboard(textField); 226 return EnableKeyboard(textField);
228 }, 227 },
229 ^() { 228 ^() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 271 }
273 NSLog(@"%2d: %@", index, logMessage); 272 NSLog(@"%2d: %@", index, logMessage);
274 return elapsed; 273 return elapsed;
275 }, 274 },
276 ^() { 275 ^() {
277 [textField setText:@""]; 276 [textField setText:@""];
278 DisableKeyboard(textField); 277 DisableKeyboard(textField);
279 }); 278 });
280 } 279 }
281 } 280 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698