Reftests that need to wait after onload

Sometimes reftests need to wait for the screenshot to be taken after 
onload has happened. It seems that CSS have adopted the gecko mechanism 
of signaling this using a class called "reftest-wait" on the root 
element. This class is removed when the screenshot should be taken. 
Unless there are any objections, I suggest we also adopt this mechanism. 
There are some tests (at the least the WebVTT tests) in the tree that 
need some kind of wait mechanism but are not using this approach (at 
present they seem to be using a mechanism that depends on Presto's 
ability to signal an empty event queue).

One problem is that some existing tests navigate the reftest page. This 
doesn't work well when waiting for the root element to change classes 
both for theoretical reasons (there are multiple root elements in the 
test, so it's not entirely clear what the "right" behaviour is) and 
practical ones (the natural webdriver-based implementation is to inject 
a script that adds a mutation observer and returns control to the driver 
when the reftest-wait class has removed. At least in the Gecko case 
webdriver gets grumpy if the page is navigated whilst it's running a 
script). I'm not sure what the right solution here is.

I also note that some of the WebVTT tests seem to depend on a video of 
dimensions 1280x720. It would be great if we could reduce this to at 
most 800x600 (and 600x600 might be preferable).

Received on Saturday, 26 April 2014 23:51:16 UTC