Running b2g reftests oop breaks context.drawWindow()

RESOLVED INCOMPLETE

Status

Testing
Reftest
RESOLVED INCOMPLETE
5 years ago
2 months ago

People

(Reporter: ahal, Unassigned)

Tracking

unspecified
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:-)

Details

(Whiteboard: [leave-open])

Attachments

(2 attachments)

(Reporter)

Description

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 http://mxr.mozilla.org/mozilla-central/source/layout/tools/reftest/reftest.js#1275)
(Reporter)

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+
(Reporter)

Updated

5 years ago
Whiteboard: [leave-open]
https://hg.mozilla.org/integration/mozilla-inbound/rev/80c3029990c6
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
https://hg.mozilla.org/mozilla-central/rev/80c3029990c6
(Reporter)

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: 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.
(Reporter)

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.
(Reporter)

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.
(Reporter)

Updated

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 https://bugzilla.mozilla.org/show_bug.cgi?id=780920 .
(Reporter)

Updated

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