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

Unified Diff: chrome/test/base/in_process_browser_test.h

Issue 1996863002: media: Use bundled Widevine CDM in encrypted media browser tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 4 years, 7 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/test/base/in_process_browser_test.h
diff --git a/chrome/test/base/in_process_browser_test.h b/chrome/test/base/in_process_browser_test.h
index 3afebd81fe3484941fca3cf8f1508c71398d8e6c..ae3d8e9c57a5ef4c1daaf139ca6b89195d17e558 100644
--- a/chrome/test/base/in_process_browser_test.h
+++ b/chrome/test/base/in_process_browser_test.h
@@ -60,13 +60,22 @@ class ContentRendererClient;
// SetUpInProcessBrowserTestFixture and other related hook methods for a
// cleaner alternative).
//
-// Following three hook methods are called in sequence before calling
+// The following four hook methods are called in sequence before calling
// BrowserMain(), thus no browser has been created yet. They are mainly for
// setting up the environment for running the browser.
// . SetUpUserDataDirectory()
// . SetUpCommandLine()
+// . SetUpDefaultCommandLine()
// . SetUpInProcessBrowserTestFixture()
//
+// Default command line switches are added in the default implementation of
+// SetUpDefaultCommandLine(). Addtional command line switches can be simply
+// appended in SetUpCommandLine() without the need to invoke
+// InProcessBrowserTest::SetUpCommandLine(). If a test needs to change the
+// default command line, it can override SetUpDefaultCommandLine(), where it
+// should invoke InProcessBrowserTest::SetUpDefaultCommandLine() to get the
+// default swtiches, and modify them as needed.
+//
// SetUpOnMainThread() is called just after creating the default browser object
// and before executing the real test code. It's mainly for setting up things
// related to the browser object and associated window, like opening a new Tab
@@ -135,6 +144,13 @@ class InProcessBrowserTest : public content::BrowserTestBase {
const GURL& url,
ui::PageTransition transition);
+ // Setups default command line that will be used to launch the child browser
+ // process with an in-process test. Called by SetUp() after SetupCommandLine()
+ // to add default commandline switches. A default implementation is provided
+ // in this class. If a test does not want to use the default implementation,
+ // it should override this method.
+ virtual void SetUpDefaultCommandLine(base::CommandLine* command_line);
+
// Initializes the contents of the user data directory. Called by SetUp()
// after creating the user data directory, but before any browser is launched.
// If a test wishes to set up some initial non-empty state in the user data
@@ -207,11 +223,6 @@ class InProcessBrowserTest : public content::BrowserTestBase {
open_about_blank_on_browser_launch_ = value;
}
- // This must be called before RunTestOnMainThreadLoop() to have any effect.
- void set_multi_desktop_test(bool multi_desktop_test) {
- multi_desktop_test_ = multi_desktop_test;
- }
-
// Runs accessibility checks and sets |error_message| if it fails.
bool RunAccessibilityChecks(std::string* error_message);
@@ -223,10 +234,6 @@ class InProcessBrowserTest : public content::BrowserTestBase {
// Quits all open browsers and waits until there are no more browsers.
void QuitBrowsers();
- // Prepare command line that will be used to launch the child browser process
- // with an in-process test.
- void PrepareTestCommandLine(base::CommandLine* command_line);
-
// Browser created from CreateBrowser.
Browser* browser_;
@@ -240,10 +247,6 @@ class InProcessBrowserTest : public content::BrowserTestBase {
// True if the about:blank tab should be opened when the browser is launched.
bool open_about_blank_on_browser_launch_;
- // True if this is a multi-desktop test (in which case this browser test will
- // not ensure that Browsers are only created on the tested desktop).
- bool multi_desktop_test_;
-
// True if the accessibility test should run for a particular test case.
// This is reset for every test case.
bool run_accessibility_checks_for_test_case_;
« no previous file with comments | « chrome/browser/media/encrypted_media_supported_types_browsertest.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698