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 "chrome/browser/ui/app_list/app_list_service.h" | 5 #include "chrome/browser/ui/app_list/app_list_service.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/json/json_file_value_serializer.h" | 8 #include "base/json/json_file_value_serializer.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 163 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
164 command_line->AppendSwitch(switches::kShowAppList); | 164 command_line->AppendSwitch(switches::kShowAppList); |
165 } | 165 } |
166 | 166 |
167 private: | 167 private: |
168 DISALLOW_COPY_AND_ASSIGN(ShowAppListInteractiveTest); | 168 DISALLOW_COPY_AND_ASSIGN(ShowAppListInteractiveTest); |
169 }; | 169 }; |
170 | 170 |
171 // Test showing the app list using the command line switch. | 171 // Test showing the app list using the command line switch. |
172 IN_PROC_BROWSER_TEST_F(ShowAppListInteractiveTest, ShowAppListFlag) { | 172 #if defined(OS_CHROMEOS) |
| 173 // http://crbug.com/396499 |
| 174 #define MAYBE_ShowAppListFlag DISABLED_ShowAppListFlag |
| 175 #else |
| 176 #define MAYBE_ShowAppListFlag ShowAppListFlag |
| 177 #endif |
| 178 IN_PROC_BROWSER_TEST_F(ShowAppListInteractiveTest, MAYBE_ShowAppListFlag) { |
173 AppListService* service = test::GetAppListService(); | 179 AppListService* service = test::GetAppListService(); |
174 // The app list should already be shown because we passed | 180 // The app list should already be shown because we passed |
175 // switches::kShowAppList. | 181 // switches::kShowAppList. |
176 EXPECT_TRUE(service->IsAppListVisible()); | 182 EXPECT_TRUE(service->IsAppListVisible()); |
177 | 183 |
178 // Create a browser to prevent shutdown when we dismiss the app list. We | 184 // Create a browser to prevent shutdown when we dismiss the app list. We |
179 // need to do this because switches::kShowAppList suppresses the creation of | 185 // need to do this because switches::kShowAppList suppresses the creation of |
180 // any browsers. | 186 // any browsers. |
181 Profile* profile = service->GetCurrentAppListProfile(); | 187 Profile* profile = service->GetCurrentAppListProfile(); |
182 CreateBrowser(profile); | 188 CreateBrowser(profile); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 253 |
248 // Create a browser for the Default profile. This stops MaybeTeminate being | 254 // Create a browser for the Default profile. This stops MaybeTeminate being |
249 // called when the app list window is dismissed. Use the last used browser | 255 // called when the app list window is dismissed. Use the last used browser |
250 // profile to verify that it is different and causes ProfileManager to load a | 256 // profile to verify that it is different and causes ProfileManager to load a |
251 // new profile. | 257 // new profile. |
252 CreateBrowser(profile_manager->GetLastUsedProfile()); | 258 CreateBrowser(profile_manager->GetLastUsedProfile()); |
253 EXPECT_EQ(2u, profile_manager->GetNumberOfProfiles()); | 259 EXPECT_EQ(2u, profile_manager->GetNumberOfProfiles()); |
254 | 260 |
255 service->DismissAppList(); | 261 service->DismissAppList(); |
256 } | 262 } |
OLD | NEW |