Index: chrome/browser/extensions/extension_browsertest.cc |
=================================================================== |
--- chrome/browser/extensions/extension_browsertest.cc (revision 75613) |
+++ chrome/browser/extensions/extension_browsertest.cc (working copy) |
@@ -18,7 +18,9 @@ |
#include "chrome/browser/extensions/extension_host.h" |
#include "chrome/browser/extensions/extension_install_ui.h" |
#include "chrome/browser/extensions/extension_service.h" |
+#include "chrome/browser/extensions/theme_installed_infobar_delegate.h" |
#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/tab_contents/tab_contents.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/omnibox/location_bar.h" |
#include "chrome/common/chrome_paths.h" |
@@ -163,7 +165,7 @@ |
class MockAutoConfirmExtensionInstallUI : public ExtensionInstallUI { |
public: |
- MockAutoConfirmExtensionInstallUI(Profile* profile) : |
+ explicit MockAutoConfirmExtensionInstallUI(Profile* profile) : |
ExtensionInstallUI(profile) {} |
// Proceed without confirmation prompt. |
@@ -356,6 +358,17 @@ |
return (service->GetExtensionById(extension_id, true) == NULL); |
} |
+void ExtensionBrowserTest::VerifyThemeInfoBarAndUndoInstall() { |
+ TabContents* tab_contents = browser()->GetSelectedTabContents(); |
+ ASSERT_TRUE(tab_contents); |
+ ASSERT_EQ(1U, tab_contents->infobar_count()); |
+ ConfirmInfoBarDelegate* delegate = |
+ tab_contents->GetInfoBarDelegateAt(0)->AsConfirmInfoBarDelegate(); |
+ ASSERT_TRUE(delegate); |
+ delegate->Cancel(); |
+ ASSERT_EQ(0U, tab_contents->infobar_count()); |
+} |
+ |
void ExtensionBrowserTest::Observe(NotificationType type, |
const NotificationSource& source, |
const NotificationDetails& details) { |