Closed
Bug 1356681
Opened 8 years ago
Closed 8 years ago
Support headless flag on Linux
Categories
(Firefox :: Headless, enhancement)
Firefox
Headless
Tracking
()
RESOLVED
FIXED
Firefox 55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: bdahl, Assigned: bdahl)
References
Details
(Keywords: dev-doc-needed)
Attachments
(7 files, 1 obsolete file)
13.64 KB,
patch
|
automatedtester
:
review+
|
Details | Diff | Splinter Review |
10.08 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
5.05 KB,
patch
|
kanru
:
review+
|
Details | Diff | Splinter Review |
3.57 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
8.01 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
3.81 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
2.43 KB,
patch
|
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
Add a --headless flag on Linux that starts the browser in headless mode.
Updated•8 years ago
|
Keywords: dev-doc-needed
Hopefully this is the right place, but it would be great to remove the pulse-audio dependency in headless mode. Pulseaudio carries a lot of baggage and getting rid of it on headless would make VM images much smaller.
Thanks for working on this btw.
Comment 2•8 years ago
|
||
Uhm pulseaudio can be useful to show video or audio so I think that is required also on headless, maybe is a topic for another ticket. I am not sure if Firefox can be build without pulseaudio but I think that in that case will be better :-)
Any news for this? Beucase I want to experiment on top of it and on Linux is very important to enable the support also to the embedded/IoT world.
Comment 3•8 years ago
|
||
Actually on Linux I get:
$ MOZ_HEADLESS=1 /home/mte90/ffnightly/firefox
*** You are running in headless mode.
*** You are running in headless mode.
(firefox:9635): Gdk-CRITICAL **: gdk_x11_display_get_xdisplay: assertion 'GDK_IS_DISPLAY (display)' failed
ExceptionHandler::GenerateDump cloned child 9669
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
And this is the report on https://crash-stats.mozilla.com/report/index/bc227383-278d-4e48-a4f4-8f9380170424
(In reply to Daniele "Mte90" Scasciafratte from comment #2)
> Uhm pulseaudio can be useful to show video or audio so I think that is
> required also on headless, maybe is a topic for another ticket. I am not
> sure if Firefox can be build without pulseaudio but I think that in that
> case will be better :-)
It can be useful, but only if you want to hear something. I'm betting headless will more likely be used for automatic testing where you neither need to hear nor see anything. It would make sense to have a default null fallback that allows calls, but doesn't try to actually access a device. VLC does it and they are all about audio/video.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bdahl
Assignee | ||
Comment 5•8 years ago
|
||
Adds support for a --headless flag for marionette to start
Firefox in headless mode. Also, adds a new task cluster
test group for the headless marionette tests.
Attachment #8864326 -
Flags: review?(dburns)
Assignee | ||
Comment 6•8 years ago
|
||
These are various fixes to get most of the headless
marionette tests working.
Attachment #8864327 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 7•8 years ago
|
||
Supports changing the size of a headless screen with
environment variables.
Attachment #8864328 -
Flags: review?(kchen)
Assignee | ||
Comment 8•8 years ago
|
||
Attachment #8864329 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 9•8 years ago
|
||
Alert dialogs trigger a call into gtk to get native sound which
crashes in headless.
Attachment #8864331 -
Flags: review?(jmuizelaar)
Comment 10•8 years ago
|
||
Comment on attachment 8864328 [details] [diff] [review]
Part 3 - Add headless screen helper.
Review of attachment 8864328 [details] [diff] [review]:
-----------------------------------------------------------------
::: widget/headless/HeadlessScreenHelper.cpp
@@ +31,5 @@
> +
> +HeadlessScreenHelper::HeadlessScreenHelper()
> +{
> + AutoTArray<RefPtr<Screen>, 4> screenList;
> + LayoutDeviceIntRect rect = GetScreenRect();
The list always only has one element so this should be 1
Attachment #8864328 -
Flags: review?(kchen) → review+
Comment 11•8 years ago
|
||
Comment on attachment 8864326 [details] [diff] [review]
Part 1 - Add headless marionette tests.
Review of attachment 8864326 [details] [diff] [review]:
-----------------------------------------------------------------
This looks good. It might be worth speaking to the TC team to make sure they are aware of the increase in load.
Attachment #8864326 -
Flags: review?(dburns) → review+
Updated•8 years ago
|
Attachment #8864327 -
Flags: review?(jmuizelaar) → review+
Comment 12•8 years ago
|
||
Comment on attachment 8864329 [details] [diff] [review]
Part 4 - Support moving a headless window.
Review of attachment 8864329 [details] [diff] [review]:
-----------------------------------------------------------------
::: widget/headless/HeadlessWidget.cpp
@@ +86,5 @@
> + mWindowType == eWindowType_dialog) {
> + SetSizeMode(nsSizeMode_Normal);
> + }
> +
> + // Since a popup window's x/y coordinates are in relation to to
to to
Attachment #8864329 -
Flags: review?(jmuizelaar) → review+
Updated•8 years ago
|
Attachment #8864331 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 13•8 years ago
|
||
Some new marionette tests for windows size changes were added while I was on PTO.
Attachment #8867832 -
Flags: review?(jmuizelaar)
Assignee | ||
Comment 14•8 years ago
|
||
Hopefully the last part for this bug.
Attachment #8867943 -
Flags: review?(jmuizelaar)
Updated•8 years ago
|
Attachment #8867832 -
Flags: review?(jmuizelaar) → review+
Comment 15•8 years ago
|
||
Comment on attachment 8867943 [details] [diff] [review]
Part 7 - Add the --headless flag.
Review of attachment 8867943 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/xre/nsAppRunner.cpp
@@ +3147,5 @@
> }
>
> + if (CheckArg("headless")) {
> + PR_SetEnv("MOZ_HEADLESS=1");
> + }
We should switch using a bool or something like gfxConfig instead of the environment variable directly. i.e. gfxPlatform::IsHeadless() shouldn't be checking the environment variables.
Attachment #8867943 -
Flags: review?(jmuizelaar) → review-
Assignee | ||
Comment 16•8 years ago
|
||
As discussed on IRC, IsHeadless is needed pretty early on startup before gfxConfig is initialized. We could add a gfxPlatform::EnableHeadless, but this would require each new process to call this. Just using an environment variable and caching it seems the simplest for now.
Attachment #8869092 -
Flags: review?(jmuizelaar)
Assignee | ||
Updated•8 years ago
|
Attachment #8867943 -
Attachment is obsolete: true
Updated•8 years ago
|
Attachment #8869092 -
Flags: review?(jmuizelaar) → review+
Comment 17•8 years ago
|
||
Pushed by bdahl@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d7121e5ad806
Expand headless mode support for linux. r=automatedtester,jrmuizel,kanru
Comment 18•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Assignee | ||
Updated•8 years ago
|
Component: General → Headless
You need to log in
before you can comment on or make changes to this bug.
Description
•