Commit 2cfce7bd authored by danakj's avatar danakj Committed by Commit Bot

Call RegisterInProcessThreads for Android chrome browser tests.

RegisterInProcessThreads() is called to set up using single process with
child processes running in threads. It must be called for:
- Chrome unit tests
- Android Content browser tests
- Android Chrome browser tests

Currently it is called in ContentBrowserTestSuite and
ChromeUnitTestSuite which excludes the 3rd case. This adds a
call in ChromeTestSuiteRunner, which is used to run Chrome browser
tests.

Bug: 961849
Change-Id: I371eb8777ba1fbe8b1dd7f4426dc15144392cad9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610717Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663945}
parent ea591248
...@@ -71,6 +71,10 @@ int ChromeTestSuiteRunner::RunTestSuite(int argc, char** argv) { ...@@ -71,6 +71,10 @@ int ChromeTestSuiteRunner::RunTestSuite(int argc, char** argv) {
ChromeTestSuite test_suite(argc, argv); ChromeTestSuite test_suite(argc, argv);
// Browser tests are expected not to tear-down various globals. // Browser tests are expected not to tear-down various globals.
test_suite.DisableCheckForLeakedGlobals(); test_suite.DisableCheckForLeakedGlobals();
#if defined(OS_ANDROID)
// Android browser tests run child processes as threads instead.
content::ContentTestSuiteBase::RegisterInProcessThreads();
#endif
return test_suite.Run(); return test_suite.Run();
} }
......
...@@ -21,14 +21,14 @@ class ContentTestSuiteBase : public base::TestSuite { ...@@ -21,14 +21,14 @@ class ContentTestSuiteBase : public base::TestSuite {
// registered temporarily so that it can provide additional schemes. // registered temporarily so that it can provide additional schemes.
static void RegisterContentSchemes(ContentClient* content_client); static void RegisterContentSchemes(ContentClient* content_client);
// Registers renderer/utility/gpu processes to run in-thread.
static void RegisterInProcessThreads();
protected: protected:
ContentTestSuiteBase(int argc, char** argv); ContentTestSuiteBase(int argc, char** argv);
void Initialize() override; void Initialize() override;
// Registers renderer/utility/gpu processes to run in-thread.
void RegisterInProcessThreads();
private: private:
DISALLOW_COPY_AND_ASSIGN(ContentTestSuiteBase); DISALLOW_COPY_AND_ASSIGN(ContentTestSuiteBase);
}; };
......
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