| 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 "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/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/themes/theme_service.h" | 10 #include "chrome/browser/themes/theme_service.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, | 69 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_ADDED, |
| 70 content::NotificationService::AllSources()); | 70 content::NotificationService::AllSources()); |
| 71 content::WindowedNotificationObserver infobar_removed_1( | 71 content::WindowedNotificationObserver infobar_removed_1( |
| 72 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, | 72 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, |
| 73 content::NotificationService::AllSources()); | 73 content::NotificationService::AllSources()); |
| 74 InstallExtension("theme2.crx"); | 74 InstallExtension("theme2.crx"); |
| 75 infobar_added_2.Wait(); | 75 infobar_added_2.Wait(); |
| 76 infobar_removed_1.Wait(); | 76 infobar_removed_1.Wait(); |
| 77 EXPECT_EQ(0u, | 77 EXPECT_EQ(0u, |
| 78 chrome::GetTabContentsAt(browser(), 0)->infobar_tab_helper()-> | 78 chrome::GetTabContentsAt(browser(), 0)->infobar_tab_helper()-> |
| 79 infobar_count()); | 79 GetInfoBarCount()); |
| 80 | 80 |
| 81 content::WindowedNotificationObserver infobar_removed_2( | 81 content::WindowedNotificationObserver infobar_removed_2( |
| 82 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, | 82 chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, |
| 83 content::NotificationService::AllSources()); | 83 content::NotificationService::AllSources()); |
| 84 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); | 84 ThemeServiceFactory::GetForProfile(browser()->profile())->UseDefaultTheme(); |
| 85 infobar_removed_2.Wait(); | 85 infobar_removed_2.Wait(); |
| 86 EXPECT_EQ(0u, | 86 EXPECT_EQ(0u, |
| 87 chrome::GetActiveTabContents(browser())->infobar_tab_helper()-> | 87 chrome::GetActiveTabContents(browser())->infobar_tab_helper()-> |
| 88 infobar_count()); | 88 GetInfoBarCount()); |
| 89 } | 89 } |
| OLD | NEW |