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

Unified Diff: ui/app_list/cocoa/apps_search_box_controller_unittest.mm

Issue 23072036: Adds an integration test for uninstalling app list search results. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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
« no previous file with comments | « ui/app_list/cocoa/apps_search_box_controller.mm ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/cocoa/apps_search_box_controller_unittest.mm
diff --git a/ui/app_list/cocoa/apps_search_box_controller_unittest.mm b/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
index eb3898219b2e65b6ad15968b16aa3d59a4091c9c..c9d079758a0377f2e57b670858accbbd9bc440b2 100644
--- a/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
+++ b/ui/app_list/cocoa/apps_search_box_controller_unittest.mm
@@ -117,24 +117,26 @@ TEST_F(AppsSearchBoxControllerTest, SearchBoxModel) {
model->SetText(search_text);
EXPECT_NSEQ(base::SysUTF16ToNSString(search_text),
[[apps_search_box_controller_ searchTextField] stringValue]);
- // Updates coming via the model should not notify the delegate.
- EXPECT_EQ(0, [delegate_ textChangeCount]);
+ // Updates coming via the model should notify the delegate.
+ EXPECT_EQ(1, [delegate_ textChangeCount]);
// Updates from the view should update the model and notify the delegate.
[apps_search_box_controller_ clearSearch];
EXPECT_EQ(base::string16(), model->text());
EXPECT_NSEQ([NSString string],
[[apps_search_box_controller_ searchTextField] stringValue]);
- EXPECT_EQ(1, [delegate_ textChangeCount]);
+ EXPECT_EQ(2, [delegate_ textChangeCount]);
- // Test pressing escape clears the search.
+ // Test pressing escape clears the search. First add some text.
model->SetText(search_text);
+ EXPECT_EQ(3, [delegate_ textChangeCount]);
+
EXPECT_NSEQ(base::SysUTF16ToNSString(search_text),
[[apps_search_box_controller_ searchTextField] stringValue]);
SimulateKeyAction(@selector(complete:));
EXPECT_NSEQ([NSString string],
[[apps_search_box_controller_ searchTextField] stringValue]);
- EXPECT_EQ(2, [delegate_ textChangeCount]);
+ EXPECT_EQ(4, [delegate_ textChangeCount]);
}
// Test the popup menu items.
« no previous file with comments | « ui/app_list/cocoa/apps_search_box_controller.mm ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698