Closed
Bug 1355147
Opened 8 years ago
Closed 7 years ago
Support headless mode on MacOS
Categories
(Firefox :: Headless, enhancement)
Firefox
Headless
Tracking
()
RESOLVED
FIXED
Firefox 56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: bdahl, Assigned: bdahl)
References
Details
Attachments
(6 files)
59 bytes,
text/x-review-board-request
|
jrmuizel
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
jrmuizel
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
bdahl
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
mstange
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
bdahl
:
review+
|
Details |
59 bytes,
text/x-review-board-request
|
jrmuizel
:
review+
|
Details |
No description provided.
Assignee | ||
Updated•8 years ago
|
Component: General → Headless
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bdahl
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 7•7 years ago
|
||
Try push for the above: https://treeherder.mozilla.org/#/jobs?repo=try&revision=630c2131d5693d9d57585e6ea59a193a9a3b0c0a
Assignee | ||
Comment 8•7 years ago
|
||
As for patch "Bug 1355147 - Change Firefox to a background application when headless." There's one downside to going from foreground to background in that the terminal very quickly looses and regains focus while the Firefox is being launched headlessly. I alternatively tried making Firefox a background application by default and changing it to the foreground for non-headless. However, this causes Firefox to not be focused by default. I could also force focus while making it foreground, but I was starting to think making Firefox a background app by default sounds a bit scary. Myk and I talked about potentially making another exe/bundle so that could be used to launch in the background by default, but I was curious to see if you had any other thoughts on this?
Flags: needinfo?(mstange)
Comment 9•7 years ago
|
||
Another bundle sounds like the right choice to me. Then you won't have to modify anything at runtime and won't affect regular Firefox.
Flags: needinfo?(mstange)
Comment 10•7 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #9)
> Another bundle sounds like the right choice to me. Then you won't have to
> modify anything at runtime and won't affect regular Firefox.
Besides increasing Firefox's download size and Firefox bundle complexity (as the headless bundle would be contained within the Firefox bundle), this would make developers have to invoke a different executable to run Firefox headlessly on Mac.
It's critical not to affect regular Firefox, but I'm leery of complicating the developer ergonomics of headless mode. We don't ship a separate executable for headless on Windows and Linux, nor does Chrome do so for headless on Mac (instead, it stays in the foreground).
So I'm inclined to prefer the temporary focus change, since it means I can tell developers to invoke the Firefox executable with the --headless flag to enter headless mode on all three platforms.
Comment 11•7 years ago
|
||
I see.
Have you tried if additionally calling [NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited] avoids the focus change?
Comment 12•7 years ago
|
||
mozreview-review |
Comment on attachment 8885844 [details]
Bug 1355147 - Add basic support for headless mode on macOS.
https://reviewboard.mozilla.org/r/156618/#review162208
Attachment #8885844 -
Flags: review?(jmuizelaar) → review+
Comment 13•7 years ago
|
||
mozreview-review |
Comment on attachment 8885845 [details]
Bug 1355147 - Expose IsHeadless on GfxInfo.
https://reviewboard.mozilla.org/r/156620/#review162210
Attachment #8885845 -
Flags: review?(jmuizelaar) → review+
Comment 14•7 years ago
|
||
mozreview-review |
Comment on attachment 8885849 [details]
Bug 1355147 - Use headless clipboard on macOS.
https://reviewboard.mozilla.org/r/156628/#review162212
Attachment #8885849 -
Flags: review?(jmuizelaar) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8885846 -
Flags: review?(dburns) → review?(hskupin)
Assignee | ||
Comment 18•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8885848 -
Flags: review?(dburns) → review?(hskupin)
Comment 19•7 years ago
|
||
mozreview-review |
Comment on attachment 8885848 [details]
Bug 1355147 - Enable macOS headless marionette tests.
https://reviewboard.mozilla.org/r/156626/#review164048
::: taskcluster/ci/test/test-platforms.yml:198
(Diff revision 2)
>
> macosx64/debug:
> build-platform: macosx64/debug
> test-sets:
> - macosx64-tests
> + - headless
We are supporting it now for all platforms, right? Can't we move those tests to `common-tests` now? Or don't we want to run it for nightly builds?
Attachment #8885848 -
Flags: review?(hskupin) → review+
Comment 20•7 years ago
|
||
mozreview-review |
Comment on attachment 8885846 [details]
Bug 1355147 - Fix test moving to negative coordinates in headless mac.
https://reviewboard.mozilla.org/r/156622/#review164054
Attachment #8885846 -
Flags: review?(hskupin) → review+
Comment 21•7 years ago
|
||
mozreview-review |
Comment on attachment 8885847 [details]
Bug 1355147 - Change Firefox to a background application when headless.
https://reviewboard.mozilla.org/r/156624/#review166898
::: toolkit/xre/nsAppRunner.cpp:3178
(Diff revision 2)
> Output(true, "Error: headless mode is not currently supported on this platform.\n");
> return 1;
> #endif
> +
> +#ifdef XP_MACOSX
> + // To avoid taking focus when running in headless mode immediately
This needs to be indented two more spaces.
Attachment #8885847 -
Flags: review?(mstange) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 28•7 years ago
|
||
mozreview-review |
Comment on attachment 8885846 [details]
Bug 1355147 - Fix test moving to negative coordinates in headless mac.
https://reviewboard.mozilla.org/r/156622/#review167606
Carrying r+ forward.
Attachment #8885846 -
Flags: review+
Assignee | ||
Updated•7 years ago
|
Attachment #8885846 -
Flags: review?(dburns)
Assignee | ||
Comment 29•7 years ago
|
||
Comment on attachment 8885849 [details]
Bug 1355147 - Use headless clipboard on macOS.
There were some mac clipboard test failures with the previous way of using a singleton for the clipboard. I've updated the clipboard creation to make it a class that can be an instance. I'll also change the other platforms to do this in another bug.
Attachment #8885849 -
Flags: review+ → review?(jmuizelaar)
Assignee | ||
Comment 30•7 years ago
|
||
Comment on attachment 8885848 [details]
Bug 1355147 - Enable macOS headless marionette tests.
Carrying r+ forward from whimboo.
Attachment #8885848 -
Flags: review?(dburns) → review+
Comment 31•7 years ago
|
||
mozreview-review |
Comment on attachment 8885849 [details]
Bug 1355147 - Use headless clipboard on macOS.
https://reviewboard.mozilla.org/r/156628/#review167904
Attachment #8885849 -
Flags: review?(jmuizelaar) → review+
Comment 32•7 years ago
|
||
Pushed by bdahl@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a4b6ccab14b
Add basic support for headless mode on macOS. r=jrmuizel
https://hg.mozilla.org/integration/mozilla-inbound/rev/803e1b08f00f
Expose IsHeadless on GfxInfo. r=jrmuizel
https://hg.mozilla.org/integration/mozilla-inbound/rev/19854c39011d
Fix test moving to negative coordinates in headless mac. r=whimboo
https://hg.mozilla.org/integration/mozilla-inbound/rev/a9e070c60d4b
Change Firefox to a background application when headless. r=mstange
https://hg.mozilla.org/integration/mozilla-inbound/rev/c18686139dbd
Enable macOS headless marionette tests. r=whimboo
https://hg.mozilla.org/integration/mozilla-inbound/rev/156623409e44
Use headless clipboard on macOS. r=jrmuizel
Comment 33•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1a4b6ccab14b
https://hg.mozilla.org/mozilla-central/rev/803e1b08f00f
https://hg.mozilla.org/mozilla-central/rev/19854c39011d
https://hg.mozilla.org/mozilla-central/rev/a9e070c60d4b
https://hg.mozilla.org/mozilla-central/rev/c18686139dbd
https://hg.mozilla.org/mozilla-central/rev/156623409e44
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
You need to log in
before you can comment on or make changes to this bug.
Description
•