summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/cocoa/find_bar_cocoa_controller_unittest.mm11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/find_bar_cocoa_controller_unittest.mm b/chrome/browser/cocoa/find_bar_cocoa_controller_unittest.mm
index 48912bd..f2c68fa 100644
--- a/chrome/browser/cocoa/find_bar_cocoa_controller_unittest.mm
+++ b/chrome/browser/cocoa/find_bar_cocoa_controller_unittest.mm
@@ -79,11 +79,16 @@ TEST_F(FindBarCocoaControllerTest, SetFindText) {
NSOrderedSame,
[[findText stringValue] compare:base::SysUTF8ToNSString(kFindText)]);
- // Clear the find text. |details| isn't used by our implementation
- // of clearResults, so it's ok to pass in an empty |details|.
+ // Call clearResults, which doesn't actually clear the find text but
+ // simply sets it back to what it was before. This is silly, but
+ // matches the behavior on other platforms. |details| isn't used by
+ // our implementation of clearResults, so it's ok to pass in an
+ // empty |details|.
FindNotificationDetails details;
[controller_ clearResults:details];
- EXPECT_EQ(0U, [[findText stringValue] length]);
+ EXPECT_EQ(
+ NSOrderedSame,
+ [[findText stringValue] compare:base::SysUTF8ToNSString(kFindText)]);
}
TEST_F(FindBarCocoaControllerTest, ResultLabelUpdatesCorrectly) {