Граф коммитов

4302 Коммитов

Автор SHA1 Сообщение Дата
Henrik Skupin 5a88335ebc Bug 1606637 - [marionette] Use plain Promise instead of TimedPromise for Sleep. r=marionette-reviewers,maja_zf
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
2020-09-09 09:35:50 +00:00
Bogdan Tara f32777f722 Backed out changeset cb50aecf4bad (bug 1606637) for perform_actions/pointer* failures CLOSED TREE 2020-09-09 04:57:03 +03:00
Henrik Skupin 9aae0f1df6 Bug 1660881 - [marionette] Use defineLazyGetter to define global objects. r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D89398
2020-09-08 18:32:37 +00:00
Henrik Skupin 89d8db7e53 Bug 1660881 - [marionette] Use defineLazyServiceGetter to define global services. r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D89397
2020-09-08 18:30:40 +00:00
Henrik Skupin e9c734cfdc Bug 1660881 - [marionette] Always define lazy getter for Log as "logger". r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D89396
2020-09-08 18:28:44 +00:00
Henrik Skupin 4f4259b645 Bug 1660881 - [marionette] Use XPCOMUtils.defineLazyModuleGetters() to defer loading of not immediately necessary modules. r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D89395
2020-09-08 18:22:43 +00:00
Henrik Skupin ed215b010b Bug 1660881 - [marionette] Declare EXPORTED_SYMBOLS at the top of the file. r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D89394
2020-09-08 18:19:32 +00:00
Henrik Skupin a345bf0d0f Bug 1606637 - [marionette] Use plain Promise instead of TimedPromise for Sleep. r=marionette-reviewers,maja_zf
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
2020-09-08 18:36:52 +00:00
Henrik Skupin 3880aa3e82 Bug 1663429 - [marionette] Only throw NoSuchWindow error in "WebDriver:SwitchToWindow". r=marionette-reviewers,jgraham
There is a race condition in the "WebDriver:SwitchToWindow" command
that would throw an UnknownError instead of NoSuchWindowError when
the window gets closed at the same time as the command gets called.

Differential Revision: https://phabricator.services.mozilla.com/D89377
2020-09-07 15:29:42 +00:00
Henrik Skupin b33376f2aa Bug 1662544 - [marionette] Disable various Telemetry related services. r=marionette-reviewers,chutten,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D89039
2020-09-01 21:46:08 +00:00
Henrik Skupin 271c9183fa Bug 1661495 - [marionette] Reset content browsing context if new chrome window is not a browser window. r=marionette-reviewers,maja_zf
Fixes a regression from bug 1661495, which missed to reset the
current content browsing context if the new chrome window isn't
a browser window.

Depends on D88827

Differential Revision: https://phabricator.services.mozilla.com/D88900
2020-08-31 20:23:43 +00:00
Henrik Skupin 509137452c Bug 1661495 - [marionette] Update content browsing context for remoteness changes. r=marionette-reviewers,maja_zf
If a navigation in the current browser causes a remoteness change,
the current content browsing context needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D88827
2020-08-31 19:57:04 +00:00
Henrik Skupin 4a2822310c Bug 1661495 - [marionette] Don't always set the current content browsing context when registering a new browser. r=marionette-reviewers,maja_zf
Since the patch on bug 1652932 landed in Firefox 80 we always
update the current content browsing context and that now only
when switching to a new window. That leads to an unexpected
change of the current window handle, and as such breaks tests.

Differential Revision: https://phabricator.services.mozilla.com/D88771
2020-08-31 19:56:40 +00:00
Narcis Beleuzu d70f39e819 Backed out 2 changesets (bug 1661495) as req by whimboo . CLOSED TREE
Backed out changeset c5cdfb592493 (bug 1661495)
Backed out changeset 46f9aa946264 (bug 1661495)
2020-08-31 21:47:32 +03:00
Ting-Yu Lin ad069fecf2 Bug 1657256 - Always update the cached mImaginaryCaretRect in SetPosition(). r=marionette-reviewers,mats,whimboo
During scrolling, the caret's position relative to the
custom-content-container (cached in mImaginaryCaretRectInContainerFrame)
may not change, but its position relative to root frame can (cached in
mImaginaryCaretRect).

