From 97499df874f680eaa55d96074f3dcca34685ca12 Mon Sep 17 00:00:00 2001 From: Guang Zhu Date: Mon, 16 May 2011 11:06:53 -0700 Subject: change how test sets timeout for webkit dump there are cases where webkit dump timed out, but a RuntimeException was not thrown (as it should have) after the timeout limit was reached. It's probably because the Looper message to invoke time out is obtained after the message to dump webview. This change adjusts the order of obtaining the message so hopefully it can make the timeout work for real. Change-Id: I4197699f5aad765c88dc81123d052e4c49d7c53d --- .../src/com/android/dumprendertree/TestShellActivity.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/DumpRenderTree') diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java index d3018e8..fa82070 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java @@ -101,6 +101,7 @@ public class TestShellActivity extends Activity implements LayoutTestController } public void requestWebKitData() { + setDumpTimeout(DUMP_TIMEOUT_MS); Message callback = mHandler.obtainMessage(MSG_WEBKIT_DATA); if (mRequestedWebKitData) @@ -112,12 +113,10 @@ public class TestShellActivity extends Activity implements LayoutTestController case DUMP_AS_TEXT: callback.arg1 = mDumpTopFrameAsText ? 1 : 0; callback.arg2 = mDumpChildFramesAsText ? 1 : 0; - setDumpTimeout(DUMP_TIMEOUT_MS); mWebView.documentAsText(callback); break; case EXT_REPR: mWebView.externalRepresentation(callback); - setDumpTimeout(DUMP_TIMEOUT_MS); break; default: finished(); -- cgit v1.1