Re: HTML DOM Test Case Incorrect (HTMLDocument03.html)

On Feb 15, 2010, at 4:53 PM, Kris Krueger wrote:

> At the last conf call, we discussed leveraging the older DOM HTML  
> Test Suite for the HTML5 Test Suite.
> Since that meeting I have been reviewing the test cases from this  
> test suite looking for interop problems.
> I have come across a case that is incorrect per the HTML5  
> specification.
> If you don't agree then please respond back to this thread or at the  
> next conf call.

I think you are right in your assessment of this particular case. My  
guess is it may not be the only case that is wrong per HTML5. Probably  
all of them should be reviewed against HTML5 requirements.


> -Kris
> The Details
> This test case expects that the document.domain be set to "", which  
> is not the current state of browsers which do what the spec states.   
> As such I'd like to move this case into the HTML5 test suite and  
> then update this case so that it matches the HTML5 spec.
> See
> 5.3.1 Relaxing the same-origin restriction
> The domain  attribute on Document objects must be initialized to the  
> document's domain, if it has one, and the empty string otherwise. If  
> the value is an IPv6 address, then the square brackets from the host  
> portion of the <host> component must be omitted from the attribute's  
> value.
> For ones that are not familiar with the DOM HTML Tests, basically  
> for this test (HTMLDocument03.html) run the following code
> The 'assert' checks that the last two parameters are equal, which is  
> what fails
> function HTMLDocument03() {
>   var success;
>    if(checkInitialization(builder, "HTMLDocument03") != null) return;
>    var nodeList;
>      var testNode;
>      var vdomain;
>      var doc;
>      var docRef = null;
>      if (typeof(this.doc) != 'undefined') {
>        docRef = this.doc;
>      }
>      doc = load(docRef, "doc", "document");
>      vdomain = doc.domain;
>      assertEquals("domainLink","",vdomain);
> }

Received on Tuesday, 16 February 2010 04:49:52 UTC