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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm

Issue 6602070: Port autocomplete_edit_view_browsertest.cc to Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PrimarySelection test. Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm
index a86e8ce0e66cae03df7b8253167275f0049c8d7b..1aa65ec2be68f4b5d5b1f93fc6a30f14aa958ab6 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_unittest.mm
@@ -331,6 +331,7 @@ TEST_F(AutocompleteTextFieldObserverTest, ResetFieldEditorContinuesEditing) {
// This should begin editing and indicate a change.
EXPECT_CALL(field_observer_, OnDidBeginEditing());
+ EXPECT_CALL(field_observer_, OnBeforeChange());
EXPECT_CALL(field_observer_, OnDidChange());
[editor shouldChangeTextInRange:NSMakeRange(0, 0) replacementString:@""];
[editor didChangeText];
@@ -749,11 +750,13 @@ TEST_F(AutocompleteTextFieldObserverTest, SendsEditingMessages) {
// This should begin editing and indicate a change.
EXPECT_CALL(field_observer_, OnDidBeginEditing());
+ EXPECT_CALL(field_observer_, OnBeforeChange());
EXPECT_CALL(field_observer_, OnDidChange());
[editor shouldChangeTextInRange:NSMakeRange(0, 0) replacementString:@""];
[editor didChangeText];
// Further changes don't send the begin message.
+ EXPECT_CALL(field_observer_, OnBeforeChange());
EXPECT_CALL(field_observer_, OnDidChange());
[editor shouldChangeTextInRange:NSMakeRange(0, 0) replacementString:@""];
[editor didChangeText];

Powered by Google App Engine
This is Rietveld 408576698