public WebViewAssert hasProgress(int progress) { isNotNull(); int actualProgress = actual.getProgress(); assertThat(actualProgress) // .overridingErrorMessage("Expected progress <%s> but was <%s>.", progress, actualProgress) // .isEqualTo(progress); return this; }
@Override public int getProgress() { return mWebView.getProgress(); }
public WebViewAssert hasProgress(int progress) { isNotNull(); int actualProgress = actual.getProgress(); assertThat(actualProgress) // .overridingErrorMessage("Expected progress <%s> but was <%s>.", progress, actualProgress) // .isEqualTo(progress); return this; }
@Override public void onClick(View view) { if (mWebView.getProgress() == 100) { mWebView.loadUrl("about:blank"); load(); } else { mWebView.stopLoading(); } } });
@Override public void run() { data.put("CanGoBack", wv.canGoBack()); data.put("CanGoForward", wv.canGoForward()); data.put("OriginalURL", wv.getOriginalUrl()); data.put("URL", wv.getUrl()); data.put("Title", wv.getTitle()); data.put("Progress", wv.getProgress()); WebSettings settings = wv.getSettings(); fillSettings(settings, data); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { data.put("CanZoomIn", wv.canZoomIn()); data.put("CanZoomOut", wv.canZoomOut()); data.put("IsPrivateBrowsingEnabled", wv.isPrivateBrowsingEnabled()); } synchronized (lock) { lock.notifyAll(); } } });