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

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

Issue 246009: [Mac] Support undo in the omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/autocomplete_text_field_unittest.mm
===================================================================
--- chrome/browser/cocoa/autocomplete_text_field_unittest.mm (revision 31782)
+++ chrome/browser/cocoa/autocomplete_text_field_unittest.mm (working copy)
@@ -671,6 +671,17 @@
EXPECT_TRUE([undoManager canUndo]);
[field_ setAttributedStringValue:attributedString];
EXPECT_TRUE([undoManager canUndo]);
+
+ // Verify that calling -clearUndoChain clears the undo chain.
+ [field_ clearUndoChain];
+ EXPECT_FALSE([undoManager canUndo]);
}
+TEST_F(AutocompleteTextFieldTest, EditorGetsCorrectUndoManager) {
+ cocoa_helper_.makeFirstResponder(field_);
+
+ NSTextView* editor = static_cast<NSTextView*>([field_ currentEditor]);
+ EXPECT_TRUE(editor);
+ EXPECT_EQ([field_ undoManagerForTextView:editor], [editor undoManager]);
+}
} // namespace
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698