Bug 15219 - fast/dom/replaceChild and clientWidthAfterDocumentIsRemoved have invalid expected output
Summary: fast/dom/replaceChild and clientWidthAfterDocumentIsRemoved have invalid expe...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: LayoutTestFailure
Depends on:
Blocks:
 
Reported: 2007-09-14 16:50 PDT by Matt Perry
Modified: 2007-09-18 08:36 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Perry 2007-09-14 16:50:24 PDT
Both of these tests remove a child iframe from the document.  Inside ContainerNode::removeChild, a call to willRemoveChild dispatches some events that leads to a load-completed event being fired, and the render tree is dumped prematurely (ie, before the child nodes are removed from the tree).  The DRT expected output contains the nodes that have been removed, which is clearly incorrect.

The scary thing here is that a load completed event is being fired from within a removeChild call!
Comment 1 David Kilzer (:ddkilzer) 2007-09-18 08:29:58 PDT
Also, LayoutTests/fast/dom/resources/replaceChildHelper.html is not well-formatted (<body> tag does not immediately follow </head> tag).

Comment 2 David Kilzer (:ddkilzer) 2007-09-18 08:35:13 PDT
Confirmed with a local debug build of WebKit r25545 on Safari 3 Public Beta v. 3.0.3 (522.12.1) on Mac OS X 10.4.10 (8R218).

Viewing the test with the Web Inspector shows no <iframe> element left in the DOM.  However, the render tree dump clearly shows an <iframe> element in the DOM.

http://trac.webkit.org/projects/webkit/browser/trunk/LayoutTests/fast/dom/replaceChild-expected.txt#L7

Comment 3 David Kilzer (:ddkilzer) 2007-09-18 08:36:26 PDT
(In reply to comment #1)
> Also, LayoutTests/fast/dom/resources/replaceChildHelper.html is not
> well-formatted (<body> tag does not immediately follow </head> tag).

Or "well-formed".

http://trac.webkit.org/projects/webkit/browser/trunk/LayoutTests/fast/dom/resources/replaceChildHelper.html#L16