| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "apps/shell/test/shell_test.h" | |
| 6 | |
| 7 #include "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 6 #include "base/logging.h" |
| 9 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 11 #include "content/public/browser/notification_service.h" | 9 #include "content/public/browser/notification_service.h" |
| 12 #include "content/public/test/test_utils.h" | 10 #include "content/public/test/test_utils.h" |
| 13 #include "extensions/common/extension_paths.h" | 11 #include "extensions/common/extension_paths.h" |
| 12 #include "extensions/shell/test/shell_test.h" |
| 14 | 13 |
| 15 namespace apps { | 14 namespace extensions { |
| 16 | 15 |
| 17 // Test that we can open an app window and wait for it to load. | 16 // Test that we can open an app window and wait for it to load. |
| 18 IN_PROC_BROWSER_TEST_F(AppShellTest, Basic) { | 17 IN_PROC_BROWSER_TEST_F(AppShellTest, Basic) { |
| 19 base::FilePath test_data_dir; | 18 base::FilePath test_data_dir; |
| 20 | 19 |
| 21 content::WindowedNotificationObserver test_pass_observer( | 20 content::WindowedNotificationObserver test_pass_observer( |
| 22 chrome::NOTIFICATION_EXTENSION_TEST_PASSED, | 21 chrome::NOTIFICATION_EXTENSION_TEST_PASSED, |
| 23 content::NotificationService::AllSources()); | 22 content::NotificationService::AllSources()); |
| 24 | 23 |
| 25 PathService::Get(extensions::DIR_TEST_DATA, &test_data_dir); | 24 PathService::Get(extensions::DIR_TEST_DATA, &test_data_dir); |
| 26 test_data_dir = test_data_dir.AppendASCII("platform_app"); | 25 test_data_dir = test_data_dir.AppendASCII("platform_app"); |
| 27 LoadAndLaunchApp(test_data_dir); | 26 LoadAndLaunchApp(test_data_dir); |
| 28 | 27 |
| 29 test_pass_observer.Wait(); | 28 test_pass_observer.Wait(); |
| 30 } | 29 } |
| 31 | 30 |
| 32 } // namespace apps | 31 } // namespace extensions |
| OLD | NEW |