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

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

Issue 5543001: Tests for incognito app install, plus some cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add app permissions file Created 10 years 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_install_ui_browsertest.cc
diff --git a/chrome/browser/extensions/extension_install_ui_browsertest.cc b/chrome/browser/extensions/extension_install_ui_browsertest.cc
index 6866325763caca7db0c1943fcc0b14482fb51a9d..7ba82ff8b4ff66edaef328e0e47b56d81e9dc83f 100644
--- a/chrome/browser/extensions/extension_install_ui_browsertest.cc
+++ b/chrome/browser/extensions/extension_install_ui_browsertest.cc
@@ -60,3 +60,29 @@ IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest,
VerifyThemeInfoBarAndUndoInstall();
ASSERT_EQ(NULL, browser()->profile()->GetTheme());
}
+
+IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest,
+ AppInstallConfirmation) {
+ int num_tabs = browser()->tab_count();
+
+ FilePath app_path = test_data_dir_.AppendASCII("app.crx");
+ ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(app_path, 1,
+ browser()->profile()));
+ EXPECT_EQ(num_tabs + 1, browser()->tab_count());
Aaron Boodman 2010/12/14 23:21:44 Is it also possible to test that the new tab is th
Tessa MacDuff 2010/12/15 00:38:55 Done.
+}
+
+IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest,
+ AppInstallConfirmation_Incognito) {
+ Profile* incognito_profile = browser()->profile()->GetOffTheRecordProfile();
+ Browser* incognito_browser = Browser::GetOrCreateTabbedBrowser(
+ incognito_profile);
+
+ int num_incognito_tabs = incognito_browser->tab_count();
+ int num_normal_tabs = browser()->tab_count();
+
+ FilePath app_path = test_data_dir_.AppendASCII("app.crx");
+ ASSERT_TRUE(InstallExtensionWithUIAutoConfirm(app_path, 1,
+ incognito_profile));
+ EXPECT_EQ(num_incognito_tabs, incognito_browser->tab_count());
+ EXPECT_EQ(num_normal_tabs + 1, browser()->tab_count());
+}

Powered by Google App Engine
This is Rietveld 408576698