Running b2g reftests oop breaks context.drawWindow()



5 years ago
2 months ago


(Reporter: ahal, Unassigned)


Dependency tree / graph

Firefox Tracking Flags



(Whiteboard: [leave-open])


(2 attachments)



5 years ago
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

Comment 1

5 years ago
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.
Attachment #654367 - Flags: review?(jgriffin)
Attachment #654367 - Flags: review?(jgriffin) → review+


5 years ago
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.

Comment 4

5 years ago

Comment 5

5 years ago
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:

Note that every == test will pass no matter what and every != test will fail no matter what.

Comment 6

5 years ago
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.

Comment 8

5 years ago
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.


5 years ago
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: ? → +
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.
Note, this is .


4 years ago
Blocks: 922680
Last Resolved: 2 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.