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

Side by Side Diff: chrome/browser/ui/app_list/app_list_controller_browsertest.cc

Issue 2846733004: Optimization: not sending answer server requests for voice queries. (Closed)
Patch Set: Last nits Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_view_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 AppListService* service = AppListService::Get(); 138 AppListService* service = AppListService::Get();
139 ASSERT_TRUE(service); 139 ASSERT_TRUE(service);
140 service->ShowForProfile(browser()->profile()); 140 service->ShowForProfile(browser()->profile());
141 141
142 app_list::AppListModel* model = test::GetAppListModel(service); 142 app_list::AppListModel* model = test::GetAppListModel(service);
143 ASSERT_TRUE(model); 143 ASSERT_TRUE(model);
144 WatchResultsLookingForItem(model->results(), extension->name()); 144 WatchResultsLookingForItem(model->results(), extension->name());
145 145
146 // Ensure a search finds the extension. 146 // Ensure a search finds the extension.
147 EXPECT_FALSE(observed_result_); 147 EXPECT_FALSE(observed_result_);
148 model->search_box()->SetText(base::ASCIIToUTF16("minimal")); 148 model->search_box()->Update(base::ASCIIToUTF16("minimal"), false);
149 EXPECT_TRUE(observed_result_); 149 EXPECT_TRUE(observed_result_);
150 150
151 // Ensure the UI is updated. This is via PostTask in views. 151 // Ensure the UI is updated. This is via PostTask in views.
152 base::RunLoop().RunUntilIdle(); 152 base::RunLoop().RunUntilIdle();
153 153
154 // Now uninstall and ensure this browser test observes it. 154 // Now uninstall and ensure this browser test observes it.
155 UninstallExtension(extension->id()); 155 UninstallExtension(extension->id());
156 156
157 // Allow async AppSearchProvider::UpdateResults to run. 157 // Allow async AppSearchProvider::UpdateResults to run.
158 base::RunLoop().RunUntilIdle(); 158 base::RunLoop().RunUntilIdle();
(...skipping 25 matching lines...) Expand all
184 } 184 }
185 185
186 // Test creating the initial app list in guest mode. 186 // Test creating the initial app list in guest mode.
187 IN_PROC_BROWSER_TEST_F(AppListControllerGuestModeBrowserTest, Incognito) { 187 IN_PROC_BROWSER_TEST_F(AppListControllerGuestModeBrowserTest, Incognito) {
188 AppListService* service = AppListService::Get(); 188 AppListService* service = AppListService::Get();
189 EXPECT_TRUE(service->GetCurrentAppListProfile()); 189 EXPECT_TRUE(service->GetCurrentAppListProfile());
190 190
191 service->ShowForProfile(browser()->profile()); 191 service->ShowForProfile(browser()->profile());
192 EXPECT_EQ(browser()->profile(), service->GetCurrentAppListProfile()); 192 EXPECT_EQ(browser()->profile(), service->GetCurrentAppListProfile());
193 } 193 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698