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

Side by Side Diff: chrome/browser/infobars/infobars_browsertest.cc

Issue 242613004: Replace NOTIFICATION_EXTENSION_LOADED to NOTIFICATION_EXTENSION_LOADED_DEPRECATED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/chrome_notification_types.h" 6 #include "chrome/browser/chrome_notification_types.h"
7 #include "chrome/browser/extensions/crx_installer.h" 7 #include "chrome/browser/extensions/crx_installer.h"
8 #include "chrome/browser/extensions/extension_install_prompt.h" 8 #include "chrome/browser/extensions/extension_install_prompt.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 void InstallExtension(const char* filename) { 32 void InstallExtension(const char* filename) {
33 base::FilePath path = ui_test_utils::GetTestFilePath( 33 base::FilePath path = ui_test_utils::GetTestFilePath(
34 base::FilePath().AppendASCII("extensions"), 34 base::FilePath().AppendASCII("extensions"),
35 base::FilePath().AppendASCII(filename)); 35 base::FilePath().AppendASCII(filename));
36 Profile* profile = browser()->profile(); 36 Profile* profile = browser()->profile();
37 ExtensionService* service = profile->GetExtensionService(); 37 ExtensionService* service = profile->GetExtensionService();
38 38
39 content::WindowedNotificationObserver observer( 39 content::WindowedNotificationObserver observer(
40 chrome::NOTIFICATION_EXTENSION_LOADED, 40 chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
41 content::NotificationService::AllSources()); 41 content::NotificationService::AllSources());
42 42
43 scoped_ptr<ExtensionInstallPrompt> client(new ExtensionInstallPrompt( 43 scoped_ptr<ExtensionInstallPrompt> client(new ExtensionInstallPrompt(
44 browser()->tab_strip_model()->GetActiveWebContents())); 44 browser()->tab_strip_model()->GetActiveWebContents()));
45 scoped_refptr<extensions::CrxInstaller> installer( 45 scoped_refptr<extensions::CrxInstaller> installer(
46 extensions::CrxInstaller::Create(service, client.Pass())); 46 extensions::CrxInstaller::Create(service, client.Pass()));
47 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION); 47 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION);
48 installer->InstallCrx(path); 48 installer->InstallCrx(path);
49 49
50 observer.Wait(); 50 observer.Wait();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 content::WindowedNotificationObserver infobar_removed_2( 89 content::WindowedNotificationObserver infobar_removed_2(
90 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 90 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
91 content::NotificationService::AllSources()); 91 content::NotificationService::AllSources());
92 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); 92 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme();
93 infobar_removed_2.Wait(); 93 infobar_removed_2.Wait();
94 EXPECT_EQ(0u, 94 EXPECT_EQ(0u,
95 InfoBarService::FromWebContents( 95 InfoBarService::FromWebContents(
96 browser()->tab_strip_model()->GetActiveWebContents())-> 96 browser()->tab_strip_model()->GetActiveWebContents())->
97 infobar_count()); 97 infobar_count());
98 } 98 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/user_script_master.cc ('k') | chrome/browser/managed_mode/managed_user_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698