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

Side by Side Diff: chrome/browser/infobars/infobars_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 (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 15 matching lines...) Expand all
26 InfoBarsTest() {} 26 InfoBarsTest() {}
27 27
28 void InstallExtension(const char* filename) { 28 void InstallExtension(const char* filename) {
29 base::FilePath path = ui_test_utils::GetTestFilePath( 29 base::FilePath path = ui_test_utils::GetTestFilePath(
30 base::FilePath().AppendASCII("extensions"), 30 base::FilePath().AppendASCII("extensions"),
31 base::FilePath().AppendASCII(filename)); 31 base::FilePath().AppendASCII(filename));
32 ExtensionService* service = extensions::ExtensionSystem::Get( 32 ExtensionService* service = extensions::ExtensionSystem::Get(
33 browser()->profile())->extension_service(); 33 browser()->profile())->extension_service();
34 34
35 content::WindowedNotificationObserver observer( 35 content::WindowedNotificationObserver observer(
36 chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, 36 extensions::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
37 content::NotificationService::AllSources()); 37 content::NotificationService::AllSources());
38 38
39 scoped_ptr<ExtensionInstallPrompt> client(new ExtensionInstallPrompt( 39 scoped_ptr<ExtensionInstallPrompt> client(new ExtensionInstallPrompt(
40 browser()->tab_strip_model()->GetActiveWebContents())); 40 browser()->tab_strip_model()->GetActiveWebContents()));
41 scoped_refptr<extensions::CrxInstaller> installer( 41 scoped_refptr<extensions::CrxInstaller> installer(
42 extensions::CrxInstaller::Create(service, client.Pass())); 42 extensions::CrxInstaller::Create(service, client.Pass()));
43 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION); 43 installer->set_install_cause(extension_misc::INSTALL_CAUSE_AUTOMATION);
44 installer->InstallCrx(path); 44 installer->InstallCrx(path);
45 45
46 observer.Wait(); 46 observer.Wait();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 content::WindowedNotificationObserver infobar_removed_2( 88 content::WindowedNotificationObserver infobar_removed_2(
89 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, 89 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED,
90 content::NotificationService::AllSources()); 90 content::NotificationService::AllSources());
91 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); 91 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme();
92 infobar_removed_2.Wait(); 92 infobar_removed_2.Wait();
93 EXPECT_EQ(0u, 93 EXPECT_EQ(0u,
94 InfoBarService::FromWebContents( 94 InfoBarService::FromWebContents(
95 browser()->tab_strip_model()->GetActiveWebContents())-> 95 browser()->tab_strip_model()->GetActiveWebContents())->
96 infobar_count()); 96 infobar_count());
97 } 97 }
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/notifications/notification_system_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698