Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: chrome/browser/extensions/external_provider_impl_chromeos_unittest.cc

Issue 425303002: Move extension notifications to extensions/browser/notification_types.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: (extension-notifications) rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 }; 92 };
93 93
94 } // namespace 94 } // namespace
95 95
96 // Normal mode, external app should be installed. 96 // Normal mode, external app should be installed.
97 TEST_F(ExternalProviderImplChromeOSTest, Normal) { 97 TEST_F(ExternalProviderImplChromeOSTest, Normal) {
98 InitServiceWithExternalProviders(); 98 InitServiceWithExternalProviders();
99 99
100 service_->CheckForExternalUpdates(); 100 service_->CheckForExternalUpdates();
101 content::WindowedNotificationObserver( 101 content::WindowedNotificationObserver(
102 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 102 extensions::NOTIFICATION_CRX_INSTALLER_DONE,
103 content::NotificationService::AllSources()).Wait(); 103 content::NotificationService::AllSources()).Wait();
104 104
105 EXPECT_TRUE(service_->GetInstalledExtension(kExternalAppId)); 105 EXPECT_TRUE(service_->GetInstalledExtension(kExternalAppId));
106 } 106 }
107 107
108 // App mode, no external app should be installed. 108 // App mode, no external app should be installed.
109 TEST_F(ExternalProviderImplChromeOSTest, AppMode) { 109 TEST_F(ExternalProviderImplChromeOSTest, AppMode) {
110 CommandLine* command = CommandLine::ForCurrentProcess(); 110 CommandLine* command = CommandLine::ForCurrentProcess();
111 command->AppendSwitchASCII(switches::kForceAppMode, std::string()); 111 command->AppendSwitchASCII(switches::kForceAppMode, std::string());
112 command->AppendSwitchASCII(switches::kAppId, std::string("app_id")); 112 command->AppendSwitchASCII(switches::kAppId, std::string("app_id"));
113 113
114 InitServiceWithExternalProviders(); 114 InitServiceWithExternalProviders();
115 115
116 service_->CheckForExternalUpdates(); 116 service_->CheckForExternalUpdates();
117 base::RunLoop().RunUntilIdle(); 117 base::RunLoop().RunUntilIdle();
118 118
119 EXPECT_FALSE(service_->GetInstalledExtension(kExternalAppId)); 119 EXPECT_FALSE(service_->GetInstalledExtension(kExternalAppId));
120 } 120 }
121 121
122 } // namespace extensions 122 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_install_manager.cc ('k') | chrome/browser/extensions/gtalk_extension_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698