Fix DumpRenderTree2 to wait for the WebCore thread to become ready

This is required to make sure that the WebCore thread's message
handlers are ready to receive settings.

Change-Id: I2c4df95e3b7409535b739ada957d93a7e6cd78d6
This commit is contained in:
Steve Block
2010-09-22 15:41:05 +01:00
parent 0e1d6876f9
commit 3cf18f5c96

View File

@@ -327,6 +327,13 @@ public class LayoutTestsExecutor extends Activity {
mCurrentAdditionalTextOutput = null;
mCurrentWebView = createWebViewWithJavascriptInterfaces();
// When we create the first WebView, we need to pause to wait for the WebView thread to spin
// and up and for it to register its message handlers.
if (previousWebView == null) {
try {
Thread.currentThread().sleep(1000);
} catch (Exception e) {}
}
setupWebView(mCurrentWebView);
mEventSender.reset(mCurrentWebView);