WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
Bug 4569
DOM tests expect "wrong document" exception
https://bugs.webkit.org/show_bug.cgi?id=4569
Summary
DOM tests expect "wrong document" exception
Darin Adler
Reported
2005-08-21 17:29:56 PDT
The following W3C DOM Level 1 Core tests are failing: hc_attrappendchild5 hc_attrinsertbefore6 hc_nodeappendchildnewchilddiffdocument hc_nodeinsertbeforenewchilddiffdocument hc_nodereplacechildnewchilddiffdocument In all these cases, I believe the reason for the failure is that we don't give the "wrong document" exception when moving nodes between documents. As I read the standard, it's up to the implementation whether or not it gives this exception. We chose to support moving the nodes between documents, so I think the tests may be wrong.
Attachments
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2005-08-26 19:55:21 PDT
Curt, what do you think? Is this an error in the tests?
Curt Arnold
Comment 2
2005-08-26 21:00:54 PDT
The phrasing in
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/
core.html#ID-184E7107 for WRONG_DOCUMENT_ERR is consistent with a required exception. Contrast that with NOT_SUPPORTED_ERR which contains a phrase "might be raised". This may be another one to raise to the IG. The test as written is consistent with the Java implementations, the original NIST tests and my reading of the recommendation. However, I do not believe any browser raises the WRONG_DOCUMENT_ERR, though I'm not sure what they do in that situation. There may be a case for an errata to change the phrasing to "May be raised" based existing implementations with corresponding changes to the tests.
Maciej Stachowiak
Comment 3
2005-12-03 01:33:06 PST
The DOM working group does not seem amenable to issuing an erratum for this (although it has been discovered that the spec wording may already make the exception optional).
Ian 'Hixie' Hickson
Comment 4
2008-01-06 17:23:23 PST
We should totally change the spec on this, at least for the Web DOM Core version. This is a pointless restriction that in practice doesn't affect any browsers as far as I can tell.
Alexey Proskuryakov
Comment 5
2009-02-16 02:48:27 PST
See also:
bug 12339
.
Lucas Forschler
Comment 6
2019-02-06 09:03:26 PST
Mass moving XML DOM bugs to the "DOM" Component.
Ahmad Saleem
Comment 7
2022-08-05 15:22:47 PDT
*** Safari 15.6 on macOS 12.5 ***
> hc_attrappendchild5
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild5
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_attrinsertbefore6
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore6
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_nodeappendchildnewchilddiffdocument
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildnewchilddiffdocument
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_nodeinsertbeforenewchilddiffdocument
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenewchilddiffdocument
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_nodereplacechildnewchilddiffdocument
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnewchilddiffdocument
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed *** Firefox Nightly 105 ***
> hc_attrappendchild5
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild5
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_attrinsertbefore6
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore6
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_nodeappendchildnewchilddiffdocument
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildnewchilddiffdocument
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_nodeinsertbeforenewchilddiffdocument
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenewchilddiffdocument
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_nodereplacechildnewchilddiffdocument
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnewchilddiffdocument
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed *** Chrome Nightly 106 ***
> hc_attrappendchild5
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild5
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_attrinsertbefore6
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore6
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_nodeappendchildnewchilddiffdocument
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildnewchilddiffdocument
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_nodeinsertbeforenewchilddiffdocument
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenewchilddiffdocument
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed
> hc_nodereplacechildnewchilddiffdocument
Test:
http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodereplacechildnewchilddiffdocument
Status: failure Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed ____________ Link -
https://www.w3.org/2007/03/dom-tests/
Since all browsers are matching each other as of today on these test cases (I know they might not be valid but I just wanted to test to ensure that the behavior is consistent). I am going to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks! If I am incorrect, please tag this accordingly. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug