Commit b41c3dc4 authored by wjia@chromium.org's avatar wjia@chromium.org

Fix content_browsertests on Android.

The content_browsertests on Android exit before IO thread is joined.
Some tasks on IO thread needs to access GetContentClient() which has
been reset by ContentShellTestSuiteInitializer::OnTestEnd when test
is terminated.

To keep closer to production code, this patch tries to not reset
ContentClient on Android when test is ended.

BUG=181069
R=jam@chromium.org

Review URL: https://codereview.chromium.org/27518013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235761 0039d316-1c4b-4281-b951-d872f2087c98
parent 912bf8a6
...@@ -44,9 +44,13 @@ class ContentShellTestSuiteInitializer ...@@ -44,9 +44,13 @@ class ContentShellTestSuiteInitializer
} }
virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE { virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE {
#if !defined(OS_ANDROID)
// On Android, production code doesn't reset ContentClient during shutdown.
// We try to do the same thing as production. Refer to crbug.com/181069.
browser_content_client_.reset(); browser_content_client_.reset();
content_client_.reset(); content_client_.reset();
SetContentClient(NULL); SetContentClient(NULL);
#endif
} }
private: private:
......
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