Bug 11042 - navigationController is borked
Summary: navigationController is borked
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-26 01:21 PDT by Eric Seidel (no email)
Modified: 2009-10-29 07:41 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2006-09-26 01:21:56 PDT
navigationController is borked

Trying to use it just hangs DRT.

See attached test case:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="400" width="400">
<style type="text/css">
  circle { fill: maroon; }
  a:visited circle { fill: green; }
</style>
<script type="text/javascript">
  <![CDATA[
    if (window.layoutTestController) {
      layoutTestController.waitUntilDone();
      navigationController.evalAfterBackForwardNavigation("layoutTestController.notiftyDone()");
    }
  ]]>
</script>
<a xlink:href="002.xml" xlink:type="simple"><circle cx="200" cy="200" r="100" fill="red"/></a>
</svg>
Comment 1 Eric Seidel (no email) 2006-09-26 01:22:46 PDT
Hum.. maybe it was my use of "notiftyDone" instead of notifyDone... I'll have to check.
Comment 2 Eric Seidel (no email) 2006-09-27 13:39:07 PDT
Even after fixing my typo, the test still seems to hang.
Comment 3 mitz 2006-09-28 04:01:53 PDT
The script is executing again as a result of loading the test again (DRT doesn't use the back/forward cache), so evalAfterBackForwardNavigation is getting called repeatedly without ever finishing.

I think you can patch NavigationController to prevent this kind of "reentrancy" - simply don't do anything in -evaluateWebScript:afterBackForwardNavigation: if pendingAction != None. (You'll also need to reset the pendingAction from runTest() in case the previous test bailed before completing).

(I was wondering how all the other tests that use navigationController don't loop endlessly, and found only one such test, which is currently disabled. When enabled it also loops).