<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>4569</bug_id>
          
          <creation_ts>2005-08-21 17:29:56 -0700</creation_ts>
          <short_desc>DOM tests expect &quot;wrong document&quot; exception</short_desc>
          <delta_ts>2022-08-05 15:23:04 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>4565</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Darin Adler">darin</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>andersca</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>curt.arnold</cc>
    
    <cc>emacemac7</cc>
    
    <cc>ian</cc>
    
    <cc>rniwa</cc>
    
    <cc>vicki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>17068</commentid>
    <comment_count>0</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-08-21 17:29:56 -0700</bug_when>
    <thetext>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&apos;t give the &quot;wrong document&quot; 
exception when moving nodes between documents.

As I read the standard, it&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17727</commentid>
    <comment_count>1</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-08-26 19:55:21 -0700</bug_when>
    <thetext>Curt, what do you think? Is this an error in the tests?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17732</commentid>
    <comment_count>2</comment_count>
    <who name="Curt Arnold">curt.arnold</who>
    <bug_when>2005-08-26 21:00:54 -0700</bug_when>
    <thetext>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 &quot;might be raised&quot;.

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&apos;m not sure what they do in that 
situation.  There may be a case for an errata to change the phrasing to &quot;May be raised&quot; based existing 
implementations with corresponding changes to the tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25426</commentid>
    <comment_count>3</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2005-12-03 01:33:06 -0800</bug_when>
    <thetext>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).
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66420</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2008-01-06 17:23:23 -0800</bug_when>
    <thetext>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&apos;t affect any browsers as far as I can tell.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109836</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-02-16 02:48:27 -0800</bug_when>
    <thetext>See also: bug 12339.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1502969</commentid>
    <comment_count>6</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:03:26 -0800</bug_when>
    <thetext>Mass moving XML DOM bugs to the &quot;DOM&quot; Component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889245</commentid>
    <comment_count>7</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-05 15:22:47 -0700</bug_when>
    <thetext>*** Safari 15.6 on macOS 12.5 ***

&gt; hc_attrappendchild5

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild5
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; hc_attrinsertbefore6

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore6
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; hc_nodeappendchildnewchilddiffdocument

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildnewchilddiffdocument
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; hc_nodeinsertbeforenewchilddiffdocument

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenewchilddiffdocument
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; 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 ***

&gt; hc_attrappendchild5

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild5
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; hc_attrinsertbefore6

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore6
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; hc_nodeappendchildnewchilddiffdocument

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildnewchilddiffdocument
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; hc_nodeinsertbeforenewchilddiffdocument

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenewchilddiffdocument
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; 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 ***

&gt; hc_attrappendchild5

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrappendchild5
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; hc_attrinsertbefore6

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrinsertbefore6
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; hc_nodeappendchildnewchilddiffdocument

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeappendchildnewchilddiffdocument
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; hc_nodeinsertbeforenewchilddiffdocument

Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_nodeinsertbeforenewchilddiffdocument
Status: failure
Detail: throw_WRONG_DOCUMENT_ERR: assertTrue failed

&gt; 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 &quot;RESOLVED CONFIGURATION CHANGED&quot;. Thanks!

If I am incorrect, please tag this accordingly. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>