We need to update mImaginaryCaret each time we are in SetPosition().
Otherwise, the caret still remembers its pre-scrolling old position next
time when we drag it, resulting the caret jumping to its old
pre-scrolling position suddenly.

Note this bug only occurs on the root scroll frame where the APZ is
enabled, not in any sub-scroll frames where APZ is disable when the
caret is shown.

Differential Revision: https://phabricator.services.mozilla.com/D88638
2020-08-31 17:54:19 +00:00
Henrik Skupin 2c5c90b8d3 Bug 1661495 - [marionette] Update content browsing context for remoteness changes. r=marionette-reviewers,maja_zf
If a navigation in the current browser causes a remoteness change,
the current content browsing context needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D88827
2020-08-31 17:48:37 +00:00
Henrik Skupin 816ae777d9 Bug 1661495 - [marionette] Don't always set the current content browsing context when registering a new browser. r=marionette-reviewers,maja_zf
Since the patch on bug 1652932 landed in Firefox 80 we always
update the current content browsing context and that now only
when switching to a new window. That leads to an unexpected
change of the current window handle, and as such breaks tests.

Differential Revision: https://phabricator.services.mozilla.com/D88771
2020-08-31 15:50:16 +00:00
Anny Gakhokidze 6d995898a0 Bug 1589102 - Part 17: Don't set chrome context in Marionette reftest unit tests r=marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D88518
2020-08-28 17:32:16 +00:00
Henrik Skupin a0042bce82 Bug 1661495 - [marionette] Improve tracking of browsing contexts. r=marionette-reviewers,maja_zf
With the changes on bug 1654628 we do not completely track the current
browsing contexts, but loose the reference when windows are closed.
With this patch the appropriate browsing contexts will be correctly
reset.

Also the commands for switching frames are operating on content
windows and as such are not allowed to update the currently
selected chrome browsing context.

Differential Revision: https://phabricator.services.mozilla.com/D88441
2020-08-28 05:09:18 +00:00
Henrik Skupin 3622ef850b Bug 1661495 - [marionette] Allow usage of switchToTab for GeckoView. r=marionette-reviewers,maja_zf
GeckoView allows only a single tab. But that shouldn't prevent the
code to make use of switchToTab() as long as the target tab is
the currently selected one.

Also reftests currently override window.gBrowser which leads to a
wrong detection of Firefox instead of GeckoView. Checking for
Android first will workaround the problem for now.

Differential Revision: https://phabricator.services.mozilla.com/D88467
2020-08-27 20:24:41 +00:00
Henrik Skupin a90489fc9e Bug 1661495 - [marionette] Account for a non-existent browsing context in getBrowsingContext. r=marionette-reviewers,maja_zf
If a window does no longer exist the associated browsing context
will no longer be valid and set to null.

Differential Revision: https://phabricator.services.mozilla.com/D88440
2020-08-27 20:24:35 +00:00
Henrik Skupin 45b532a9f8 Bug 1661495 - [marionette] Add context argument to getBrowsingContext. r=marionette-reviewers,maja_zf
It should be possible to get the browsing context not only for the
currently selected context (chrome vs. content), but also for a
specific one.

Differential Revision: https://phabricator.services.mozilla.com/D88439
2020-08-27 20:24:32 +00:00
Henrik Skupin cf3974f43b Bug 1661332 - [marionette] Run reftests in content and not chrome context. r=marionette-reviewers,jgraham
Reftests are running inside a custom browser element, which basically is
reflected as content context in Marionette. And given that some commands
like "WebDriver:GetCurrentURL" rely on the correct context to be set,
wrong data would be returned.

