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 673 - reworking of select tests concerning [element content whitespace]
Summary: reworking of select tests concerning [element content whitespace]
Status: RESOLVED FIXED
Alias: None
Product: DOM TS
Classification: Unclassified
Component: DOM Level 3 (show other bugs)
Version: unspecified
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: Philippe Le Hegaret
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-15 13:00 UTC by nnissar
Modified: 2004-05-08 06:37 UTC (History)
0 users

See Also:


Attachments
Proposed patch with reworked element content whitespace tests (3.57 KB, patch)
2004-04-15 13:07 UTC, nnissar
Details
Alternative fix for raised issues (35.50 KB, patch)
2004-05-08 02:37 UTC, Curt Arnold
Details

Description nnissar 2004-04-15 13:00:49 UTC
L3 Core test domconfigurationcansetparameter06 tests the functionality of 
isElementContentWhitespace, however "if there is no declaration for the 
containing element, or there are multiple declarations, this property has no 
value for white space characters" [1] In hc_staff.xml, there is no declaration 
for the element strong.  Suggest modifying the test so that barfoo.xml is 
loaded instead.

Similarly, for LS test elementcontentwhitespace01, whitespace cannot be 
expected to be eliminated if there is no declaration for the containing element 
p.  Suggest modifying the test so that test3.xml is used instead.

[1]http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#infoitem.character
Comment 1 nnissar 2004-04-15 13:07:07 UTC
Created attachment 354 [details]
Proposed patch with reworked element content whitespace tests
Comment 2 Curt Arnold 2004-05-08 02:36:01 UTC
The domconfigurationcansetparameter* tests seem seriously confused.  From the
title, you'd assume that they'd basically check the behavior of the
canSetParameter.  However, almost all of the test is checking that asking if you
can set a value to a specific value effectively changes the value by looking at
the changes after normalizing a document.  If there was such a flaw, there is a
very high probability that it would actually change the property and you won't
need to try to detect it indirectly.  So you could do:

<canSetProperty var="canSet" obj="domConfig" 
     name='"element-content-whitespace"' value="false"/>
<getProperty var="paramVal" 
       obj="domConfig" name='"element-content-whitespace"'/>
<assertTrue actual="paramVal" id="shouldNotHaveActuallyChangedValue"/>


The proposed domconfigurationcansetparameter06 also assumes that whitespace
exists in the document, but it may have been eliminated on load.

In addition, several of the tests specify willBeModified="false", but then call
normalizeDocument.

I've walked through the tests and tried to correct the problems I saw.
elementcontentwhitespace looked unnecessarily complex, but valid to me.  I've
stripped it down, but should be equivalent to the old test.
Comment 3 Curt Arnold 2004-05-08 02:37:51 UTC
Created attachment 361 [details]
Alternative fix for raised issues