private void deleteOrigin(final String origin) throws Exception {
   final AwQuotaManagerBridge bridge = AwQuotaManagerBridgeTestUtil.getQuotaManagerBridge(this);
   getInstrumentation()
       .runOnMainSync(
           new Runnable() {
             @Override
             public void run() {
               bridge.deleteOrigin(origin);
             }
           });
 }
  private long getQuotaForOrigin(final String origin) throws Exception {
    final LongValueCallbackHelper callbackHelper = new LongValueCallbackHelper();
    final AwQuotaManagerBridge bridge = AwQuotaManagerBridgeTestUtil.getQuotaManagerBridge(this);

    int callCount = callbackHelper.getCallCount();
    getInstrumentation()
        .runOnMainSync(
            new Runnable() {
              @Override
              public void run() {
                bridge.getQuotaForOrigin(
                    "foo.com",
                    new ValueCallback<Long>() {
                      @Override
                      public void onReceiveValue(Long quota) {
                        callbackHelper.notifyCalled(quota);
                      }
                    });
              }
            });
    callbackHelper.waitForCallback(callCount);

    return callbackHelper.getValue();
  }
  /*
  @LargeTest
  @Feature({"AndroidWebView", "WebStore"})
  Too flaky. See crbug.com/609977.
  */
  @DisabledTest
  public void testGetResultsMatch() throws Exception {
    useAppCache();

    pollInstrumentationThread(
        new Callable<Boolean>() {
          @Override
          public Boolean call() throws Exception {
            return AwQuotaManagerBridgeTestUtil.getOrigins(AwQuotaManagerBridgeTest.this)
                    .mOrigins
                    .length
                > 0;
          }
        });

    AwQuotaManagerBridge.Origins origins = AwQuotaManagerBridgeTestUtil.getOrigins(this);
    assertEquals(origins.mOrigins.length, origins.mUsages.length);
    assertEquals(origins.mOrigins.length, origins.mQuotas.length);

    for (int i = 0; i < origins.mOrigins.length; ++i) {
      assertEquals(origins.mUsages[i], getUsageForOrigin(origins.mOrigins[i]));
      assertEquals(origins.mQuotas[i], getQuotaForOrigin(origins.mOrigins[i]));
    }
  }