| 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/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 protected: | 61 protected: |
| 62 Profile* profile2_; | 62 Profile* profile2_; |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 DISALLOW_COPY_AND_ASSIGN(AppListControllerBrowserTest); | 65 DISALLOW_COPY_AND_ASSIGN(AppListControllerBrowserTest); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 #if !defined(OS_LINUX) |
| 68 AppListService* GetAppListService() { | 69 AppListService* GetAppListService() { |
| 69 // TODO(tapted): Consider testing ash explicitly on the win-ash trybot. | 70 // TODO(tapted): Consider testing ash explicitly on the win-ash trybot. |
| 70 return AppListService::Get(chrome::GetActiveDesktop()); | 71 return AppListService::Get(chrome::GetActiveDesktop()); |
| 71 } | 72 } |
| 72 | 73 |
| 73 // Test the CreateNewWindow function of the controller delegate. | 74 // Test the CreateNewWindow function of the controller delegate. |
| 74 // TODO(mgiuca): Enable on Linux when supported. | 75 // TODO(mgiuca): Enable on Linux when supported. |
| 75 #if !defined(OS_LINUX) | |
| 76 IN_PROC_BROWSER_TEST_F(AppListControllerBrowserTest, CreateNewWindow) { | 76 IN_PROC_BROWSER_TEST_F(AppListControllerBrowserTest, CreateNewWindow) { |
| 77 const chrome::HostDesktopType desktop = chrome::GetActiveDesktop(); | 77 const chrome::HostDesktopType desktop = chrome::GetActiveDesktop(); |
| 78 AppListService* service = GetAppListService(); | 78 AppListService* service = GetAppListService(); |
| 79 scoped_ptr<AppListControllerDelegate> controller( | 79 scoped_ptr<AppListControllerDelegate> controller( |
| 80 service->CreateControllerDelegate()); | 80 service->CreateControllerDelegate()); |
| 81 ASSERT_TRUE(controller); | 81 ASSERT_TRUE(controller); |
| 82 | 82 |
| 83 EXPECT_EQ(1U, chrome::GetBrowserCount(browser()->profile(), desktop)); | 83 EXPECT_EQ(1U, chrome::GetBrowserCount(browser()->profile(), desktop)); |
| 84 EXPECT_EQ(0U, chrome::GetBrowserCount( | 84 EXPECT_EQ(0U, chrome::GetBrowserCount( |
| 85 browser()->profile()->GetOffTheRecordProfile(), desktop)); | 85 browser()->profile()->GetOffTheRecordProfile(), desktop)); |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 // be removed from the model. | 332 // be removed from the model. |
| 333 EXPECT_TRUE(observed_result_); | 333 EXPECT_TRUE(observed_result_); |
| 334 base::RunLoop().RunUntilIdle(); | 334 base::RunLoop().RunUntilIdle(); |
| 335 EXPECT_FALSE(observed_result_); | 335 EXPECT_FALSE(observed_result_); |
| 336 StopWatchingResults(); | 336 StopWatchingResults(); |
| 337 service->DismissAppList(); | 337 service->DismissAppList(); |
| 338 } | 338 } |
| 339 #endif // !defined(OS_LINUX) | 339 #endif // !defined(OS_LINUX) |
| 340 | 340 |
| 341 } // namespace | 341 } // namespace |
| OLD | NEW |