Commit 38db0052 authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions] Remove unused code from ExtensionBrowserTest

Remove:
- ExtensionBrowserTest::installed_
- ExtensionBrowserTest::loaded_
- ExtensionBrowserTest::LaunchBrowserForAppInTab()
- ExtensionBrowserTest::InstallExtensionWithUI()
- ExtensionBrowserTest::WaitForExtensionLoadError()
- browser_test_util::LaunchBrowserForAppInTab()

None of these had active usage.

No functional changes; pure deletion.

Bug: None
Change-Id: I815af35198ebeb0b75139086060eedb48a0d8209
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1981067Reviewed-by: default avatarDavid Bertoni <dbertoni@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#727472}
parent 0c1678fe
......@@ -104,26 +104,6 @@ Browser* LaunchAppBrowser(Profile* profile, const Extension* extension_app) {
return is_correct_app_browser ? browser : nullptr;
}
Browser* LaunchBrowserForAppInTab(Profile* profile,
const Extension* extension_app) {
content::WebContents* web_contents =
apps::LaunchService::Get(profile)->OpenApplication(apps::AppLaunchParams(
extension_app->id(), LaunchContainer::kLaunchContainerTab,
WindowOpenDisposition::NEW_FOREGROUND_TAB,
AppLaunchSource::kSourceTest));
DCHECK(web_contents);
web_app::WebAppTabHelper* tab_helper =
web_app::WebAppTabHelper::FromWebContents(web_contents);
DCHECK(tab_helper);
DCHECK_EQ(extension_app->id(), tab_helper->app_id());
Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
DCHECK_EQ(browser, chrome::FindLastActive());
DCHECK_EQ(web_contents, browser->tab_strip_model()->GetActiveWebContents());
return browser;
}
content::WebContents* AddTab(Browser* browser, const GURL& url) {
int starting_tab_count = browser->tab_strip_model()->count();
ui_test_utils::NavigateToURLWithDisposition(
......
......@@ -32,10 +32,6 @@ const Extension* InstallBookmarkApp(Profile* profile, WebApplicationInfo info);
// Launches a new app window for |app| in |profile|.
Browser* LaunchAppBrowser(Profile* profile, const Extension* app);
// Launches a new tab for |app| in |profile|.
Browser* LaunchBrowserForAppInTab(Profile* profile,
const Extension* extension_app);
// Adds a tab to |browser| and returns the newly added WebContents.
content::WebContents* AddTab(Browser* browser, const GURL& url);
......
......@@ -111,8 +111,7 @@ void ExtensionProtocolTestResourcesHandler(const base::FilePath& test_dir_root,
} // namespace
ExtensionBrowserTest::ExtensionBrowserTest()
: loaded_(false),
installed_(false),
:
#if defined(OS_CHROMEOS)
set_chromeos_user_(true),
#endif
......@@ -441,11 +440,6 @@ Browser* ExtensionBrowserTest::LaunchAppBrowser(const Extension* extension) {
return browsertest_util::LaunchAppBrowser(profile(), extension);
}
Browser* ExtensionBrowserTest::LaunchBrowserForAppInTab(
const Extension* extension) {
return browsertest_util::LaunchBrowserForAppInTab(profile(), extension);
}
base::FilePath ExtensionBrowserTest::PackExtension(
const base::FilePath& dir_path,
int extra_run_flags) {
......
......@@ -177,8 +177,6 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest {
// Launches |extension| as a window and returns the browser.
Browser* LaunchAppBrowser(const Extension* extension);
// Launches |extension| as a tab and returns the browser.
Browser* LaunchBrowserForAppInTab(const Extension* extension);
// Pack the extension in |dir_path| into a crx file and return its path.
// Return an empty FilePath if there were errors.
......@@ -251,14 +249,6 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest {
const base::FilePath& path,
int expected_change);
// Same as |InstallExtension| but with the normal extension UI showing up
// (for e.g. info bar on success).
const Extension* InstallExtensionWithUI(const base::FilePath& path,
int expected_change) {
return InstallOrUpdateExtension(
std::string(), path, INSTALL_UI_TYPE_NORMAL, expected_change);
}
const Extension* InstallExtensionWithUIAutoConfirm(const base::FilePath& path,
int expected_change,
Browser* browser) {
......@@ -304,12 +294,6 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest {
return observer_->WaitForExtensionInstallError();
}
// Waits for an extension load error. Returns true if the error really
// happened.
bool WaitForExtensionLoadError() {
return observer_->WaitForExtensionLoadError();
}
// Wait for the specified extension to crash. Returns true if it really
// crashed.
bool WaitForExtensionCrash(const std::string& extension_id) {
......@@ -375,9 +359,6 @@ class ExtensionBrowserTest : virtual public InProcessBrowserTest {
bool ExecuteScriptInBackgroundPageNoWait(const std::string& extension_id,
const std::string& script);
bool loaded_;
bool installed_;
#if defined(OS_CHROMEOS)
// True if the command line should be tweaked as if ChromeOS user is
// already logged in.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment