In bug 773482 the "browser.tabs.remote" pref was set which causes b2g reftests to get run out of process. Unfortunately this means that ctx.drawWindow() no longer works and every canvas is rendered with a black screen instead of the contents of the window (see http://mxr.mozilla.org/mozilla-central/source/layout/tools/reftest/reftest.js#1275)
Created attachment 654367 [details] [diff] [review] Patch 1.0 - Disable oop reftests on b2g For now, just disable oop reftests until we figure out the underlying issue.
We have very carefully implemented support for capturing renderings of cross-process content in the reftest harness. This seems like a separate problem.
Created attachment 654597 [details] data image that is rendered on each canvas It could definitely be a separate issue. All I know is that setting browser.tabs.remote=true results in each gCurrentCanvas being rendered with this data url. To verify call gCanvas1.toDataURL() at this point: http://mxr.mozilla.org/mozilla-central/source/layout/tools/reftest/reftest.js#1445 Note that every == test will pass no matter what and every != test will fail no matter what.
The problem isn't that the harness fails to run tests oop, the tests are loaded and run fine. The problem is that when calling drawWindow with gContainingWindow, the content from the iframe's contentWindow isn't being captured. I think what we need to do is pass in <iframe mozbrowser>.contentWindow instead of using gContainingWindow. Unfortunately <iframe mozbrowser>.contentWindow is null from the chrome process and nsIContentFrameMessageManager.sendSyncMessage doesn't support passing JS objects yet so I'm not sure how to get a reference of the content window from the chrome process. cjones: any ideas? Or who would be the best person to ask about this?
We have to drawWindow() the top-level chrome window that contains the content being snapshotted. This is on my list but keeps getting pushed back.
Do you mean to say this needs to be fixed in the reftest harness? Or in drawWindow()? I've tried calling drawWindow with just about every window I can think of in the reftest harness, and nothing seems to work.
The reftest harness. We had reports of screenshotting (in another use case) breaking, so it's also possible that drawWindow() isn't working with remote content.
Please re-nom if this is preventing running more than one test (or if you disagree). If not, it doesn't seem like a blocker.
This bug prevents us from running any meaningful reftests of b2g. I don't care whether we + or - it, I'm going to fix it.
Note, this is https://bugzilla.mozilla.org/show_bug.cgi?id=780920 .