TimedPromise logs a warning if the timeout exceeded and not error
should be raised. Given that Sleep always runs into that condition
a lot of inappropriate log entries are made that also causes
confusion for our users when commands (especially actions) don't
work as expected.
Differential Revision: https://phabricator.services.mozilla.com/D89354
TimedPromise logs a warning if the timeout exceeded and not error
should be raised. Given that Sleep always runs into that condition
a lot of inappropriate log entries are made that also causes
confusion for our users when commands (especially actions) don't
work as expected.
Differential Revision: https://phabricator.services.mozilla.com/D89354
"Sleep()" currently uses the TimedPromise class and as such logs
a warning message each time. To not massively clutter the log files
with those entries Sleep should just use a plain Promise.
Depends on D20637
Differential Revision: https://phabricator.services.mozilla.com/D20638
--HG--
extra : moz-landing-system : lando
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8
This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:
ChromeUtils.import("resource://gre/modules/Services.jsm");
is approximately the same as the following, in the new model:
var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs
This was done using the followng script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D16750
--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
By default PollPromise has to behave similar to a normal Promise
and wait forever until it gets resolved or rejected.
Depends on D13662
Differential Revision: https://phabricator.services.mozilla.com/D15907
--HG--
extra : moz-landing-system : lando
To be closer to other test harnesses which are using executeSoon()
to run a task on the main thread, this patch adds the same
method to Marionette's sync module.
Differential Revision: https://phabricator.services.mozilla.com/D13659
--HG--
extra : moz-landing-system : lando
By default PollPromise has to behave similar to a normal Promise
and wait forever until it gets resolved or rejected.
Depends on D13662
Differential Revision: https://phabricator.services.mozilla.com/D15907
--HG--
extra : moz-landing-system : lando
To be closer to other test harnesses which are using executeSoon()
to run a task on the main thread, this patch adds the same
method to Marionette's sync module.
Differential Revision: https://phabricator.services.mozilla.com/D13659
--HG--
extra : moz-landing-system : lando
To be closer to other test harnesses which are using executeSoon()
to run a task on the main thread, this patch adds the same
method to Marionette's sync module.
Differential Revision: https://phabricator.services.mozilla.com/D13659
--HG--
extra : moz-landing-system : lando
To be closer to other test harnesses which are using executeSoon()
to run a task on the main thread, this patch adds the same
method to Marionette's sync module.
Differential Revision: https://phabricator.services.mozilla.com/D13659
--HG--
extra : moz-landing-system : lando
The debug output is currently kinda polluted with lines of
received events and observer notifications. Those are not usually
needed by anyone beside us, but they also add little value in
having additional trace output, because that mainly would only
add the command and response messages.
To make debug output more helpful for our users the command
and response messages should appear here and not in trace.
But all the additional log output lines as mentioned above
we usually make use of for investigating problems should
be trace only.
Also a lot of existing debug output will remain unchanged.
Differential Revision: https://phabricator.services.mozilla.com/D13379
--HG--
extra : moz-landing-system : lando
The things that rely on TimedPromise, such as awaiting a sizemodechange
event on exiting fullscreen, takes a lot longer to perform in Asan
and debug builds than in optimised builds.
This patch increases the TimedPromise timeout duration by three
times in debug builds, which is the same amount WPT uses.
Depends on D10569
Differential Revision: https://phabricator.services.mozilla.com/D11189
--HG--
extra : moz-landing-system : lando
This adds a new synchronisation primitive to Marionette which will
allow us to wait for the last in a sequence of events to fire.
This is especially useful for high-frequency events such as the DOM
resize event, where multiple resize events may fire as the window
dimensions are being changed.
Depends on D8411
Differential Revision: https://phabricator.services.mozilla.com/D8412
--HG--
extra : moz-landing-system : lando
We often use TimedPromise to ensure Marionette does not unexpectedly
block on a promise that, for whatever reason, does not resolve.
It can however be useful to be alerted when they don't, as it quite
often means there is an underlying problem.
Depends on D8406
Differential Revision: https://phabricator.services.mozilla.com/D8407
--HG--
extra : moz-landing-system : lando
To avoid confusion with the global "window" object we should
avoid using this name as function argument.
Changes for driver.js are left-out and will be done by the
patch on bug 1311041.
--HG--
extra : rebase_source : f15714af3a422476923d096eb8cb837ae474c675
This patch moves the private whenIdle function to sync so it can
be shared across JSMs.
It also changes its semantics somewhat, so that instead of taking
a callback function (suitable for DOM event callbacks) it returns
a promise that is resolved when the main thread becomes idle and
the window has completed an animation frame tick.
This patch moves the private whenIdle function to sync so it can
be shared across JSMs.
It also changes its semantics somewhat, so that instead of taking
a callback function (suitable for DOM event callbacks) it returns
a promise that is resolved when the main thread becomes idle and
the window has completed an animation frame tick.
This adds a new public API to the Marionette sync module that can
"pause" async functions for an arbitrary amount of hardcoded time.
This can be useful for debugging purposes.