[HTML5][Patch] HTML5 parser fails test_nsIAccessibleHyperLink.html

RESOLVED FIXED

Status

()

Core
HTML: Parser
P1
normal
RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: hsivonen, Assigned: hsivonen)

Tracking

Other Branch
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Priority: -- → P1
1673 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong startIndex value for ID noLink! - got 255, expected 254
1674 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong endIndex value for ID noLink! - got 256, expected 255
1684 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong startIndex value for ID linkWithClick! - got 294, expected 292
1685 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong endIndex value for ID linkWithClick! - got 295, expected 293
1694 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong startIndex value for ID linkWithTitleNoNameFromSubtree! - got 347, expected 344
1695 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong endIndex value for ID linkWithTitleNoNameFromSubtree! - got 348, expected 345
1704 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong startIndex value for ID linkWithTitleNameFromSubtree! - got 397, expected 393
1705 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong endIndex value for ID linkWithTitleNameFromSubtree! - got 398, expected 394
1714 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong startIndex value for ID linkWithTitleNameFromImg! - got 452, expected 447
1715 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong endIndex value for ID linkWithTitleNameFromImg! - got 453, expected 448
1724 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong startIndex value for ID linkWithLabelNoNameFromSubtree! - got 456, expected 450
1725 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/a11y/accessible/test_nsIAccessibleHyperLink.html | Wrong endIndex value for ID linkWithLabelNoNameFromSubtree! - got 457, expected 451
What do the startIndex and endIndex refer to?

I notice couple of oddities in the test file:
 1) End tag </img> (ignored by the HTML5 parser)
 2) End tag </br> (turns into <br> in the HTML5 parser)

Also, I notice that the test markup tries to avoid inter-element whitespace. However, the whitespace between </body> and </html> and the whitespace after </html> gets hoisted into body by the HTML5 parser.
(In reply to comment #2)
> What do the startIndex and endIndex refer to?

I had to look this up actually.

startIndex is the offset of the link within the parent accessible.

endIndex is the end index of the link within the parent accessible, but because the link is represented by one embedded character within the parent text, it ends up being startIndex + 1.
I'm not sure what to make of the failures in comment 1. Any thoughts why the offsets would change when the html5 parser is used?
</br> causes badness, since it gets eaten by the old parser.
Good point, are you editing the test?
I'm editing it, but my edit cycle will be slow, since the tryserver is part of the cycle.
Yeah, note this might work for you: python runtests.py --a11y (assuming your mozconfig is setup for tests)
Status: NEW → ASSIGNED
Assignee: nobody → hsivonen
Created attachment 418848 [details] [diff] [review]
Remove bogus end tags of void elements
Attachment #418848 - Flags: review?(surkov.alexander)
Summary: [HTML5] HTML5 parser fails test_nsIAccessibleHyperLink.html → [HTML5][Patch] HTML5 parser fails test_nsIAccessibleHyperLink.html

Updated

8 years ago
Attachment #418848 - Flags: review?(surkov.alexander) → review+
http://hg.mozilla.org/mozilla-central/rev/f8b8f2f214d6
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.