Update the refresh command to make it synchronous, and let it return
once the target page has been loaded. This can be accomplished by using
the loadListener object in listener.js.
MozReview-Commit-ID: Lc8QoGFeQrY
--HG--
extra : rebase_source : f5aa7a9a6d144b849b2808b08d78ca99fc83e518
This refactoring allows us to re-use the same load algorithm for
each command which could trigger a page load. It also takes remoteness
changes into account, and waits until the load has been done.
With this change we no longer check for readyState only, but observe
the necessary DOM events as fired for page unloads and loads. This will
help us to implement the page loading strategy later.
By observing the DOM events, I also expect a small increase of performance
for any kind of page load, given that we now return immediately and do not
have a delay of 100ms at maximum.
MozReview-Commit-ID: IVtO6KgJFES
--HG--
extra : rebase_source : 7cce694d464a18773c65056c336b9f900f5466d0
To delay the page load for our slowly served example page when using the
back or forward commands, the page doesn't have to be put into the browser
cache.
MozReview-Commit-ID: 4xMjR3SakZn
--HG--
extra : rebase_source : a580578b277ad56a54a775f5a9a18ec62c7f81a7
<!-- Please describe your changes on the following line: -->
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1344966
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
<!-- Either: -->
- [X] These changes do not require tests because it's for stylo.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Source-Repo: https://github.com/servo/servo
Source-Revision: d77fceaf241843d0fee246c1c910072fe041a69e
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 9f2e870cb55520ba6deee3ba63b6b673d48bca2e
This makes the session timeout duration configuration API backwards
compatible with earlier Firefoxen.
As Marionette changes to accept pageLoad, we must still continue to allow
"page load" as a key for as long as the Marionette Python client is used
for Firefox upgrade tests.
MozReview-Commit-ID: Ln4D3bY2d7f
--HG--
extra : rebase_source : 0ee6c33e0bfbb1605e250db2adea77942808855f
Using non-remote pages causes framescripts to be reloaded. We should try
to avoid using those pages as much as possible, and test remoteness
switches in particular tests only. This is to reduce possible hangs.
MozReview-Commit-ID: ICPPkU07KQK
--HG--
extra : rebase_source : 54faf68950fe70bbb49bd8f6b4f8595d5ef988c0
The WebDriver specification recently decided to use "pageLoad" instead of
"page load" to identify the page load duration timeout in the session
timeouts configuration object:
https://github.com/w3c/webdriver/pull/796
This change aligns Marionette with WebDriver, and as long as this patch
is uplifted to Aurora (53) and Beta (52) in reasonable time, we should be
able to avoid the backwards compatibility dance with the Python client
(for upgrade tests) because the original change to the data format
landed on the current Firefox version:
https://bugzilla.mozilla.org/show_bug.cgi?id=1316622
MozReview-Commit-ID: BzQeJku4AFS
--HG--
extra : rebase_source : 61b4450ef610cb36e6ed585ee6b20807b51f23be
This adds an entry to the firefox --help output mentioning Marionette,
the remote control protocol server.
MozReview-Commit-ID: 8mwGO0HjvOr
--HG--
extra : rebase_source : 3bb2b96fbcbca024f15065f53dae91580f27b346
This removes the internal enabledness state tracking in
MarionetteComponent in favour of the marionette.enabled preference.
When the marionette.enabled preference changes, Marionette is enabled
or disabled. Depending on whether all the initialisation conditions
have been met, Marionette is started. If it is running, it is stopped
when toggling the preference back off.
MozReview-Commit-ID: jQFYZhULqO
--HG--
extra : rebase_source : 63f101cebf9db2f3400885a06449e91fce84094f
If ENABLE_MARIONETTE is false, the Marionette jar will not be included
in the omnijar, making the check in MarionetteComponent superfluous.
It also does not belong in this file: the intention of ENABLE_MARIONETTE
is to disable the compilation and inclusion of Marionette altogether,
not to gate whether to enable the Marionette server.
The Marionette component is considered enables if the
marionette.enabled/marionette.defaultPrefs.enable preference is true or
--marionette is passed as a flag. This presupposes that the Marionette
component is packaged.
MozReview-Commit-ID: K8gam5hOvB0
--HG--
extra : rebase_source : 024ec27200cae7bc5149b1b8b564cdf7d97b552d
The recommended Marionette preferences for use in automation are not so
useful when testing the browser itself. Many of the tests for Firefox
have highly specific requirements, and setting the recommended Marionette
preferences could for these mean a deterioration of test coverage.
The majority of test harnesses utilising Marionette use it to install
unsigned add-ons at runtime, and these preferences are not relevant in
this context. The preferences they use are defined in prefs_general.js.
To avoid an unfortunate and unintended regression in test coverage,
we skip using the recommended Marionette preferences when we test the
browser itself.
MozReview-Commit-ID: 5h3cGPfbicV
--HG--
extra : rebase_source : 3db358cd43208b274f0a255f8351f3f9762d386a
This change renames the following Marionette preferences:
marionette.defaultPrefs.enabled marionette.enabled
marionette.defaultPrefs.port marionette.port
marionette.force-local marionette.forcelocal
marionette.logging marionette.log.level
The old preference names are still usable, but are henceforth considered
deprecated. They will be removed when Firefox 55 ships.
It also registers these preferences in Firefox so that they are
discoverable through about:config.
This patch also refactors testing/marionette/components/marionette.js.
MozReview-Commit-ID: 1dAMQS2e0og
--HG--
extra : rebase_source : e59a9e656442d8e8cebeaf5e741dc8306436bc22
Merges testing/marionette/dispatcher.js into testing/marionette/server.js
and renames it server.TCPConnection.
The rationale behind this change is that the current dispatcher is not
a single entity to which incoming requests are dispatched. The old
organisation might make sense if this was an HTTP server where all
connections are transitive and it didn't hold any connection details,
however the dispatcher is in effect a representation of a client socket
connection.
Since the module is not used elsewhere, it makes sense to pair it with
the existing server.TCPListener class.
MozReview-Commit-ID: 2HF35OiP6AY
--HG--
extra : rebase_source : 188bbc23a128642c1127694714e7fca4192827c9
No functional changes apart from class'ifying the file and harmonising
the export symbol with the rest of the Marionette code base by renaming
the MarionetteServer class to server.TCPListener.
MozReview-Commit-ID: 8WJKoprGGvr
--HG--
extra : rebase_source : 1f706a0f5e4c9fdccac90bfc14f767763ec85257
This makes the Marionette server itself set a long list of recommended
automation preferences when it starts up, and reset those it changed
when stopping.
Preferences used in automation are currently written to the Firefox
profile before Firefox starts, but after a closer examination of the
preferences, it is thought that many of them can be set at runtime.
There is a subset of preferences that are checked on startup and which
must be set in the profile. These are clearly called out in the comments.
We still set them at runtime, since we foresee a future where it will
be possible to attach an existing Firefox session to geckodriver, and
many of the prefs can also be checked at runtime during the course of
that automation session.
For example, if we would not set the "app.update.auto" preference in
such a runtime, opening the About dialogue would cause a forced update
of Firefox. This is not desirable when the browser is under Marionette
control. When the Marionette server is stopped, the altered preferences
are reset and the browser session's state is returned to its pre-existing
condition.
This change does not mean it is dangerous or wrong for consumers to write
their own preferences to the profile. Any preferences written to the
profile will take precedence over this set of recommended preferences.
If the recommended Marionette preference has a user-defined value (i.e. it
is written to the profile before starting up or has manually changed),
that user-set value is preferred.
The list of preferences in this file is the authorative reference of
recommended preferences for using Marionette in automation. They have
been gathered from geckoinstance.py and geckodriver.
MozReview-Commit-ID: INHSQRg2XjF
--HG--
extra : rebase_source : e1684133d287d2891feaa52ae4d267e8df4fa8e2
ScreenHelperCocoa is the platform dependent part of the original
nsScreenManagerCocoa and nsScreenCocoa. It registers
NSApplicationDidChangeScreenParametersNotification and pushes updates
to ScreenManager. See patch part 4. for how ScreenManager works.
MozReview-Commit-ID: 1A5ha4Ys2dL
--HG--
rename : widget/cocoa/nsScreenManagerCocoa.h => widget/cocoa/ScreenHelperCocoa.h
rename : widget/cocoa/nsScreenManagerCocoa.mm => widget/cocoa/ScreenHelperCocoa.mm
extra : rebase_source : c7737e18656710c36f6c04ac71a17deeca3224a5
ScreenHelperWin is the platform dependent part of the original
nsScreenManagerWin and nsScreenWin. It listens the WM_DISPLAYCHANGE
message and pushes updates to ScreenManager. See patch part 4. for how
ScreenManager works.
MozReview-Commit-ID: 20A3ZQKmH9a
--HG--
rename : widget/windows/nsScreenManagerWin.cpp => widget/windows/ScreenHelperWin.cpp
rename : widget/windows/nsScreenManagerWin.h => widget/windows/ScreenHelperWin.h
extra : rebase_source : a3058c237d38f72103251802ab5f5bbd672e9b70
nsIScreen::GetId and nsIScreenManager::ScreenForId is removed in patch
part 6. These methods are still used by Fennec on Android to implement
Presentation API support so I changed them to concrete methods in
nsScreenAndroid and nsScreenManagerAndroid.
nsScreenAndroid and nsScreenManagerAndroid does not use the generic
Screen and ScreenManager class because its implementation is quite
different.
MozReview-Commit-ID: 4rxxIgvNxMb
--HG--
extra : rebase_source : 1f8a437f6a9465bd79ce9be37c9e3de6f6d7b2fd
This is the most important part of the patch series. It removes the
PScreenManager protocol and use ScreenManager directly in the content
processes.
Initial and subsequent updates are sent via PContent::RefreshScreens.
struct ScreenDetails are kept to serialize Screen over IPC.
nsIScreenManager::ScreenForNativeWidget is removed because
nsIWidget::GetWidgetScreen can replace it. nsIScreen::GetId is removed
because it's not useful for the more general Screen class.
MozReview-Commit-ID: 5dJO3isgBuQ
--HG--
extra : rebase_source : 06aa4e4fd56e2b2af1e7483aee7c0cc7f35bdb97
ScreenHelperGTK is the platform dependent part of the original
nsScreenManagerGtk and nsScreenGtk. It registers monitors-changed
event listener from gtk and pushes updates to ScreenManager. See patch
part 4. for how ScreenManager works.
MozReview-Commit-ID: KBo7ZLFTjM3
--HG--
rename : widget/gtk/nsScreenManagerGtk.cpp => widget/gtk/ScreenHelperGTK.cpp
rename : widget/gtk/nsScreenManagerGtk.h => widget/gtk/ScreenHelperGTK.h
extra : rebase_source : 5607e31b62c928934cc45df7b2212428fbfd79c1
ScreenManager takes the common parts of ScreenManagerWin,
ScreenManagerGtk and ScreenManagerCocoa. It caches all screen
information in the new Screen class. The cache are updated when the OS
notifies there is a monitor config change; all changes will be pushed to
content processes via PContent (patch part 6.)
Screen is a pure data object. All platform dependent logic will be in
widget specific helper classes.
Each process will have a singleton ScreenManager object. Widget
specific helper object is held alive by the ScreenManager when
necessary, for example to receive updates from the OS.
The change to to VsyncDispatcher.cpp is due to unified-build bustage.
ScreenManager::ScreenForNativeWidget is not implemented because it
will be removed in patch part 6.
MozReview-Commit-ID: 5ezytAXSqHp
***
fixup
MozReview-Commit-ID: DQtq3UVZytA
--HG--
extra : rebase_source : c1a5aac713de783586e93109fe3e197ffdc1a3ca
It's only used by gonk. Remove it will make removing PScreenManager easier.
MozReview-Commit-ID: GCHonrz30xK
--HG--
extra : rebase_source : 73fbb4263b246d42cc38dd7a30edda9014953a97
It's not used anywhere in gecko or addons. Remove it will make
removing PScreenManager easier.
MozReview-Commit-ID: K3BHnktO7wU
--HG--
extra : rebase_source : 6f481759d1fb82d222ea6a92ebfd50dbb6cb63d5
It's not used anywhere. Remove it will make removing PScreenManager
easier.
MozReview-Commit-ID: 5dn8kDhTZVl
--HG--
extra : rebase_source : 96b8ddb18deee94ca256bfa118b60ceacfd2d677
Since the audible state would depend on pause and suspend state, we should do
the check after finishing play() or pause().
MozReview-Commit-ID: 1yhxuQDw067
--HG--
extra : rebase_source : 888bac3da52f42b75eeb1c3db1337e223d792a11
Media control would also be displayed for non-audible media, we shouldn't
arbitrary request audio focus . Only request audio focus from gecko which know
whether the media is audible.
MozReview-Commit-ID: Ke9DCYd0Qh2
--HG--
extra : rebase_source : 6ca2f83de877495f7249ee5e7f5cf2165f6f7f6b
If the media element is paused, it should be non-audible.
MozReview-Commit-ID: 2HjV9gNNcnV
--HG--
extra : rebase_source : 39b0812788d020d3f9c1a96afa1397b32057de8c
For non-audible media, we shouldn't request audio focus because it might interrupt
other app who is playing music or podcast.
MozReview-Commit-ID: 25iWJktgKUw
--HG--
extra : rebase_source : ca96240967131d2d6cab00f7a39c0ef4e6f2df78
We can use this to avoid tokenizing multiple times in some places, like #16127.
Source-Repo: https://github.com/servo/servo
Source-Revision: 447742b0a70395e55d6d1518fa51ad5b190abc8c
--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 25adf3ad8feae17a3038424f4c9274d44c54fc58