diff options
author | Guang Zhu <guangzhu@google.com> | 2011-05-16 11:06:53 -0700 |
---|---|---|
committer | Guang Zhu <guangzhu@google.com> | 2011-05-16 11:06:53 -0700 |
commit | 97499df874f680eaa55d96074f3dcca34685ca12 (patch) | |
tree | 2576eeff1816b15397e41586c6d84e43df41cca2 | |
parent | ce29ea93f62e9839be86d154f9d146a053f5bec2 (diff) | |
download | frameworks_base-97499df874f680eaa55d96074f3dcca34685ca12.zip frameworks_base-97499df874f680eaa55d96074f3dcca34685ca12.tar.gz frameworks_base-97499df874f680eaa55d96074f3dcca34685ca12.tar.bz2 |
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
-rw-r--r-- | tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java | 3 |
1 files changed, 1 insertions, 2 deletions
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(); |