OLD | NEW |
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_manager.h" | 10 #include "chrome/browser/infobars/infobar_manager.h" |
11 #include "chrome/browser/infobars/infobar_service.h" | 11 #include "chrome/browser/infobars/infobar_service.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/themes/theme_service.h" | 13 #include "chrome/browser/themes/theme_service.h" |
14 #include "chrome/browser/themes/theme_service_factory.h" | 14 #include "chrome/browser/themes/theme_service_factory.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 16 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/test/base/in_process_browser_test.h" | 18 #include "chrome/test/base/in_process_browser_test.h" |
19 #include "chrome/test/base/test_switches.h" | 19 #include "chrome/test/base/test_switches.h" |
20 #include "chrome/test/base/ui_test_utils.h" | 20 #include "chrome/test/base/ui_test_utils.h" |
21 #include "chrome/test/ui/ui_test.h" | |
22 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
23 #include "net/test/embedded_test_server/embedded_test_server.h" | 22 #include "net/test/embedded_test_server/embedded_test_server.h" |
24 | 23 |
25 class InfoBarsTest : public InProcessBrowserTest { | 24 class InfoBarsTest : public InProcessBrowserTest { |
26 public: | 25 public: |
27 InfoBarsTest() {} | 26 InfoBarsTest() {} |
28 | 27 |
29 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 28 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
30 command_line->AppendSwitchASCII( | 29 command_line->AppendSwitchASCII( |
31 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); | 30 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 88 |
90 content::WindowedNotificationObserver infobar_removed_2( | 89 content::WindowedNotificationObserver infobar_removed_2( |
91 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, | 90 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, |
92 content::NotificationService::AllSources()); | 91 content::NotificationService::AllSources()); |
93 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); | 92 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); |
94 infobar_removed_2.Wait(); | 93 infobar_removed_2.Wait(); |
95 EXPECT_EQ(0u, | 94 EXPECT_EQ(0u, |
96 InfoBarService::FromWebContents(browser()->tab_strip_model()-> | 95 InfoBarService::FromWebContents(browser()->tab_strip_model()-> |
97 GetActiveWebContents())->infobar_manager()->infobar_count()); | 96 GetActiveWebContents())->infobar_manager()->infobar_count()); |
98 } | 97 } |
OLD | NEW |