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

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

Issue 10683003: Moved CrxInstaller and CrxInstallerError into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
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
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 22 matching lines...) Expand all
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 = new ExtensionInstallPrompt(browser());
43 scoped_refptr<CrxInstaller> installer( 43 scoped_refptr<extensions::CrxInstaller> installer(
44 CrxInstaller::Create(service, client)); 44 extensions::CrxInstaller::Create(service, client));
45 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION); 45 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION);
46 installer->InstallCrx(path); 46 installer->InstallCrx(path);
47 47
48 observer.Wait(); 48 observer.Wait();
49 } 49 }
50 }; 50 };
51 51
52 IN_PROC_BROWSER_TEST_F(InfoBarsTest, TestInfoBarsCloseOnNewTheme) { 52 IN_PROC_BROWSER_TEST_F(InfoBarsTest, TestInfoBarsCloseOnNewTheme) {
53 ASSERT_TRUE(test_server()->Start()); 53 ASSERT_TRUE(test_server()->Start());
54 54
(...skipping 24 matching lines...) Expand all
79 79
80 ui_test_utils::WindowedNotificationObserver infobar_removed_2( 80 ui_test_utils::WindowedNotificationObserver infobar_removed_2(
81 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 81 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
82 content::NotificationService::AllSources()); 82 content::NotificationService::AllSources());
83 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); 83 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme();
84 infobar_removed_2.Wait(); 84 infobar_removed_2.Wait();
85 EXPECT_EQ(0u, 85 EXPECT_EQ(0u,
86 chrome::GetActiveTabContents(browser())->infobar_tab_helper()-> 86 chrome::GetActiveTabContents(browser())->infobar_tab_helper()->
87 infobar_count()); 87 infobar_count());
88 } 88 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698