Move helper methods and BROWSER_TESTS_FLAGS to NativeBrowserTest.

This adds a NativeBrowserTest helper class for sharing code between
content and chrome browser tests.

ChromeBrowserTestActivity is going to have to inherit from
ChromeTabbedActivity so NativeBrowserTestActivity will no longer be
a suitable place for sharing code. I will collapse it back into
ContentShellBrowserTestActivity again in the future.

For now, shared code moves out of NativeBrowserTestActivity so that
ChromeBrowserTestActivity can change its inheritance.

We clarify the ordering in onCreate() so that when the subclass uses
async startup we can be sure that browser initialization and runTests()
all occur after super.onCreate() by moving that call to the top of
the onCreate() override. mTest.postStart() is moved out to runTests()
though it is called directly from onCreate() for now. The call will
move to the subclass when it uses async initialization.

[email protected]

Bug: 961849
Change-Id: I892a382643e0d8e3029fcac0a406225829cd3ad0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670407
Commit-Queue: danakj <[email protected]>
Reviewed-by: John Budorick <[email protected]>
Cr-Commit-Position: refs/heads/master@{#671171}
3 files changed