W3C home > Mailing lists > Public > www-dom-ts@w3.org > October 2001

RE: isSupported12.xml

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Thu, 25 Oct 2001 10:14:11 -0600
Message-ID: <70E215722F6AD511820A000103D141D40AA62B@thor.aeathtl.com>
To: "'www-dom-ts@w3.org'" <www-dom-ts@w3.org>
In a perfect world all the following should return true (based on expectations from hasFeature and the recent errata on hasFeature, but not based on a detailed exegesis of the recommendation):

isSupported("Core","2.0")
isSupported("XML","2.0")
isSupported("Core",null)
isSupported("XML",null)
isSupported("Core","")
isSupported("XML","")
//
//   the last two are questionable, 
//   but the expectations would be that they are true
isSupported("Core","1.0")
isSupported("XML","1.0")


Calling isSupported() with any other feature should simply not throw an exception.  If a method throws an exception (and it isn't enclosed in a <assertDOMException> block), the test will fail, no
assertion needed.  Since the main thing that you are checking is that isSupported() doesn't throw an exception on an unrecognized feature, the easiest way is just to put something like the following
at the bottom of the test:

<!--  should not throw an exception, 
      can't assert an expectation on the return value  -->
<isSupported var="isSupported"
             feature='"!!!!InvalidFeature!!!!"' 
             version='"!!!!"'/>
Received on Thursday, 25 October 2001 12:16:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 April 2009 12:58:45 GMT