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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user