This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 1821 - self-hosted tests depend on implementation dependent Document.cloneNode
Summary: self-hosted tests depend on implementation dependent Document.cloneNode
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: ECMAScript Binding (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Curt Arnold
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-28 05:50 UTC by Curt Arnold
Modified: 2005-08-11 15:02 UTC (History)
0 users

See Also:


Attachments

Description Curt Arnold 2005-07-28 05:50:41 UTC
For tests that loaded the same document twice (typically for WRONG_DOCUMENT_ERR related tests), the 
self-hosted framework implementation (selfhtml.js, selfxhtml.js and svgunit.js for HTML, XHTML and 
SVG respectively) called Document.cloneNode(true) on the host document.  Unfortunately, the behavior 
of Document.cloneNode is implementation specific.

This "fix" modifies the framework implementation to fallback to a brute-force document copy if 
Document.cloneNode(true) returns null (as Mozilla/Safari/Konqueror does) or throws an exception (as 
Opera does).  IE 6 does clone the document on a call to Document.cloneNode(true), so it does not call 
the fallback code.  The fallback code calls DOMImplementation.createDocument which was introduced 
in L2 Core so it is possible for a conformant L1 Core implementation to fail the tests, but it is unknown 
if there are any browsers that fall into that category.

The problem does not affect the JSUnit hosted tests which use distinct IFRAME elements for each loaded 
document.