replaceChild(newnode,document) throws wrong exception

VERIFIED FIXED in M15

Status

()

Core
DOM: Core & HTML
P3
normal
VERIFIED FIXED
19 years ago
10 years ago

People

(Reporter: dbaron, Assigned: vidur (gone))

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [HAVE FIX])

(Reporter)

Description

19 years ago
DESCRIPTION:  Calling Node.replaceChild(newnode,document) should throw a
NOT_FOUND_ERR rather than a HIERARCHY_REQUEST_ERR because the document is not an
already existing child of Node.  A HIERARCHY_REQUEST_ERR would be appropriate if
document were the first argument and were being inserted.

STEPS TO REPRODUCE:
 * Load http://www.fas.harvard.edu/~dbaron/dom/test/one-core-xml/exceptions
   or http://www.fas.harvard.edu/~dbaron/dom/test/one-core-html/exceptions
 * hit test

ACTUAL RESULTS:
 * the line below the line "Trying helem.replaceChild(pelem,document) :" is
   red.  This line is right before the bold heading starting the tests for
   removeChild().  It currently shows that a HIERARCHY_REQUEST_ERR is being
   thrown.

EXPECTED RESULTS:
 * the line should be green

DOES NOT WORK CORRECTLY ON:
 * Linux, viewer, 1999-10-15-11-M11
(Reporter)

Comment 1

19 years ago
calling removeChild(document) has the exact same problem.  It should throw
NOT_FOUND_ERR, I think, rather than HIERARCHY_REQUEST_ERR.  removeChild() is
definitely not permitted to throw a HIERARCHY_REQUEST_ERR - it's not among the
listed codes.

The relevant test is the one right below the previous one described - the first
test under the removeChild() section.
(Assignee)

Comment 2

19 years ago
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
(Assignee)

Comment 3

18 years ago
Johnny Stenback has a fix for this waiting in his tree.
Whiteboard: [HAVE FIX]
Target Milestone: M15
The fix is checked in now, marking FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 5

18 years ago
Mass update of qa contact
QA Contact: gerardok → janc
Component: DOM Level 1 → DOM HTML

Comment 6

17 years ago
QA contact Update
QA Contact: janc → desale

Comment 7

17 years ago
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala

Comment 8

17 years ago
verified
Status: RESOLVED → VERIFIED

Updated

10 years ago
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.