[Android] Cleanup ExternalNavigationHandlerTest
This CL: - Replaces calls to ExternalNavigationDelegateImpl#isSpecializedHandlerAvailable() with calls to #countSpecializedHandlers() because #isSpecializedHandlerAvailable() has just one caller - Replaces ChromeBrowserTestRule with NativeLibraryTestRule - Uses a mock context for both ContextUtils#getApplicationContext() and for TabRedirectHandler instead of just for TabRedirectHandler - Makes TestPackageManager#queryIntentActivities() and TestExternalNavigationDelegate#queryIntentActivities() use same implementation. - Changes tests to register relevant http:// and https:// handlers at the beginning of the test. This is a change of behavior. Previously, most URLs would be handled by the "foo" external app - Changes TestExternalNavigationDelegate#mQueryIntentOverride from tristate to boolean. The "true behavior" was nuked but the "false behavior" was preserved. BUG=None Change-Id: If212afde6e4c12d4f08576c4bd26392b8732bc09 Reviewed-on: https://chromium-review.googlesource.com/891744 Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org> Reviewed-by:Maria Khomenko <mariakhomenko@chromium.org> Cr-Commit-Position: refs/heads/master@{#532970}
Showing
Please register or sign in to comment