webkit/webkit/src/androidTest/java/androidx/webkit/ServiceWorkerWebSettingsCompatTest.java
/**
     * This should remain functionally equivalent to
     * android.webkit.cts.ServiceWorkerWebSettingsTest#testBlockNetworkLoads. Modifications to this
     * test should be reflected in that test as necessary. See http://go/modifying-webview-cts.
     */
This should remain functionally equivalent to
android.webkit.cts.ServiceWorkerWebSettingsTest#testBlockNetworkLoads. Modifications to this
test should be reflected in that test as necessary.
This should remain functionally equivalent to android . webkit . cts . ServiceWorkerWebSettingsTest#testBlockNetworkLoads . Modifications to this test should be reflected in that test as necessary .
@Test
    public void testBlockNetworkLoads() {
        WebkitUtils.checkFeature(WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS);
        final boolean hasInternetPermission = true;
        Assert.assertEquals(mSettings.getBlockNetworkLoads(), !hasInternetPermission);
        for (boolean b : new boolean[]{false, true}) {
            mSettings.setBlockNetworkLoads(b);
            Assert.assertEquals(b, mSettings.getBlockNetworkLoads());
        }
    }
@ Test public void testBlockNetworkLoads ( ) { WebkitUtils . checkFeature ( WebViewFeature . SERVICE_WORKER_BLOCK_NETWORK_LOADS ) ; final boolean hasInternetPermission = true ; Assert . assertEquals ( mSettings . getBlockNetworkLoads ( ) , ! hasInternetPermission ) ; for ( boolean b : new boolean [ ] { false , true } ) { mSettings . setBlockNetworkLoads ( b ) ; Assert . assertEquals ( b , mSettings . getBlockNetworkLoads ( ) ) ; } }
This should remain functionally equivalent to
 android.webkit.cts.ServiceWorkerWebSettingsTest#testBlockNetworkLoads.
This should remain functionally equivalent to android . webkit . cts . ServiceWorkerWebSettingsTest#testBlockNetworkLoads .
// Note: we cannot test this setter unless we provide the INTERNET permission, otherwise we // get a SecurityException when we pass 'false'.