| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |