RESOLVED FIXED 32441
[GTK] Fails fast/parser/xhtml-close-while-parsing.xhtml
https://bugs.webkit.org/show_bug.cgi?id=32441
Summary [GTK] Fails fast/parser/xhtml-close-while-parsing.xhtml
Gustavo Noronha (kov)
Reported 2009-12-11 11:07:19 PST
This test fails because, javascript stops execution when we destroy the WebView, here: window.close(); if (window.layoutTestController) layoutTestController.notifyDone(); The notifyDone() call is never reached. If we delay the destruction of the webView with g_idle_add the test passes (see diff bellow). The problem is that, with that change, another test starts failing: fast/dom/location-new-window-no-crash.html. It fails because the webView is not destroyed when it checks for it: testWindow.close(); if (window.layoutTestController) { function doneHandler() { if (testWindow.closed) { layoutTestController.notifyDone(); return; } setTimeout(doneHandler, 0); } doneHandler(); } We are either doing something wrong in our WebView destruction code, or this setTimeout-based loop is not letting the mainloop run. No clue what to do, so I'll skip the test that is failing right now. diff --git a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp index fd1e3c6..178e2af 100644 --- a/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp +++ b/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp @@ -694,13 +694,25 @@ static void webViewStatusBarTextChanged(WebKitWebView* vie w, const gchar* messag } } -static gboolean webViewClose(WebKitWebView* view) +static gboolean webViewCloseReal(gpointer data) { - ASSERT(view); + WebKitWebView* view = static_cast<WebKitWebView*>(data); webViewList = g_slist_remove(webViewList, view); g_object_unref(view); + return FALSE; +} + +static gboolean webViewClose(WebKitWebView* view) +{ + ASSERT(view); + + // If we destroy the view here, the rest of the test's script has + // no chance to run, which may cause notifyDone() to not be + // called, so schedule its destruction. + g_idle_add(webViewCloseReal, view); + return TRUE; }
Attachments
Martin Robinson
Comment 1 2011-02-08 12:31:28 PST
I unskipped this one and it's passing now. Closing.
Note You need to log in before you can comment on or make changes to this bug.