@SmallTest
 @Feature({"ShouldInterceptLoadRequest"})
 public void testOnReceivedErrorCallback() throws Throwable {
   final OnReceivedErrorHelper onReceivedErrorHelper =
       mTestHelperBridge.getOnReceivedErrorHelper();
   mShouldInterceptLoadRequestHelper.setReturnValue(new WebResourceResponse(null, null, null));
   int onReceivedErrorHelperCallCount = onReceivedErrorHelper.getCallCount();
   loadUrlSync("foo://bar");
   onReceivedErrorHelper.waitForCallback(onReceivedErrorHelperCallCount, 1);
 }
  @SmallTest
  @Feature({"ShouldInterceptLoadRequest"})
  public void testNullInputStreamCausesErrorForMainFrame() throws Throwable {
    final OnReceivedErrorHelper onReceivedErrorHelper =
        mTestHelperBridge.getOnReceivedErrorHelper();
    mShouldInterceptLoadRequestHelper.setReturnValue(
        new WebResourceResponse("text/html", "UTF-8", null));

    final String aboutPageUrl = addAboutPageToTestServer(mWebServer);
    final int callCount = onReceivedErrorHelper.getCallCount();
    loadUrlAsync(aboutPageUrl);
    onReceivedErrorHelper.waitForCallback(callCount);
    assertEquals(0, mWebServer.getRequestCount("/" + CommonResources.ABOUT_FILENAME));
  }