W3C home > Mailing lists > Public > public-html-testsuite@w3.org > February 2010

HTML DOM Test Case Incorrect (HTMLDocument03.html)

From: Kris Krueger <krisk@microsoft.com>
Date: Tue, 16 Feb 2010 00:53:28 +0000
To: "'public-html-testsuite@w3.org'" <'public-html-testsuite@w3.org'>
Message-ID: <3607818D324EC04E8767AA21E274C023282B4910@TK5EX14MBXW652.wingroup.windeploy.ntdev.microsoft.com>
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.

-Kris

The Details
http://www.w3.org/2004/04/ecmascript/level2/html/HTMLDocument03.html

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 http://dev.w3.org/html5/spec/Overview.html#dom-document-domain

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 00:54:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 16 February 2010 00:54:06 GMT