[Webkit-unassigned] [Bug 31626] New: [Qt] layoutTestController.notifyDone() not working when the frame was reloaded.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 18 05:24:38 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31626

           Summary: [Qt] layoutTestController.notifyDone() not working
                    when the frame was reloaded.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: Qt
          Severity: Normal
          Priority: P3
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: kenneth at webkit.org
            Blocks: 31552


So let's see if I can explain this easily.

Lets focus on one of the layout tests
fast/dom/javascript-url-crash-function.html resulting in timeout.

This test calls waitUntilDone from the mainframe and creates an iframe, calling
a function and then calling notifyDone.

 9 if (window.layoutTestController) {
10     layoutTestController.dumpAsText();
11     layoutTestController.dumpChildFramesAsText();
12     layoutTestController.waitUntilDone();
13 }

This above part works perfectly fine.

Now looking at the code exporting our QObject based LayoutTestController to JS,
initJSObjects is called 3 times, which might seem strange. The last two are
called for the iframe. It is not that strange if you look at the code of the
iframe

 1 <script>
 2 function test()
 3 {
 4     (function ()
 5     {
 6         (function ()
 7         {
 8             (function ()
 9             {
10                 frameElement.src = "javascript:'<pre>PASS: You didn\\'t
crash.</pre>'";
11             })()
12         })()
13     })()
14 }
15
16 setTimeout(function ()
17 {
18     test();
19     if (window.layoutTestController)
20         layoutTestController.notifyDone();
21
22 }, 0);
23 </script>

As you notice, the frameElement.src reloads the frame, so the
javaScriptWindowObjectCleared () signal will be called again, resulting in
initJSObjects being called.

OK, let's get to the problem.

19     if (window.layoutTestController)
20         layoutTestController.notifyDone();

is not working! window.layoutTestController is true, but
layoutTestController.notifyDone() does nothing. Replacing it with
window.layoutTestController.notifyDone() make the test pass, but isn't right.

The frameElement.src = is the result of this. Out commenting that instead of
adding the window. makes the test not timeout.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list