Changed logic to handle timeout pages.
This commit is contained in:
@@ -134,6 +134,7 @@ public class ReliabilityTestActivity extends Activity {
|
|||||||
webView.stopLoading();
|
webView.stopLoading();
|
||||||
Log.v(LOGTAG, "Page timeout triggered, progress = " + progress);
|
Log.v(LOGTAG, "Page timeout triggered, progress = " + progress);
|
||||||
timeoutFlag = true;
|
timeoutFlag = true;
|
||||||
|
handler.postDelayed(pageDoneRunner, manualDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean waitUntilDone() {
|
public boolean waitUntilDone() {
|
||||||
@@ -194,6 +195,8 @@ public class ReliabilityTestActivity extends Activity {
|
|||||||
@Override
|
@Override
|
||||||
public void onPageFinished(WebView view, String url) {
|
public void onPageFinished(WebView view, String url) {
|
||||||
Log.v(LOGTAG, "onPageFinished: " + url);
|
Log.v(LOGTAG, "onPageFinished: " + url);
|
||||||
|
// let handleTimeout take care of finishing the page
|
||||||
|
if(!timeoutFlag)
|
||||||
handler.postDelayed(new WebViewStatusChecker(), 500);
|
handler.postDelayed(new WebViewStatusChecker(), 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user