summaryrefslogtreecommitdiffstats
path: root/tests/DumpRenderTree/src
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2009-09-25 17:34:12 -0700
committerGuang Zhu <guangzhu@google.com>2009-09-28 09:20:20 -0700
commit7216047ac3e9613f3b689fa637e205943b51f069 (patch)
tree1bc4010f97135c3c430c44f165812971ad2ac77d /tests/DumpRenderTree/src
parent954e98e023568b354aeec0a54668155ad9083398 (diff)
downloadframeworks_base-7216047ac3e9613f3b689fa637e205943b51f069.zip
frameworks_base-7216047ac3e9613f3b689fa637e205943b51f069.tar.gz
frameworks_base-7216047ac3e9613f3b689fa637e205943b51f069.tar.bz2
Add checks for double-dumping on webkit data.
Also some logs seem to suggest that in rare occations, a webkit dump after timeout has occured actually never hears any response back from webkit, thus causing the test app to wait forever, because the request webkit data mechanism is not protected by a timeout watchdog. So adding a explicit log print before calling webkit dump for monitoring in future test runs.
Diffstat (limited to 'tests/DumpRenderTree/src')
-rw-r--r--tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
index 39b8774..5a8cf2a 100644
--- a/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
+++ b/tests/DumpRenderTree/src/com/android/dumprendertree/TestShellActivity.java
@@ -65,7 +65,13 @@ public class TestShellActivity extends Activity implements LayoutTestController
mTimedOut = true;
if(mCallback != null)
mCallback.timedOut(mWebView.getUrl());
- requestWebKitData();
+ if(!mRequestedWebKitData) {
+ requestWebKitData();
+ } else {
+ // if timed out and webkit data has been dumped before
+ // finish directly
+ finished();
+ }
return;
} else if (msg.what == MSG_WEBKIT_DATA) {
TestShellActivity.this.dump(mTimedOut, (String)msg.obj);
@@ -83,6 +89,7 @@ public class TestShellActivity extends Activity implements LayoutTestController
throw new AssertionError("Requested webkit data twice: " + mWebView.getUrl());
mRequestedWebKitData = true;
+ Log.v(LOGTAG, "message sent to WebView to dump text.");
switch (mDumpDataType) {
case DUMP_AS_TEXT:
mWebView.documentAsText(callback);