summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-10 17:45:48 +0000
committerrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-10 17:45:48 +0000
commit32dd0c1da1a102787712f2741b79cc0f0a83f0d3 (patch)
treea869432399712a280e9db5309fb013751402ae5d /chrome/browser
parentef525cc4860e4f4868da898d28b1a23b5a695b53 (diff)
downloadchromium_src-32dd0c1da1a102787712f2741b79cc0f0a83f0d3.zip
chromium_src-32dd0c1da1a102787712f2741b79cc0f0a83f0d3.tar.gz
chromium_src-32dd0c1da1a102787712f2741b79cc0f0a83f0d3.tar.bz2
Broke my own unittest. The expected behavior when calling
clearResults: is to not delete the existing find text, which seems strange but matches the other platforms. BUG=None TEST=Fixes the build Review URL: http://codereview.chromium.org/149463 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20381 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-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) {