Re: Single file tests

On Wed, 02 Apr 2014 12:38:28 +0200, James Graham <>  

> I worry that doing DOM magic before the tests have run leads to  
> hard-to-debug issues. For example if someone has a test that does
> document.getElementsByTagName("script")[3]
> and they only count the scripts that they can see on the page, they will  
> have issues. The more DOM manipulation that the harness does, the less  
> likely it is to run in new UAs; using things like postMessage has  
> already been a problem for Servo (and onerror may have similar problems,  
> but maybe the benefits are worth it). So all in all I think that  
> explicit is better than implicit here.

I agree. The harness should do as little as possible. Anything it does  
interferes with tests that try to test the used feature or even seemingly  
unrelated features that happen to be affected. For instance, if the  
harness were to inject a script element at some point (onload?), that  
would make it hard to reason about e.g. stylesheets blocking on scripts,  
the salvageable state on navigation, the behavior of document.write,  

Simon Pieters
Opera Software

Received on Thursday, 3 April 2014 08:37:11 UTC