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

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

Issue 908063002: Prevent inline CRX installs in popup windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Open the popup from the test file rather than using browser navigation Created 5 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/webstore_installer_test.cc
diff --git a/chrome/browser/extensions/webstore_installer_test.cc b/chrome/browser/extensions/webstore_installer_test.cc
index ce52e405ed660890ae6193bddb248ed5a4596ab9..c6d48bc24d679e0f162ef093c7d4cbbe93dd1e99 100644
--- a/chrome/browser/extensions/webstore_installer_test.cc
+++ b/chrome/browser/extensions/webstore_installer_test.cc
@@ -99,18 +99,22 @@ GURL WebstoreInstallerTest::GenerateTestServerUrl(
return page_url.ReplaceComponents(replace_host);
}
-void WebstoreInstallerTest::RunTest(const std::string& test_function_name) {
+void WebstoreInstallerTest::RunTest(WebContents* web_contents,
+ const std::string& test_function_name) {
bool result = false;
std::string script = base::StringPrintf(
"%s('%s')", test_function_name.c_str(),
test_gallery_url_.c_str());
- ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
- browser()->tab_strip_model()->GetActiveWebContents(),
- script,
- &result));
+ ASSERT_TRUE(
+ content::ExecuteScriptAndExtractBool(web_contents, script, &result));
EXPECT_TRUE(result);
}
+void WebstoreInstallerTest::RunTest(const std::string& test_function_name) {
+ RunTest(browser()->tab_strip_model()->GetActiveWebContents(),
+ test_function_name);
+}
+
bool WebstoreInstallerTest::RunIndexedTest(
const std::string& test_function_name,
int i) {

Powered by Google App Engine
This is Rietveld 408576698