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

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

Issue 10699057: Move application creation and extension install prompt showing off Browser and onto ExtensionTabHel… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/extensions/crx_installer.h" 5 #include "chrome/browser/extensions/crx_installer.h"
6 #include "chrome/browser/extensions/extension_install_prompt.h" 6 #include "chrome/browser/extensions/extension_install_prompt.h"
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/infobars/infobar_tab_helper.h" 8 #include "chrome/browser/infobars/infobar_tab_helper.h"
9 #include "chrome/browser/themes/theme_service.h" 9 #include "chrome/browser/themes/theme_service.h"
10 #include "chrome/browser/themes/theme_service_factory.h" 10 #include "chrome/browser/themes/theme_service_factory.h"
(...skipping 21 matching lines...) Expand all
32 void InstallExtension(const char* filename) { 32 void InstallExtension(const char* filename) {
33 FilePath path = ui_test_utils::GetTestFilePath( 33 FilePath path = ui_test_utils::GetTestFilePath(
34 FilePath().AppendASCII("extensions"), FilePath().AppendASCII(filename)); 34 FilePath().AppendASCII("extensions"), FilePath().AppendASCII(filename));
35 Profile* profile = browser()->profile(); 35 Profile* profile = browser()->profile();
36 ExtensionService* service = profile->GetExtensionService(); 36 ExtensionService* service = profile->GetExtensionService();
37 37
38 ui_test_utils::WindowedNotificationObserver observer( 38 ui_test_utils::WindowedNotificationObserver observer(
39 chrome::NOTIFICATION_EXTENSION_LOADED, 39 chrome::NOTIFICATION_EXTENSION_LOADED,
40 content::NotificationService::AllSources()); 40 content::NotificationService::AllSources());
41 41
42 ExtensionInstallPrompt* client = new ExtensionInstallPrompt(browser()); 42 ExtensionInstallPrompt* client =
43 chrome::CreateExtensionInstallPromptWithBrowser(browser());
43 scoped_refptr<CrxInstaller> installer( 44 scoped_refptr<CrxInstaller> installer(
44 CrxInstaller::Create(service, client)); 45 CrxInstaller::Create(service, client));
45 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION); 46 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION);
46 installer->InstallCrx(path); 47 installer->InstallCrx(path);
47 48
48 observer.Wait(); 49 observer.Wait();
49 } 50 }
50 }; 51 };
51 52
52 IN_PROC_BROWSER_TEST_F(InfoBarsTest, TestInfoBarsCloseOnNewTheme) { 53 IN_PROC_BROWSER_TEST_F(InfoBarsTest, TestInfoBarsCloseOnNewTheme) {
(...skipping 26 matching lines...) Expand all
79 80
80 ui_test_utils::WindowedNotificationObserver infobar_removed_2( 81 ui_test_utils::WindowedNotificationObserver infobar_removed_2(
81 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 82 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
82 content::NotificationService::AllSources()); 83 content::NotificationService::AllSources());
83 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); 84 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme();
84 infobar_removed_2.Wait(); 85 infobar_removed_2.Wait();
85 EXPECT_EQ(0u, 86 EXPECT_EQ(0u,
86 chrome::GetActiveTabContents(browser())->infobar_tab_helper()-> 87 chrome::GetActiveTabContents(browser())->infobar_tab_helper()->
87 infobar_count()); 88 infobar_count());
88 } 89 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698