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/extensions/external_provider_impl.h" | 5 #include "chrome/browser/extensions/external_provider_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/prefs/testing_pref_service.h" | 9 #include "base/prefs/testing_pref_service.h" |
10 #include "base/test/scoped_path_override.h" | 10 #include "base/test/scoped_path_override.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 service_->CheckForExternalUpdates(); | 90 service_->CheckForExternalUpdates(); |
91 content::WindowedNotificationObserver( | 91 content::WindowedNotificationObserver( |
92 extensions::NOTIFICATION_CRX_INSTALLER_DONE, | 92 extensions::NOTIFICATION_CRX_INSTALLER_DONE, |
93 content::NotificationService::AllSources()).Wait(); | 93 content::NotificationService::AllSources()).Wait(); |
94 | 94 |
95 EXPECT_TRUE(service_->GetInstalledExtension(kExternalAppId)); | 95 EXPECT_TRUE(service_->GetInstalledExtension(kExternalAppId)); |
96 } | 96 } |
97 | 97 |
98 // App mode, no external app should be installed. | 98 // App mode, no external app should be installed. |
99 TEST_F(ExternalProviderImplChromeOSTest, AppMode) { | 99 TEST_F(ExternalProviderImplChromeOSTest, AppMode) { |
100 CommandLine* command = CommandLine::ForCurrentProcess(); | 100 base::CommandLine* command = base::CommandLine::ForCurrentProcess(); |
101 command->AppendSwitchASCII(switches::kForceAppMode, std::string()); | 101 command->AppendSwitchASCII(switches::kForceAppMode, std::string()); |
102 command->AppendSwitchASCII(switches::kAppId, std::string("app_id")); | 102 command->AppendSwitchASCII(switches::kAppId, std::string("app_id")); |
103 | 103 |
104 InitServiceWithExternalProviders(); | 104 InitServiceWithExternalProviders(); |
105 | 105 |
106 service_->CheckForExternalUpdates(); | 106 service_->CheckForExternalUpdates(); |
107 base::RunLoop().RunUntilIdle(); | 107 base::RunLoop().RunUntilIdle(); |
108 | 108 |
109 EXPECT_FALSE(service_->GetInstalledExtension(kExternalAppId)); | 109 EXPECT_FALSE(service_->GetInstalledExtension(kExternalAppId)); |
110 } | 110 } |
111 | 111 |
112 } // namespace extensions | 112 } // namespace extensions |
OLD | NEW |