Andrew Halberstadt wrote:

On 01/07/2014 07:23 PM, Neil wrote:

I tried to check in a reftest today. Apparently it fails on Android and b2g. The failure mode appears to be that the reftest takes a screenshot before the test has loaded (the page is still blank, whereas it should have a red square for failure or a green square for success). Do reftests execute differently on those platforms?

The way they are initialized is different, and they load tests from a server instead of a file:// url, but other than that the way they are executed should be the same.

Ah, but it makes a subtle difference to the way XHR works; from a server, it will parse according to the MIME type, which was HTML in my case, but from a file:// URL, it always parses in XML, even if the document would normally load as HTML (i.e. you XHR for a .html document). I certainly found this behaviour unexpected, even if it isn't a bug.

This then triggered another unexpected behaviour, which is that XHR's XML parsing blocks onload but its HTML parsing does not. Therefore my XHR had not loaded on Android or B2G when the reftest's screenshot was taken. This explains my original problem.

I've tried switching to XHTML to avoid the problem, and the good news is that my XHR now loads before the screenshot is taken. The bad news is that the test still fails, as if the patch wasn't in place. I guess I need to test with a server rather than just local files.

--
Warning: May contain traces of nuts.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to