To allow that all commands are working based on the custom browser element
don't enforce chrome context for the Reftests code in Marionette.

This change also fixes the code which counts the assertions as seen for
debug builds. Until now only assertions from chrome context have been
collected.

Differential Revision: https://phabricator.services.mozilla.com/D88408
2020-08-27 12:48:06 +00:00
Henrik Skupin 735c792e88 Bug 1658696 - [marionette] Wait for initial navigation to "about:blank" to complete on Android. r=marionette-reviewers,jgraham,maja_zf
Without waiting for the initial navigation to "about:blank" to
complete, there is a risk for a race condition given that the
navigation to the test URL happens immediately.

Differential Revision: https://phabricator.services.mozilla.com/D86967
2020-08-26 10:11:21 +00:00
Henrik Skupin 83252679f3 Bug 1658696 - [marionette] Properly initialize lastURL for reftests. r=marionette-reviewers,jgraham,maja_zf
When the first test URL is "about:blank" the reftest window
needs to refresh its location and not trigger a new navigation,
which would lead to no page load events.

By correctly initializing the lastURL property, "loadTestURL"
will be able to determine the correct loading mechanism to use,
and not always trigger a navigation.

Differential Revision: https://phabricator.services.mozilla.com/D86966
2020-08-26 10:05:43 +00:00
Henrik Skupin 179a2de2af Bug 1660781 - Lazily load all external modules in Marionette's JSWindowActor classes. r=marionette-reviewers,maja_zf
To prevent performance degration and extra memory usage in Firefox
for newly spawned content processes, only load external modules if
required in both the parent and child actor.

Differential Revision: https://phabricator.services.mozilla.com/D88138
2020-08-26 08:42:32 +00:00
Henrik Skupin addce72fc2 Bug 1660781 - [marionette] Refactor code in error.js into a single error namespace. r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D88137
2020-08-26 08:42:14 +00:00
Razvan Maries 7fc0a216cf Backed out 2 changesets (bug 1658696) for perma failures on test_reftest.py. CLOSED TREE
Backed out changeset c8a6c4e4fb9f (bug 1658696)
Backed out changeset 2125e2962dcb (bug 1658696)
2020-08-26 00:54:48 +03:00
Henrik Skupin f1954e832e Bug 1660426 - [wdspec] Improve tests for "Get Title" and add site-isolation test. r=maja_zf,marionette-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D88016
2020-08-25 19:32:48 +00:00
Henrik Skupin e7ca7c2a3f Bug 1660426 - [marionette] Make "WebDriver:GetTitle" Fission compatible. r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D88015
2020-08-25 19:47:28 +00:00
Henrik Skupin ae7e7e6636 Bug 1658696 - [marionette] Wait for initial navigation to "about:blank" to complete on Android. r=marionette-reviewers,jgraham,maja_zf
Without waiting for the initial navigation to "about:blank" to
complete, there is a risk for a race condition given that the
navigation to the test URL happens immediately.

Differential Revision: https://phabricator.services.mozilla.com/D86967
2020-08-25 18:58:08 +00:00
Henrik Skupin c438cfa3c7 Bug 1658696 - [marionette] Properly initialize lastURL for reftests. r=marionette-reviewers,jgraham,maja_zf
When the first test URL is "about:blank" the reftest window
needs to refresh its location and not trigger a new navigation,
which would lead to no page load events.

By correctly initializing the lastURL property, "loadTestURL"
will be able to determine the correct loading mechanism to use,
and not always trigger a navigation.

Differential Revision: https://phabricator.services.mozilla.com/D86966
2020-08-25 18:57:36 +00:00
Henrik Skupin 5813c7d37e Bug 1658928 - [marionette] Make "WebDriver:GetCurrentURL" Fission compatible. r=marionette-reviewers,maja_zf
By moving out the "currentURI" getter from the Browser class,
and making it available on the driver other parts of Marionette
like reftests can make use of the "currentURL" property.

