- From: Maciej Stachowiak <mjs@apple.com>
- Date: Mon, 20 Mar 2006 03:30:31 -0800
- To: "Web APIs WG (public)" <public-webapi@w3.org>
Hi Everyone, I started on a test suite for Window 1.0. Right now it only covers very basic things, but I tried to cover every conformance requirement in Section 2, Browsing Contexts, or at least put a comment about the need for coverage. Here's the source: http://dev.w3.org/cvsweb/2006/webapi/WindowTestSuite/ecmascript/ I made a spiffy test generator that takes the .js source files and makes published versions of the test suite in various formats: http://dev.w3.org/cvsweb/2006/webapi/WindowTestSuite/scripts/ And here are generated versions of the tests in HTML, XHTML and SVG format: http://dev.w3.org/cvsweb/~checkout~/2006/webapi/WindowTestSuite/publish/ The HTML, XHTML and SVG versions mostly pass in Opera 9, Firefox 1.5, and current development builds of WebKit. Here are some issues I found: - In Safari/WebKit, the tests relating to the Window being the defaultView for the document fail because we didn't make Window and AbstractView the same object. I acknowledge that this is a bug in WebKit and we plan to fix it. - In Opera, "window" and "self" are both strict equal (===) to each other and equal (==) to "this" at global scope, but not strict equal to "this". I think this is a bug in Opera. But maybe the tests and spec should be written to say that to be the same object reference, it is sufficient to be merely equal and not strictly equal. Thoughts? - IE fails all of the defaultView tests because it does not appear to support DOM 2 Views at all. It also fails a really strange subset of the strict equal tests. I am not sure if IE has some alternate way to get from a document to its corresponding window. It's pretty important to have this capability for CDR scenarios, so I would be against dropping it. I think from testing that IE might support this via the "parentWindow" property on document. Despite the name and what the docs say, it gives the actual window object of the document, not the window of the parent frame or anything like that. Should we specify parentWindow in addition, or instead of just relying on defaultView? Mozilla and Safari don't support it, but Opera does. http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/ parentwindow.asp I encourage others to examine and contribute to the tests. It's probably a bad idea for one of the main authors of the spec to also write the test suite, especially if said author is also an implementor. It should be simple to add tests, or to add a new test template if anyone would like to test UAs for languages besides just HTML, XHTML and SVG. Also, please test on other implementations. For instance, I'd love to hear the results on SVG-only implementations like ASV, or on browsers that use layout engines not covered here. Regards, Maciej
Received on Monday, 20 March 2006 11:30:44 UTC