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/app_window.h" | 5 #include "apps/app_window.h" |
6 #include "apps/app_window_registry.h" | 6 #include "apps/app_window_registry.h" |
7 #include "apps/launcher.h" | 7 #include "apps/launcher.h" |
8 #include "apps/ui/native_app_window.h" | 8 #include "apps/ui/native_app_window.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "chrome/test/base/ui_test_utils.h" | 34 #include "chrome/test/base/ui_test_utils.h" |
35 #include "components/pref_registry/pref_registry_syncable.h" | 35 #include "components/pref_registry/pref_registry_syncable.h" |
36 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 36 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
37 #include "content/public/browser/devtools_agent_host.h" | 37 #include "content/public/browser/devtools_agent_host.h" |
38 #include "content/public/browser/render_process_host.h" | 38 #include "content/public/browser/render_process_host.h" |
39 #include "content/public/browser/render_widget_host_view.h" | 39 #include "content/public/browser/render_widget_host_view.h" |
40 #include "content/public/test/test_utils.h" | 40 #include "content/public/test/test_utils.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/pref_names.h" | 45 #include "extensions/browser/pref_names.h" |
45 #include "extensions/common/api/app_runtime.h" | 46 #include "extensions/common/api/app_runtime.h" |
46 #include "net/test/embedded_test_server/embedded_test_server.h" | 47 #include "net/test/embedded_test_server/embedded_test_server.h" |
47 #include "url/gurl.h" | 48 #include "url/gurl.h" |
48 | 49 |
49 #if defined(OS_CHROMEOS) | 50 #if defined(OS_CHROMEOS) |
50 #include "base/memory/scoped_ptr.h" | 51 #include "base/memory/scoped_ptr.h" |
51 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" | 52 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" |
52 #include "chrome/browser/chromeos/login/users/user_manager.h" | 53 #include "chrome/browser/chromeos/login/users/user_manager.h" |
53 #include "chromeos/dbus/dbus_thread_manager.h" | 54 #include "chromeos/dbus/dbus_thread_manager.h" |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 } | 932 } |
932 | 933 |
933 namespace { | 934 namespace { |
934 | 935 |
935 // Simple observer to check for | 936 // Simple observer to check for |
936 // NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED events to ensure | 937 // NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED events to ensure |
937 // installation does or does not occur in certain scenarios. | 938 // installation does or does not occur in certain scenarios. |
938 class CheckExtensionInstalledObserver : public content::NotificationObserver { | 939 class CheckExtensionInstalledObserver : public content::NotificationObserver { |
939 public: | 940 public: |
940 CheckExtensionInstalledObserver() : seen_(false) { | 941 CheckExtensionInstalledObserver() : seen_(false) { |
941 registrar_.Add(this, | 942 registrar_.Add( |
942 chrome::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED, | 943 this, |
943 content::NotificationService::AllSources()); | 944 extensions::NOTIFICATION_EXTENSION_WILL_BE_INSTALLED_DEPRECATED, |
| 945 content::NotificationService::AllSources()); |
944 } | 946 } |
945 | 947 |
946 bool seen() const { | 948 bool seen() const { |
947 return seen_; | 949 return seen_; |
948 }; | 950 }; |
949 | 951 |
950 // NotificationObserver: | 952 // NotificationObserver: |
951 virtual void Observe(int type, | 953 virtual void Observe(int type, |
952 const content::NotificationSource& source, | 954 const content::NotificationSource& source, |
953 const content::NotificationDetails& details) OVERRIDE { | 955 const content::NotificationDetails& details) OVERRIDE { |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1291 LoadAndLaunchPlatformApp("reinstall_data_cleanup", "Launched"); | 1293 LoadAndLaunchPlatformApp("reinstall_data_cleanup", "Launched"); |
1292 ASSERT_TRUE(extension); | 1294 ASSERT_TRUE(extension); |
1293 ASSERT_EQ(extension_id, extension->id()); | 1295 ASSERT_EQ(extension_id, extension->id()); |
1294 | 1296 |
1295 ExtensionApiTest::ResultCatcher result_catcher; | 1297 ExtensionApiTest::ResultCatcher result_catcher; |
1296 EXPECT_TRUE(result_catcher.GetNextResult()); | 1298 EXPECT_TRUE(result_catcher.GetNextResult()); |
1297 } | 1299 } |
1298 } | 1300 } |
1299 | 1301 |
1300 } // namespace extensions | 1302 } // namespace extensions |
OLD | NEW |