Also a couple of methods expressed the passed-around data as
instance of nsIURI whereby it was a string or an instance of
URL. The patch fixes that to always pass-around URL instances.

By doing these changes the command will be Fission compatible now.

Differential Revision: https://phabricator.services.mozilla.com/D87572
2020-08-21 12:50:43 +00:00
Emilio Cobos Álvarez 325d955f89 Bug 1660048 - Remove dom.forms.color and dom.forms.datetime. r=smaug,marionette-reviewers,whimboo
They're enabled in all configurations and there's no plan to change
this. With it, dom.experimental_forms is also useless, so we can remove
it too.

Differential Revision: https://phabricator.services.mozilla.com/D87623
2020-08-19 18:24:06 +00:00
Henrik Skupin de474a283e Bug 1654628 - [marionette] Port WebDriver:SwitchToFrame and WebDriver:SwitchToParentFrame to JSWindowActor. r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D84708
2020-08-19 17:24:24 +00:00
Henrik Skupin 7dad18b103 Bug 1654628 - [marionette] Ease handling of browsing contexts and current window. r=marionette-reviewers,maja_zf
With this patch a couple of changes are made to generally make it easier
to handle browsing contexts, and the current window. Basically this includes:

Since bug 1652932 landed the driver class keeps a reference
to the currently selected browsing context in content. As such
there is no need anymore to retrieve it from the framescript
each and every time. As side-effect this also removes the
async requirement and makes code better to read.

Similar handling for the browsing context exists for chrome scope,
which is also cached now, and no longer has to be retrieved via
the current window. With specifically this change "getCurrentURL"
for chrome scope correctly reports the location of the top-browsing
context, and not from the current one.

In the early days of Marionette a feature has been added to
work with embedded xul:browser elements. Those elemenets outside
of the tab browser have been tracked with "curFrame". Given that
until now there wasn't a single case to handle that, and the
code path is basically untested, it will be removed for now.

Differential Revision: https://phabricator.services.mozilla.com/D84707
2020-08-19 13:43:52 +00:00
Sonia Singla 5f5c9fd7f2 Bug 1659267 - Remove usages of -moz-user-select across the Firefox codebase. r=emilio,marionette-reviewers,geckoview-reviewers,preferences-reviewers,whimboo,agi
Differential Revision: https://phabricator.services.mozilla.com/D87499
2020-08-18 23:37:51 +00:00
Henrik Skupin 23dd7c485a Bug 1659502 - [marionette] Remove obsolete command "WebDriver:GetActiveFrame". r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D87338
2020-08-18 06:26:34 +00:00
Gabriele Svelto 32ac254020 Bug 1569928 - Re-enable the TestCrash.test_crash_content_process marionette test r=whimboo,marionette-reviewers DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D87342
2020-08-17 20:32:43 +00:00
Kris Maglione 0c976d908a Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-08-17 20:22:12 +00:00
Henrik Skupin e626ef7b33 Bug 1650872 - [marionette] Allow setWindowRect capability for all desktop but not Android. r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D86956
2020-08-17 16:52:37 +00:00
Bogdan Tara 85c9635490 Backed out changeset d445a6575005 (bug 1650872) for test_capabilities.js failures CLOSED TREE 2020-08-15 01:13:18 +03:00
Henrik Skupin 1d2b3c5695 Bug 1650872 - [marionette] Allow setWindowRect capability for all desktop but not Android. r=marionette-reviewers,maja_zf
It's not only Firefox that should be able to resize / move the window, but also Thunderbird on desktop.

Further all GeckoView based applications on Android, which claim themselves as 'Firefox', should not be allowed.

Differential Revision: https://phabricator.services.mozilla.com/D86956
2020-08-14 19:12:05 +00:00
Ricky Stewart 31755b431d Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj
Today we don't require that `mach` `CommandProvider`s subclass from any particular parent class and we're very lax about the requirements they must meet. While that's convenient in certain circumstances, it has some unfortunate implications for feature development.

