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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_browsertest.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/ui/webui/extensions/extension_settings_browsertest.h" 5 #include "chrome/browser/ui/webui/extensions/extension_settings_browsertest.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 scoped_refptr<extensions::CrxInstaller> installer( 91 scoped_refptr<extensions::CrxInstaller> installer(
92 extensions::CrxInstaller::Create(service, install_ui.Pass())); 92 extensions::CrxInstaller::Create(service, install_ui.Pass()));
93 installer->set_expected_id(std::string()); 93 installer->set_expected_id(std::string());
94 installer->set_is_gallery_install(false); 94 installer->set_is_gallery_install(false);
95 installer->set_install_source(extensions::Manifest::INTERNAL); 95 installer->set_install_source(extensions::Manifest::INTERNAL);
96 installer->set_install_immediately(true); 96 installer->set_install_immediately(true);
97 installer->set_off_store_install_allow_reason( 97 installer->set_off_store_install_allow_reason(
98 extensions::CrxInstaller::OffStoreInstallAllowedInTest); 98 extensions::CrxInstaller::OffStoreInstallAllowedInTest);
99 99
100 observer_->Watch( 100 observer_->Watch(
101 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 101 extensions::NOTIFICATION_CRX_INSTALLER_DONE,
102 content::Source<extensions::CrxInstaller>(installer.get())); 102 content::Source<extensions::CrxInstaller>(installer.get()));
103 103
104 installer->InstallCrx(crx_path); 104 installer->InstallCrx(crx_path);
105 105
106 observer_->Wait(); 106 observer_->Wait();
107 } 107 }
108 108
109 size_t num_after = service->extensions()->size(); 109 size_t num_after = service->extensions()->size();
110 if (num_before + 1 != num_after) { 110 if (num_before + 1 != num_after) {
111 VLOG(1) << "Num extensions before: " << base::IntToString(num_before) 111 VLOG(1) << "Num extensions before: " << base::IntToString(num_before)
(...skipping 12 matching lines...) Expand all
124 iter != errors->end(); ++iter) 124 iter != errors->end(); ++iter)
125 VLOG(1) << *iter; 125 VLOG(1) << *iter;
126 126
127 return NULL; 127 return NULL;
128 } 128 }
129 129
130 if (!observer_->WaitForExtensionViewsToLoad()) 130 if (!observer_->WaitForExtensionViewsToLoad())
131 return NULL; 131 return NULL;
132 return service->GetExtensionById(last_loaded_extension_id(), false); 132 return service->GetExtensionById(last_loaded_extension_id(), false);
133 } 133 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698