@Test public void onTouch_withTouchUp_whenVideoLongerThan16Seconds_andClickAfter5Seconds_shouldStartMoPubBrowser() throws Exception { initializeSubject(); spyOnVideoView(); setVideoViewParams(5001, 100000); subject.onResume(); getShadowVideoView().getOnPreparedListener().onPrepared(null); Robolectric.getUiThreadScheduler().unPause(); getShadowVideoView().getOnTouchListener().onTouch(null, GestureUtils.createActionUp(0, 0)); ArgumentCaptor<Bundle> bundleCaptor = ArgumentCaptor.forClass(Bundle.class); verify(baseVideoViewControllerListener).onStartActivityForResult( eq(MoPubBrowser.class), eq(expectedBrowserRequestCode), bundleCaptor.capture() ); assertThat(bundleCaptor.getValue().get(DESTINATION_URL_KEY)).isEqualTo(CLICKTHROUGH_URL); }
@Override protected void onResume() { mVideoRetries = 0; startRunnables(); mVideoView.seekTo(mSeekerPositionOnPause); if (!mIsVideoFinishedPlaying) { mVideoView.start(); } }
VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Override protected void onResume() { mVideoRetries = 0; startRunnables(); mVideoView.seekTo(mSeekerPositionOnPause); if (!mIsVideoFinishedPlaying) { mVideoView.start(); } } }
VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Override protected void onResume() { mVideoRetries = 0; startRunnables(); mVideoView.seekTo(mSeekerPositionOnPause); if (!mIsVideoFinishedPlaying) { mVideoView.start(); } } VastVideoViewController(final Context context,
            final Bundle bundle,
            final long broadcastIdentifier,
            final BaseVideoViewControllerListener baseVideoViewControllerListener); }
VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Override protected void onResume() { mVideoRetries = 0; startRunnables(); mVideoView.seekTo(mSeekerPositionOnPause); if (!mIsVideoFinishedPlaying) { mVideoView.start(); } } VastVideoViewController(final Context context,
            final Bundle bundle,
            final long broadcastIdentifier,
            final BaseVideoViewControllerListener baseVideoViewControllerListener); @Override boolean backButtonEnabled(); @Override void onComplete(String url, DownloadResponse downloadResponse); }
VastVideoViewController extends BaseVideoViewController implements DownloadTask.DownloadTaskListener { @Override protected void onResume() { mVideoRetries = 0; startRunnables(); mVideoView.seekTo(mSeekerPositionOnPause); if (!mIsVideoFinishedPlaying) { mVideoView.start(); } } VastVideoViewController(final Context context,
            final Bundle bundle,
            final long broadcastIdentifier,
            final BaseVideoViewControllerListener baseVideoViewControllerListener); @Override boolean backButtonEnabled(); @Override void onComplete(String url, DownloadResponse downloadResponse);  }