| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/extension_browsertest.h" | 9 #include "chrome/browser/extensions/extension_browsertest.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 // Flaky on Mac. https://crbug.com/415264 | 164 // Flaky on Mac. https://crbug.com/415264 |
| 165 #if defined(OS_MACOSX) | 165 #if defined(OS_MACOSX) |
| 166 #define MAYBE_UninstallSearchResult DISABLED_UninstallSearchResult | 166 #define MAYBE_UninstallSearchResult DISABLED_UninstallSearchResult |
| 167 #else | 167 #else |
| 168 #define MAYBE_UninstallSearchResult UninstallSearchResult | 168 #define MAYBE_UninstallSearchResult UninstallSearchResult |
| 169 #endif | 169 #endif |
| 170 // Test showing search results, and uninstalling one of them while displayed. | 170 // Test showing search results, and uninstalling one of them while displayed. |
| 171 IN_PROC_BROWSER_TEST_F(AppListControllerSearchResultsBrowserTest, | 171 IN_PROC_BROWSER_TEST_F(AppListControllerSearchResultsBrowserTest, |
| 172 MAYBE_UninstallSearchResult) { | 172 MAYBE_UninstallSearchResult) { |
| 173 // TODO(calamity): This test fails in the experimental app list | |
| 174 // (http://crbug.com/438119). For now, force the test to run in the classic | |
| 175 // app list. | |
| 176 base::CommandLine::ForCurrentProcess()->AppendSwitch( | |
| 177 app_list::switches::kDisableExperimentalAppList); | |
| 178 | |
| 179 base::FilePath test_extension_path; | 173 base::FilePath test_extension_path; |
| 180 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_extension_path)); | 174 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_extension_path)); |
| 181 test_extension_path = test_extension_path.AppendASCII("extensions") | 175 test_extension_path = test_extension_path.AppendASCII("extensions") |
| 182 .AppendASCII("platform_apps") | 176 .AppendASCII("platform_apps") |
| 183 .AppendASCII("minimal"); | 177 .AppendASCII("minimal"); |
| 184 const extensions::Extension* extension = | 178 const extensions::Extension* extension = |
| 185 InstallExtension(test_extension_path, | 179 InstallExtension(test_extension_path, |
| 186 1 /* expected_change: new install */); | 180 1 /* expected_change: new install */); |
| 187 ASSERT_TRUE(extension); | 181 ASSERT_TRUE(extension); |
| 188 | 182 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 205 // Now uninstall and ensure this browser test observes it. | 199 // Now uninstall and ensure this browser test observes it. |
| 206 UninstallExtension(extension->id()); | 200 UninstallExtension(extension->id()); |
| 207 | 201 |
| 208 // Allow async AppSearchProvider::UpdateResults to run. | 202 // Allow async AppSearchProvider::UpdateResults to run. |
| 209 base::RunLoop().RunUntilIdle(); | 203 base::RunLoop().RunUntilIdle(); |
| 210 | 204 |
| 211 EXPECT_FALSE(observed_result_); | 205 EXPECT_FALSE(observed_result_); |
| 212 StopWatchingResults(); | 206 StopWatchingResults(); |
| 213 service->DismissAppList(); | 207 service->DismissAppList(); |
| 214 } | 208 } |
| OLD | NEW |