| 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 "apps/launcher.h" | 5 #include "apps/launcher.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 #include "content/public/test/test_utils.h" | 37 #include "content/public/test/test_utils.h" |
| 38 #include "extensions/browser/app_window/app_window.h" | 38 #include "extensions/browser/app_window/app_window.h" |
| 39 #include "extensions/browser/app_window/app_window_registry.h" | 39 #include "extensions/browser/app_window/app_window_registry.h" |
| 40 #include "extensions/browser/app_window/native_app_window.h" | 40 #include "extensions/browser/app_window/native_app_window.h" |
| 41 #include "extensions/browser/event_router.h" | 41 #include "extensions/browser/event_router.h" |
| 42 #include "extensions/browser/extension_prefs.h" | 42 #include "extensions/browser/extension_prefs.h" |
| 43 #include "extensions/browser/extension_system.h" | 43 #include "extensions/browser/extension_system.h" |
| 44 #include "extensions/browser/notification_types.h" | 44 #include "extensions/browser/notification_types.h" |
| 45 #include "extensions/browser/pref_names.h" | 45 #include "extensions/browser/pref_names.h" |
| 46 #include "extensions/common/api/app_runtime.h" | 46 #include "extensions/common/api/app_runtime.h" |
| 47 #include "extensions/test/result_catcher.h" |
| 47 #include "net/test/embedded_test_server/embedded_test_server.h" | 48 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 48 #include "url/gurl.h" | 49 #include "url/gurl.h" |
| 49 | 50 |
| 50 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
| 51 #include "base/memory/scoped_ptr.h" | 52 #include "base/memory/scoped_ptr.h" |
| 52 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" | 53 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" |
| 53 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 54 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
| 54 #include "chromeos/dbus/dbus_thread_manager.h" | 55 #include "chromeos/dbus/dbus_thread_manager.h" |
| 55 #include "chromeos/dbus/fake_power_manager_client.h" | 56 #include "chromeos/dbus/fake_power_manager_client.h" |
| 56 #endif | 57 #endif |
| (...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 } | 1080 } |
| 1080 } | 1081 } |
| 1081 | 1082 |
| 1082 // Fails on Win7. http://crbug.com/171450 | 1083 // Fails on Win7. http://crbug.com/171450 |
| 1083 #if defined(OS_WIN) | 1084 #if defined(OS_WIN) |
| 1084 #define MAYBE_Messaging DISABLED_Messaging | 1085 #define MAYBE_Messaging DISABLED_Messaging |
| 1085 #else | 1086 #else |
| 1086 #define MAYBE_Messaging Messaging | 1087 #define MAYBE_Messaging Messaging |
| 1087 #endif | 1088 #endif |
| 1088 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_Messaging) { | 1089 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_Messaging) { |
| 1089 ExtensionApiTest::ResultCatcher result_catcher; | 1090 ResultCatcher result_catcher; |
| 1090 LoadAndLaunchPlatformApp("messaging/app2", "Ready"); | 1091 LoadAndLaunchPlatformApp("messaging/app2", "Ready"); |
| 1091 LoadAndLaunchPlatformApp("messaging/app1", "Launched"); | 1092 LoadAndLaunchPlatformApp("messaging/app1", "Launched"); |
| 1092 EXPECT_TRUE(result_catcher.GetNextResult()); | 1093 EXPECT_TRUE(result_catcher.GetNextResult()); |
| 1093 } | 1094 } |
| 1094 | 1095 |
| 1095 // TODO(linux_aura) http://crbug.com/163931 | 1096 // TODO(linux_aura) http://crbug.com/163931 |
| 1096 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) | 1097 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) |
| 1097 #define MAYBE_WebContentsHasFocus DISABLED_WebContentsHasFocus | 1098 #define MAYBE_WebContentsHasFocus DISABLED_WebContentsHasFocus |
| 1098 #else | 1099 #else |
| 1099 // This test depends on focus and so needs to be in interactive_ui_tests. | 1100 // This test depends on focus and so needs to be in interactive_ui_tests. |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 // data are not installed and then install them. The application will then be | 1296 // data are not installed and then install them. The application will then be |
| 1296 // uninstalled and the same process will be repeated. | 1297 // uninstalled and the same process will be repeated. |
| 1297 std::string extension_id; | 1298 std::string extension_id; |
| 1298 | 1299 |
| 1299 { | 1300 { |
| 1300 const Extension* extension = | 1301 const Extension* extension = |
| 1301 LoadAndLaunchPlatformApp("reinstall_data_cleanup", "Launched"); | 1302 LoadAndLaunchPlatformApp("reinstall_data_cleanup", "Launched"); |
| 1302 ASSERT_TRUE(extension); | 1303 ASSERT_TRUE(extension); |
| 1303 extension_id = extension->id(); | 1304 extension_id = extension->id(); |
| 1304 | 1305 |
| 1305 ExtensionApiTest::ResultCatcher result_catcher; | 1306 ResultCatcher result_catcher; |
| 1306 EXPECT_TRUE(result_catcher.GetNextResult()); | 1307 EXPECT_TRUE(result_catcher.GetNextResult()); |
| 1307 } | 1308 } |
| 1308 | 1309 |
| 1309 UninstallExtension(extension_id); | 1310 UninstallExtension(extension_id); |
| 1310 content::RunAllPendingInMessageLoop(); | 1311 content::RunAllPendingInMessageLoop(); |
| 1311 | 1312 |
| 1312 { | 1313 { |
| 1313 const Extension* extension = | 1314 const Extension* extension = |
| 1314 LoadAndLaunchPlatformApp("reinstall_data_cleanup", "Launched"); | 1315 LoadAndLaunchPlatformApp("reinstall_data_cleanup", "Launched"); |
| 1315 ASSERT_TRUE(extension); | 1316 ASSERT_TRUE(extension); |
| 1316 ASSERT_EQ(extension_id, extension->id()); | 1317 ASSERT_EQ(extension_id, extension->id()); |
| 1317 | 1318 |
| 1318 ExtensionApiTest::ResultCatcher result_catcher; | 1319 ResultCatcher result_catcher; |
| 1319 EXPECT_TRUE(result_catcher.GetNextResult()); | 1320 EXPECT_TRUE(result_catcher.GetNextResult()); |
| 1320 } | 1321 } |
| 1321 } | 1322 } |
| 1322 | 1323 |
| 1323 } // namespace extensions | 1324 } // namespace extensions |
| OLD | NEW |