This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6818 - Running the Checker on an image may return PASS or crash the library
Summary: Running the Checker on an image may return PASS or crash the library
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: Other All
: P2 normal
Target Milestone: ---
Assignee: fd
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-16 11:24 UTC by fd
Modified: 2009-04-20 16:00 UTC (History)
0 users

See Also:


Attachments

Description fd 2009-04-16 11:24:54 UTC
The Checker is supposed to run on XHTML page. It makes every attempt to decode the primary resource as XHTML even if it just doesn't look as XHTML at all.

Running the Checker on an image currently produces weird results, e.g.:
* on http://www.w3.org/Mobile/MWI.gif:
 the moki representation seems to be correctly generated, but the final outcome is PASS!

* on http://www.w3.org/Mobile/MWI.png:
 the Checker crashes while trying to decode the image as XHTML content.

[ FWIW: the bug was not introduced by the re-factoring. It already existed in the previous version of the library]
Comment 1 fd 2009-04-20 15:22:53 UTC
Although there is not an entire overlap, the bug is somewhat connected to Bug 5921 and to Bug 6284, as they all are triggered by the fact that the code expects that the primary resource will be decoded somehow, whereas it may well be that we can't decode anything in the end.
Comment 2 fd 2009-04-20 16:00:28 UTC
Changes to XhtmlContent
-----
Code updated to handle the case when the body of the resource could not be decoded or could not be parsed as XHTML at all.

The XHTML doc info node is output to the moki representation even when the document could not be parsed.


Changes to Resource
-----
Only output the decoded content when the string matches the XML Char production rule. Binary content may include "characters" in the range 00-31 which would make further XML parsing crash with a well-formedness error if they were serialized. That's another reason to clarify the meaning of the entity element (see Bug 6822).


Changes to AbstractCSSTestImplementation
-----
Don't crash when the document's content can not be found, simply do not execute the tests.