@Test public void onSuccess_withAboutBlankUrl_shouldFailSilently_shouldRemoveSpinningProgressView() { String url = "about:blank"; subject.onSuccess(url); assertThat(Robolectric.getShadowApplication().getNextStartedActivity()).isNull(); verify(mockSpinningProgressView).removeFromRoot(); }
@Override public void onSuccess(@NonNull final String resolvedUrl) { new UrlHandler.Builder() .withSupportedUrlActions( UrlAction.IGNORE_ABOUT_SCHEME, UrlAction.OPEN_NATIVE_BROWSER, UrlAction.OPEN_APP_MARKET, UrlAction.OPEN_IN_APP_BROWSER, UrlAction.HANDLE_SHARE_TWEET, UrlAction.FOLLOW_DEEP_LINK) .withResultActions(new UrlHandler.ResultActions() { @Override public void urlHandlingSucceeded(@NonNull String url, @NonNull UrlAction urlAction) { } @Override public void urlHandlingFailed(@NonNull String url, @NonNull UrlAction lastFailedUrlAction) { if (mUrlIterator.hasNext()) { UrlResolutionTask.getResolvedUrl(mUrlIterator.next(), ClickDestinationResolutionListener.this); } } }) .build().handleUrl(mContext, resolvedUrl); removeSpinningProgressView(); }
ClickDestinationResolutionListener implements UrlResolutionTask.UrlResolutionListener { @Override public void onSuccess(@NonNull final String resolvedUrl) { new UrlHandler.Builder() .withSupportedUrlActions( UrlAction.IGNORE_ABOUT_SCHEME, UrlAction.OPEN_NATIVE_BROWSER, UrlAction.OPEN_APP_MARKET, UrlAction.OPEN_IN_APP_BROWSER, UrlAction.HANDLE_SHARE_TWEET, UrlAction.FOLLOW_DEEP_LINK) .withResultActions(new UrlHandler.ResultActions() { @Override public void urlHandlingSucceeded(@NonNull String url, @NonNull UrlAction urlAction) { } @Override public void urlHandlingFailed(@NonNull String url, @NonNull UrlAction lastFailedUrlAction) { if (mUrlIterator.hasNext()) { UrlResolutionTask.getResolvedUrl(mUrlIterator.next(), ClickDestinationResolutionListener.this); } } }) .build().handleUrl(mContext, resolvedUrl); removeSpinningProgressView(); } }
ClickDestinationResolutionListener implements UrlResolutionTask.UrlResolutionListener { @Override public void onSuccess(@NonNull final String resolvedUrl) { new UrlHandler.Builder() .withSupportedUrlActions( UrlAction.IGNORE_ABOUT_SCHEME, UrlAction.OPEN_NATIVE_BROWSER, UrlAction.OPEN_APP_MARKET, UrlAction.OPEN_IN_APP_BROWSER, UrlAction.HANDLE_SHARE_TWEET, UrlAction.FOLLOW_DEEP_LINK) .withResultActions(new UrlHandler.ResultActions() { @Override public void urlHandlingSucceeded(@NonNull String url, @NonNull UrlAction urlAction) { } @Override public void urlHandlingFailed(@NonNull String url, @NonNull UrlAction lastFailedUrlAction) { if (mUrlIterator.hasNext()) { UrlResolutionTask.getResolvedUrl(mUrlIterator.next(), ClickDestinationResolutionListener.this); } } }) .build().handleUrl(mContext, resolvedUrl); removeSpinningProgressView(); } ClickDestinationResolutionListener(@NonNull final Context context,
            @NonNull final Iterator<String> urlIterator,
            @NonNull final SpinningProgressView spinningProgressView); }
ClickDestinationResolutionListener implements UrlResolutionTask.UrlResolutionListener { @Override public void onSuccess(@NonNull final String resolvedUrl) { new UrlHandler.Builder() .withSupportedUrlActions( UrlAction.IGNORE_ABOUT_SCHEME, UrlAction.OPEN_NATIVE_BROWSER, UrlAction.OPEN_APP_MARKET, UrlAction.OPEN_IN_APP_BROWSER, UrlAction.HANDLE_SHARE_TWEET, UrlAction.FOLLOW_DEEP_LINK) .withResultActions(new UrlHandler.ResultActions() { @Override public void urlHandlingSucceeded(@NonNull String url, @NonNull UrlAction urlAction) { } @Override public void urlHandlingFailed(@NonNull String url, @NonNull UrlAction lastFailedUrlAction) { if (mUrlIterator.hasNext()) { UrlResolutionTask.getResolvedUrl(mUrlIterator.next(), ClickDestinationResolutionListener.this); } } }) .build().handleUrl(mContext, resolvedUrl); removeSpinningProgressView(); } ClickDestinationResolutionListener(@NonNull final Context context,
            @NonNull final Iterator<String> urlIterator,
            @NonNull final SpinningProgressView spinningProgressView); @Override void onSuccess(@NonNull final String resolvedUrl); @Override void onFailure(); }
ClickDestinationResolutionListener implements UrlResolutionTask.UrlResolutionListener { @Override public void onSuccess(@NonNull final String resolvedUrl) { new UrlHandler.Builder() .withSupportedUrlActions( UrlAction.IGNORE_ABOUT_SCHEME, UrlAction.OPEN_NATIVE_BROWSER, UrlAction.OPEN_APP_MARKET, UrlAction.OPEN_IN_APP_BROWSER, UrlAction.HANDLE_SHARE_TWEET, UrlAction.FOLLOW_DEEP_LINK) .withResultActions(new UrlHandler.ResultActions() { @Override public void urlHandlingSucceeded(@NonNull String url, @NonNull UrlAction urlAction) { } @Override public void urlHandlingFailed(@NonNull String url, @NonNull UrlAction lastFailedUrlAction) { if (mUrlIterator.hasNext()) { UrlResolutionTask.getResolvedUrl(mUrlIterator.next(), ClickDestinationResolutionListener.this); } } }) .build().handleUrl(mContext, resolvedUrl); removeSpinningProgressView(); } ClickDestinationResolutionListener(@NonNull final Context context,
            @NonNull final Iterator<String> urlIterator,
            @NonNull final SpinningProgressView spinningProgressView); @Override void onSuccess(@NonNull final String resolvedUrl); @Override void onFailure();  }