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

Unified Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 6546072: Clean up how we handle themes in the extensions system and management API.... Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
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) {
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_install_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698