Search in sources :

Example 36 with WebViewProviderResponse

use of android.webkit.WebViewProviderResponse in project android_frameworks_base by crdroidandroid.

the class WebViewUpdateServiceTest method checkPreparationPhasesForPackage.

private void checkPreparationPhasesForPackage(String expectedPackage, int numPreparation) {
    // Verify that onWebViewProviderChanged was called for the numPreparation'th time for the
    // expected package
    Mockito.verify(mTestSystemImpl, Mockito.times(numPreparation)).onWebViewProviderChanged(Mockito.argThat(new IsPackageInfoWithName(expectedPackage)));
    mWebViewUpdateServiceImpl.notifyRelroCreationCompleted();
    WebViewProviderResponse response = mWebViewUpdateServiceImpl.waitForAndGetProvider();
    assertEquals(WebViewFactory.LIBLOAD_SUCCESS, response.status);
    assertEquals(expectedPackage, response.packageInfo.packageName);
}
Also used : WebViewProviderResponse(android.webkit.WebViewProviderResponse)

Aggregations

WebViewProviderResponse (android.webkit.WebViewProviderResponse)36 WebViewProviderInfo (android.webkit.WebViewProviderInfo)28 MediumTest (android.test.suitebuilder.annotation.MediumTest)5 Test (org.junit.Test)5 CountDownLatch (java.util.concurrent.CountDownLatch)4