Closed
Bug 545403
Opened 14 years ago
Closed 14 years ago
[HTML5][Patch] dom/tests/mochitest/dom-level1-core/test_hc_documentgetdoctype.html fails
Categories
(Core :: DOM: HTML Parser, defect, P1)
Tracking
()
RESOLVED
FIXED
People
(Reporter: hsivonen, Assigned: hsivonen)
Details
Attachments
(1 file, 1 obsolete file)
868 bytes,
patch
|
mozilla+ben
:
review+
|
Details | Diff | Splinter Review |
dom/tests/mochitest/dom-level1-core/test_hc_documentgetdoctype.html fails. It expects the doctype name in different case.
Assignee | ||
Updated•14 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Assignee | ||
Updated•14 years ago
|
Summary: [HTML5] dom/tests/mochitest/dom-level1-core/test_hc_documentgetdoctype.html fails → [HTML5][Patch] dom/tests/mochitest/dom-level1-core/test_hc_documentgetdoctype.html fails
Assignee | ||
Comment 2•14 years ago
|
||
The test and the old parser were previously changed to match a now-obsolete snapshot of the WHATWG spec. Now HTML5 has changed to lower-case the doctype name instead of upper-casing it.
Attachment #426666 -
Attachment is obsolete: true
Attachment #428390 -
Flags: review?(bnewman)
Comment 3•14 years ago
|
||
Comment on attachment 428390 [details] [diff] [review] Change the test to accept both upper and lower case, with proper indent >- // modified to uppercase per WHATWG >- assertEquals("nodeName","HTML",docTypeName); >+ // Modified to allow lower case for the HTML5 parser and upper case for the old parser >+ assertTrue("nodeName", "HTML" == docTypeName || "html" == docTypeName); Alternatively, if you want to keep readability of assertion failure messages, you could do assertEquals("nodeName", "html", docTypeName.toLowerCase()); Your call.
Attachment #428390 -
Flags: review?(bnewman) → review+
Assignee | ||
Comment 4•14 years ago
|
||
(In reply to comment #3) > (From update of attachment 428390 [details] [diff] [review]) > >- // modified to uppercase per WHATWG > >- assertEquals("nodeName","HTML",docTypeName); > >+ // Modified to allow lower case for the HTML5 parser and upper case for the old parser > >+ assertTrue("nodeName", "HTML" == docTypeName || "html" == docTypeName); > > Alternatively, if you want to keep readability of assertion failure messages, > you could do > > assertEquals("nodeName", "html", docTypeName.toLowerCase()); > > Your call. Thanks. Pushed as is: http://hg.mozilla.org/mozilla-central/rev/ee56d65affa3 toLowerCase() would allow "hTmL", which is unwanted.
Assignee | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•