Merge change 27185 into eclair
* changes: Add checks for double-dumping on webkit data.
This commit is contained in:
@ -65,7 +65,13 @@ public class TestShellActivity extends Activity implements LayoutTestController
|
|||||||
mTimedOut = true;
|
mTimedOut = true;
|
||||||
if(mCallback != null)
|
if(mCallback != null)
|
||||||
mCallback.timedOut(mWebView.getUrl());
|
mCallback.timedOut(mWebView.getUrl());
|
||||||
requestWebKitData();
|
if(!mRequestedWebKitData) {
|
||||||
|
requestWebKitData();
|
||||||
|
} else {
|
||||||
|
// if timed out and webkit data has been dumped before
|
||||||
|
// finish directly
|
||||||
|
finished();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
} else if (msg.what == MSG_WEBKIT_DATA) {
|
} else if (msg.what == MSG_WEBKIT_DATA) {
|
||||||
TestShellActivity.this.dump(mTimedOut, (String)msg.obj);
|
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());
|
throw new AssertionError("Requested webkit data twice: " + mWebView.getUrl());
|
||||||
|
|
||||||
mRequestedWebKitData = true;
|
mRequestedWebKitData = true;
|
||||||
|
Log.v(LOGTAG, "message sent to WebView to dump text.");
|
||||||
switch (mDumpDataType) {
|
switch (mDumpDataType) {
|
||||||
case DUMP_AS_TEXT:
|
case DUMP_AS_TEXT:
|
||||||
mWebView.documentAsText(callback);
|
mWebView.documentAsText(callback);
|
||||||
|
Reference in New Issue
Block a user