Closed Bug 784810 Opened 8 years ago Closed 2 years ago

Running b2g reftests oop breaks context.drawWindow()


(Testing :: Reftest, defect)

Not set



blocking-basecamp -


(Reporter: ahal, Unassigned)



(Whiteboard: [leave-open])


(2 files)

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
For now, just disable oop reftests until we figure out the underlying issue.
Attachment #654367 - Flags: review?(jgriffin)
Attachment #654367 - Flags: review?(jgriffin) → review+
Whiteboard: [leave-open]
We have very carefully implemented support for capturing renderings of cross-process content in the reftest harness.  This seems like a separate problem.
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:

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.
blocking-basecamp: --- → ?
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.
blocking-basecamp: ? → +
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.
Blocks: 922680
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.