Today the only requirements that we have for `CommandProvider`s are that they have an `__init__()` method that takes either 1 or 2 arguments, the second of which must be called `context` and is populated with the `mach` `CommandContext`. Again, while this flexibility is occasionally convenient, it is limiting. As we add features to `mach`, having a better idea what the shape of our `CommandProvider`s are and how we can instantiate them and use them is increasingly important, and this gives us additional control when having `mach` configure `CommandProvider`s based on data that is only available at the `mach` level. In particular, we plan to leverage this in bugs 985141 and 1654074.

Here we add validation to the `CommandProvider` decorator to ensure all classes inherit from `MachCommandBase`, update all `CommandProvider`s in-tree to inherit from `MachCommandBase`, and update source and test code accordingly.

Follow-up work: we now require (de facto) that the `context` be populated with a `topdir` attribute by the `populate_context_handler` function, since instantiating the `MachCommandBase` requires a `topdir` be provided. This is fine for now in the interest of keeping this patch reasonably sized, but some additional refactoring could make this cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D86255
2020-08-07 18:24:59 +00:00
Butkovits Atila 3bd0e5497c Backed out 10 changesets (bug 1589102) for failure at browser_saveHeapSnapshot_e10s_01.js CLOSED TREE
Backed out changeset 0d22ad297b19 (bug 1589102)
Backed out changeset 14bcaf2a452c (bug 1589102)
Backed out changeset 20905f91e2bb (bug 1589102)
Backed out changeset 29ee0fbe855f (bug 1589102)
Backed out changeset d1f6185030af (bug 1589102)
Backed out changeset 31949872cc1d (bug 1589102)
Backed out changeset ec04e1a20597 (bug 1589102)
Backed out changeset ffe8da473b91 (bug 1589102)
Backed out changeset 3b92f7306c64 (bug 1589102)
Backed out changeset b187548e258f (bug 1589102)
2020-08-05 21:47:50 +03:00
Anny Gakhokidze 0f729af974 Bug 1589102 - Part 7: Fix marionette reftest.js to wait for test url's load events, r=jgraham,marionette-reviewers,maja_zf
about:blank loads now take place via DocumentChannel and no longer happen
instantenously.

Differential Revision: https://phabricator.services.mozilla.com/D85085
2020-08-05 16:44:29 +00:00
Henrik Skupin 994f0d8317 Bug 1651297 - [marionette] Improve debug logging for paintComplete in reftests. r=marionette-reviewers,jgraham,maja_zf
Depends on D84525

Differential Revision: https://phabricator.services.mozilla.com/D84526
2020-07-30 10:00:19 +00:00
Henrik Skupin 37c68db147 Bug 1654609 - [marionette] Port WebDriver:GetElementProperty and WebDriver:GetElementAttribute to JSWindowActor. r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D84576
2020-07-23 14:29:21 +00:00
Henrik Skupin 201cbd12be Bug 1654454 - [marionette] Port WebDriver:FindElement and WebDriver:FindElements to JSWindowActor. r=marionette-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D84568
2020-07-23 14:22:07 +00:00
Henrik Skupin 3f547b9d29 Bug 1654453 - [marionette] Conditionally enable usage of JSWindowActor. r=marionette-reviewers,maja_zf
While implementing support for JSWindowActor classes in Marionette most of the commands operating in content scope and requiring references to elements won't work because running the actor and the framescript in parallel would result in different element id's. As such one or the other code path won't be able to find the referenced element.

That means we have to hide the actor implementation behind the `marionette.actors.enabled` preference. By default it's false. Once all commands work we could enable it for all Fission related tasks in CI, and then for everyone.

Differential Revision: https://phabricator.services.mozilla.com/D84479
2020-07-23 13:50:17 +00:00