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 6358 - The number of extraneous characters is not always correct
Summary: The number of extraneous characters is not always correct
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 minor
Target Milestone: ---
Assignee: fd
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-05 17:51 UTC by fd
Modified: 2009-01-05 18:02 UTC (History)
0 users

See Also:


Attachments

Description fd 2009-01-05 17:51:50 UTC
HTTPXHTMLResource.countExtraneousChars returns an invalid valid when called with a start parameter greater than 0, because the "for" loop goes

from
  start + 1
to
  length

... instead of from
  start + 1
to
  start + length

As far as I can tell, the only cases when the method is called with a start parameter greater than 0 is while parsing CSS stylesheets. This is not a big deal since the number of extraneous characters in CSS stylesheets is displayed in the moki representation of a resource but not used in tests.


Example
-----
p { color:black;
/*  10  */

}

The additional carriage return after the CSS comment is not counted as extraneous.
Comment 1 fd 2009-01-05 18:02:48 UTC
I updated the "for" loop, and the moki file of the MinimizeTest 7 test case.