Search in sources :

Example 16 with AbstractFlashcardViewer

use of com.ichi2.anki.AbstractFlashcardViewer in project Anki-Android by ankidroid.

the class OnRenderProcessGoneDelegateTest method nothingHappensIfWebViewIsNotTheSame.

@Test
public void nothingHappensIfWebViewIsNotTheSame() {
    AbstractFlashcardViewer mock = getViewer();
    OnRenderProcessGoneDelegateImpl delegate = getInstance(mock);
    callOnRenderProcessGone(delegate, mock(WebView.class));
    verify(mock, never().description("No mutating methods should be called if the WebView is not relevant")).destroyWebViewFrame();
}
Also used : AbstractFlashcardViewer(com.ichi2.anki.AbstractFlashcardViewer) WebView(android.webkit.WebView) Test(org.junit.Test)

Aggregations

AbstractFlashcardViewer (com.ichi2.anki.AbstractFlashcardViewer)9 Test (org.junit.Test)6 Resources (android.content.res.Resources)4 WebView (android.webkit.WebView)4 Uri (android.net.Uri)3 View (android.view.View)3 Context (android.content.Context)2 MediaPlayer (android.media.MediaPlayer)2 ImageView (android.widget.ImageView)2 TextView (android.widget.TextView)2 AudioView (com.ichi2.anki.multimediacard.AudioView)2 TaskData (com.ichi2.async.TaskData)2 SharedPreferences (android.content.SharedPreferences)1 AudioAttributes (android.media.AudioAttributes)1 AudioFocusRequest (android.media.AudioFocusRequest)1 Handler (android.os.Handler)1 TextToSpeech (android.speech.tts.TextToSpeech)1 UtteranceProgressListener (android.speech.tts.UtteranceProgressListener)1 OnClickListener (android.view.View.OnClickListener)1 ViewGroup (android.view.ViewGroup)1