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

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

Issue 4837003: Merge 65722 - Split the private webstore install API into two parts.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552/src/
Patch Set: Created 10 years, 1 month 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_gallery_install_apitest.cc
===================================================================
--- chrome/browser/extensions/extension_gallery_install_apitest.cc (revision 65899)
+++ chrome/browser/extensions/extension_gallery_install_apitest.cc (working copy)
@@ -16,11 +16,27 @@
command_line->AppendSwitchASCII(switches::kAppsGalleryURL,
"http://www.example.com");
}
+
+ bool RunInstallTest(const std::string& page) {
+ std::string base_url = base::StringPrintf(
+ "http://www.example.com:%u/files/extensions/",
+ test_server()->host_port_pair().port());
+
+ std::string testing_install_base_url = base_url;
+ testing_install_base_url += "good.crx";
+ CompleteInstallFunction::SetTestingInstallBaseUrl(
+ testing_install_base_url.c_str());
+
+ std::string page_url = base_url;
+ page_url += "api_test/extension_gallery_install/" + page;
+
+ return RunPageTest(page_url.c_str());
+ }
};
// http://crbug.com/55642 - failing on XP.
#if defined (OS_WIN)
-#define MAYBE_InstallAndUninstall DISABLED_InstallAndUninstall
+#define MAYBE_InstallAndUninstall FLAKY_InstallAndUninstall
#else
#define MAYBE_InstallAndUninstall InstallAndUninstall
#endif
@@ -29,15 +45,11 @@
host_resolver()->AddRule("www.example.com", "127.0.0.1");
ASSERT_TRUE(test_server()->Start());
- std::string base_url = base::StringPrintf(
- "http://www.example.com:%u/files/extensions/",
- test_server()->host_port_pair().port());
+ BeginInstallFunction::SetIgnoreUserGestureForTests(true);
+ ASSERT_TRUE(RunInstallTest("test.html"));
+ ASSERT_TRUE(RunInstallTest("complete_without_begin.html"));
+ ASSERT_TRUE(RunInstallTest("invalid_begin.html"));
- std::string testing_install_base_url = base_url;
- testing_install_base_url += "good.crx";
- InstallFunction::SetTestingInstallBaseUrl(testing_install_base_url.c_str());
-
- std::string page_url = base_url;
- page_url += "api_test/extension_gallery_install/test.html";
- ASSERT_TRUE(RunPageTest(page_url.c_str()));
+ BeginInstallFunction::SetIgnoreUserGestureForTests(false);
+ ASSERT_TRUE(RunInstallTest("no_user_gesture.html"));
}
« no previous file with comments | « chrome/browser/extensions/crx_installer_browsertest.cc ('k') | chrome/common/extensions/api/extension_api.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698