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

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: delete unnecessary implementation of Shutdown() 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
« no previous file with comments | « components/reading_list/ios/reading_list_model_bridge_observer.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 std::unique_ptr<WebStateList> web_state_list_; 215 std::unique_ptr<WebStateList> web_state_list_;
216 std::unique_ptr<ToolbarModelDelegateIOS> toolbar_model_delegate_; 216 std::unique_ptr<ToolbarModelDelegateIOS> toolbar_model_delegate_;
217 std::unique_ptr<ToolbarModelIOS> toolbar_model_ios_; 217 std::unique_ptr<ToolbarModelIOS> toolbar_model_ios_;
218 WebToolbarController* toolbar_; 218 WebToolbarController* toolbar_;
219 UIWindow* window_; 219 UIWindow* window_;
220 KeyboardAppearanceListener* keyboard_listener_; 220 KeyboardAppearanceListener* keyboard_listener_;
221 }; 221 };
222 222
223 // Measures the amount of time it takes the Omnibox text field to activate 223 // Measures the amount of time it takes the Omnibox text field to activate
224 // the on-screen keyboard. 224 // the on-screen keyboard.
225 // TODO(crbug.com/717300): Test disabled because of a DCHECK in Reading List. 225 TEST_F(OmniboxPerfTest, TestTextFieldDidBeginEditing) {
226 TEST_F(OmniboxPerfTest, DISABLED_TestTextFieldDidBeginEditing) {
227 LogPerfTiming("Keyboard preload", PreLoadKeyboard()); 226 LogPerfTiming("Keyboard preload", PreLoadKeyboard());
228 OmniboxTextFieldIOS* textField = (OmniboxTextFieldIOS*)FindViewByClass( 227 OmniboxTextFieldIOS* textField = (OmniboxTextFieldIOS*)FindViewByClass(
229 [toolbar_ view], [OmniboxTextFieldIOS class]); 228 [toolbar_ view], [OmniboxTextFieldIOS class]);
230 229
231 // Time how long it takes to "focus" on omnibox. 230 // Time how long it takes to "focus" on omnibox.
232 RepeatTimedRuns("Begin editing", 231 RepeatTimedRuns("Begin editing",
233 ^base::TimeDelta(int index) { 232 ^base::TimeDelta(int index) {
234 return EnableKeyboard(textField); 233 return EnableKeyboard(textField);
235 }, 234 },
236 ^() { 235 ^() {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 } 276 }
278 NSLog(@"%2d: %@", index, logMessage); 277 NSLog(@"%2d: %@", index, logMessage);
279 return elapsed; 278 return elapsed;
280 }, 279 },
281 ^() { 280 ^() {
282 [textField setText:@""]; 281 [textField setText:@""];
283 DisableKeyboard(textField); 282 DisableKeyboard(textField);
284 }); 283 });
285 } 284 }
286 } 285 }
OLDNEW
« no previous file with comments | « components/reading_list/ios/reading_list_model_bridge_observer.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698