Commit Graph

3565 Commits

Author SHA1 Message Date
Andreas Tolfsen
42d2cf5275 Bug 1470659 - Add setWindowRect capability to Marionette. r=whimboo
The setWindowRect capability is mandated by the WebDriver standard
and is an indication whether the driver supports manipulating the
window dimensions and position.

This will always be true for Firefox and always false for Fennec.
2018-08-01 18:31:25 +01:00
Andreas Tolfsen
2dee10d7b9 Bug 1470659 - Simplify Marionette capability parsing. r=whimboo
Change the switch-statement to only do assertions, and replace the
v variable with any parsed values before writing it to the matched
set of capabilities in one location.
2018-08-01 18:31:24 +01:00
Boris Zbarsky
754087a992 Bug 1446940 part 5. Stop getting docshells from windows via getInterface in dom/editor/etc code. r=kmag 2018-08-01 13:07:11 -04:00
Bogdan Tara
9c44097a0d Merge inbound to mozilla-central. a=merge 2018-08-01 00:58:55 +03:00
Andrew Swan
ad31645d25 Bug 1451513 Part 3: Make loading the mochitest extension more robust r=kmag
A couple of changes to ensure that the mochitest harness doesn't try to
start executing changes before the mochitest extension is loaded:
1. Fix the marionette driver to wait for an installed extension to
   be started before returning from Addon:install
2. Wait for extension API onStartup() handlers to finish before
   considering a webextension started.

MozReview-Commit-ID: 8YEdNn6s5qh

--HG--
extra : rebase_source : 67e9abadcda82d55ac73c33367ec65cdbf7b823d
2018-07-30 17:03:27 -07:00
Gijs Kruitbosch
dcbec7c8b6 Bug 1478404 - remove _xpcom_categories annotations as they're dead code, r=florian
Support for the _xpcom_categories property was removed in Bug 568691,
but we left a bunch of consumers behind, and it's been cargo-culted a bit more.
We should remove the remaining remnants.

Differential Revision: https://phabricator.services.mozilla.com/D2429

--HG--
extra : moz-landing-system : lando
2018-07-31 17:39:25 +00:00
Andreas Tolfsen
a7c41e76bd Bug 1479772 - Drop references to mozreview from Marionette docs. r=me 2018-07-31 15:07:37 +01:00
Andreas Tolfsen
0cedb9ad97 Bug 1478979 - Disallow pageLoadStrategy to be null. r=whimboo
Capabilities matching is now done in geckodriver and Marionette
receives the negotiated set of capabilities, so there is no need
to derive default values in case the value is null.
2018-07-28 13:46:14 +01:00
dvarga
edd9f3a3d9 Merge mozilla-central to mozilla-inbound on a CLOSED TREE 2018-07-27 20:55:06 +03:00
Wambui
ed1ae60ec8 Bug 1400233 - Drop ContentWebElement.LegacyIdentifier key from Marionette. r=ato,whimboo
Remove the legacy key that Marionette uses to identify web elements.
2018-07-27 16:06:39 +01:00
Henrik Skupin
f4703e6b19 Bug 1439995 - [marionette] Add user prompt checks for script execution commands. r=ato
WebDriver:{ExecuteScript,ExecuteAsyncScript} were missing user
prompt checks.

MozReview-Commit-ID: KL8gTBfSTrU

--HG--
extra : rebase_source : 7660e57079e82beb1aeb95d1673d69e82fef0394
2018-07-26 22:04:56 +02:00
Dipen Patel
7641beb1f8 Bug 1475647 - Remove nsISSLStatusProvider interface. r=baku,Gijs,jchen,jryans,keeler,mcmanus
- Access nsISSLStatus directly as a member of nsITransportSecurityInfo
and nsISecureBrowserUI.  This is part of a larger effort to consolidate
nsISSLStatus and nsITransportSecurityInfo.
- The TabParent implementation of GetSecInfo will always return null.
- Removed unnecessary QueryInterface calls
- Style adherence updates

MozReview-Commit-ID: Dzy6t2zYljL

--HG--
extra : rebase_source : 9c400bed3c9d29a186fc987c9bd0ffceb37bfd94
2018-07-13 11:48:55 -07:00
Cosmin Sabou
76b0913227 Merge autoland to mozilla-central. a=merge 2018-07-25 21:20:49 +03:00
Brindusan Cristian
aa2a0cc30c Backed out changeset b7334a57640f (bug 1475264) at ato's request for causing spiking intermittents. a=backout 2018-07-25 20:42:07 +03:00
Henrik Skupin
33a541ade3 Bug 1414776 - [fxui] Change testcases from mozqa.com to badssl.com and mixed-content-tests-mozilla.org. r=ato
MozReview-Commit-ID: DadY39FdZQT

--HG--
extra : rebase_source : cf9f5ed5ebd5a1b40763b1a5d1be5b4c59a9c915
2018-07-24 16:09:02 +02:00
Boris Zbarsky
75abc43e0d Bug 1476145 part 8. Stop using getInterface(nsIDOMWindowUtils) in various test code. r=kmag 2018-07-24 19:47:43 -04:00
Andreas Tolfsen
394ba9bb0b Bug 1476305 - Add pref to not truncate Marionette log messages. r=automatedtester
Marionette currently truncates a selection of log messages that
exceed 250 characters.  It is however sometimes, usually when
debugging locally, to not truncate logs so one can see exactly what
is sent to and fro the server.
2018-07-24 13:33:51 +01:00
Marco Castelluccio
9e4a436b47 Bug 1477202 - Avoid shipping PerTestCoverageUtils.jsm to users by only adding it to Marionette when MOZ_CODE_COVERAGE is defined. r=florian
--HG--
extra : rebase_source : 18fe9086546fa328dddfe35f307f383f832c9a75
2018-07-20 11:37:52 +02:00
Marco Castelluccio
87fbf2563c Bug 1476574 - Support resetting/dumping code coverage counters before/after web-platform-tests. r=jgraham
--HG--
extra : source : ec37892ce390414a0349e16e7cdc5d07d2d158ff
extra : histedit_source : 3f3e267d2c2385b35393c2e08621dabd47c07be4%2C03271be81bfe9f7b0d0dec52037606a20699bc3e
2018-07-19 11:57:54 +02:00
Coroiu Cristina
46afadc431 Backed out 2 changesets (bug 1476574) for browser-chrome failures at browser/base/content/test/static/browser_all_files_referenced.js
Backed out changeset 4ea7997194e9 (bug 1476574)
Backed out changeset ec37892ce390 (bug 1476574)
2018-07-19 23:40:24 +03:00
Marco Castelluccio
a95d709e9e Bug 1476574 - Support resetting/dumping code coverage counters before/after web-platform-tests. r=jgraham
--HG--
extra : rebase_source : dc3375090f952bd58e61c07e927aa00b1c337f50
2018-07-19 11:57:54 +02:00
Paolo Amadini
98b8539d10 Bug 1472555 - Part 4 - Remove the "listbox" bindings. r=bgrins
MozReview-Commit-ID: Cw90DjEMJpn

--HG--
extra : rebase_source : 74a64794699d65b2a9fe5ae4cb215403657d9e4a
2018-07-18 11:23:22 +01:00
Andreas Tolfsen
998f00f433 Bug 1475264 - Temporarily disable new cylical check in Marionette. r=me, a=Aryx
Bug 1447977 introduced a new implementation of evaluate.isCyclic
that was not based on JSON.stringify to overcome cyclic references
stored on Element prototypes.

This patch reverts the new behaviour and hides it behind an environment
variable MOZ_MARIONETTE_NEW_CYCLIC.  This is useful so we can more
easily test the difference in automation.

MozReview-Commit-ID: 2xtNL596Imc
2018-07-17 16:41:26 +01:00
Kirk Steuber
da107c225e Bug 1420514 - Replace app.update.enabled with app.update.disabledForTesting in the test harness r=ato,chutten,jmaher,lina
MozReview-Commit-ID: GCGKQ5QCC7o

--HG--
extra : rebase_source : ba135c7d285987fd030fef4e18a5aa701a43cdba
extra : intermediate-source : e6c89a0ff0c7a7e7cd1c028e49660bab0416a531
extra : source : 646080a591c0d2365d6e8f4a493607fa3fff86c9
2018-05-22 09:14:19 -07:00
Ting-Yu Lin
5f1b665033 Bug 1286882 - Make SVG basic shape elements unselectable. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D2038

--HG--
extra : moz-landing-system : lando
2018-07-13 18:01:48 +00:00
Alexandre Poirot
398f1b86db Bug 1000814 - Cleanup marionette transport.js from DevTools specifics. r=jryans
MozReview-Commit-ID: 5aKwtYeuVs1

--HG--
extra : rebase_source : 5ef5443ea59c13c4e5462308252ca53467acfb7d
2018-07-11 07:07:58 -07:00
Andreea Pavel
1e8d2e6f7d Backed out 7 changesets (bug 1420514) for breaking bc on different files on a CLOSED TREE
Backed out changeset 5a46a221b6e8 (bug 1420514)
Backed out changeset 48ed6dfe8772 (bug 1420514)
Backed out changeset 01bf643c77e5 (bug 1420514)
Backed out changeset 5791b17ccb82 (bug 1420514)
Backed out changeset 416e398d942f (bug 1420514)
Backed out changeset de4a4592dbd9 (bug 1420514)
Backed out changeset d3399edf0197 (bug 1420514)
2018-07-12 21:22:32 +03:00
Kirk Steuber
35d8c30dbb Bug 1420514 - Replace app.update.enabled with app.update.disabledForTesting in the test harness r=ato,chutten,jmaher,lina
MozReview-Commit-ID: GCGKQ5QCC7o

--HG--
extra : rebase_source : e38cf587711192c3020cd9ac6a39cdbd97d2600b
extra : source : 646080a591c0d2365d6e8f4a493607fa3fff86c9
2018-05-22 09:14:19 -07:00
Bogdan Tara
ccc435c216 Backed out changeset 2de43bdd92a8 (bug 1286882) for failures on test_text_selection.html CLOSED TREE 2018-07-12 05:23:44 +03:00
Ting-Yu Lin
5cb4683f78 Bug 1286882 - Make SVG basic shape elements unselectable. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D2038

--HG--
extra : moz-landing-system : lando
2018-07-12 00:42:51 +00:00
Andreas Tolfsen
de45691916 Bug 1447977 - Handle cyclic references in element prototypes. r=automatedtester
JavaScript objects can be nested to any depth, and as such we must
check that the value to be serialised contains a cyclic structure
before attempting to marshaling it.  We handle this correctly for
collections and arbitrary objects by relying on JSON.stringify.

For example with arrays:

	let arr = [];
	arr.push(arr);

And for objects:

	let obj = {};
	obj.reference = obj;

However, members of the different element prototypes (HTMLElement,
SVGElement, XULElement, et al.) may also contain cyclic references
via user-defined own properties:

	let body = document.documentElement;
	body.reference = body;

JSON.stringify enumerates an object's own properties, which means
it picks up on body's "reference" property in the above example.

Marionette needs to special case element prototypes because we want
to marshal them as web elements.  This patch replaces JSON.stringify
with a custom function for testing if a value contains cyclic
structures that special-cases elements.

MozReview-Commit-ID: 1TQtHrjf401

--HG--
extra : rebase_source : 382cadca8a19971fbb74850b1904bb9ebdc9061e
2018-07-06 20:08:37 +01:00
Andreas Tolfsen
5c26c522ac Bug 1447977 - Move cyclic object test function to evaluate. r=automatedtester
Moves the innards of assert.acyclic to evaluate.isCyclic so it can
be called externally without throwing.  It makes more sense for
this function to be exposed on the evaluate module, since other
behaviour related to JSON marshaling is also defined there.

MozReview-Commit-ID: 4WjEy8Sjqrm

--HG--
extra : rebase_source : 88cd829f3e178ec49ae532ea0af0a62defb4469f
2018-07-06 18:35:21 +01:00
Andreas Tolfsen
85be64f2ee Bug 1447977 - Move evaluate module API docs to RST. r=automatedtester
MozReview-Commit-ID: I5Pj8EsNyFc

--HG--
extra : rebase_source : 0e2ae0e961da92d4660368a8c28c717e1a0cd891
2018-07-06 16:36:19 +01:00
Axel Hecht
5bdc727943 Bug 721211: consolidate home page retrieval code, make it support non-localized prefs, r=jaws
Also changes the tooltip on the home button to be independent of the URLs
it opens, per dolske.

Some tests explicitly set browser.startup.homepage, but only through
SpecialPowers.putPrefEnv. That's a good compromise, given the extra
functionality there.

MozReview-Commit-ID: FPLxzi3jQAP

--HG--
extra : rebase_source : c2b014f2fb1c78ce04859344bd1803ef48d5d68d
2018-05-28 12:38:01 +02:00
Venkatesh Pitta
514d9d09b5 Bug 1452490 - Remove marionetteScriptFinished. r=whimboo
MozReview-Commit-ID: CdQCmtaodww

--HG--
extra : rebase_source : a950bc89194a866c4fa27fded1d2aed707ee750f
2018-07-08 14:52:49 +10:00
Henrik Skupin
0c86782bb8 Bug 1264259 - [marionette] Add support for unhandledPromptBehavior capability. r=ato
The handling of user prompts for each of the commands is set by the
current sessions user prompt handler. To fully support this feature
this patch adds support for it including all available options which
are "accept", "accept and notify", "dismiss", "dismiss and notify",
and "ignore".

MozReview-Commit-ID: IWuYM7QfZUv

--HG--
extra : rebase_source : 56726bab5aaa29ad629d22247ab2b5409ca83bb8
2018-06-10 14:37:19 +02:00
Andreas Tolfsen
330c31d7a5 Bug 1121705 - Look at window handles decrement when closing tab. r=whimboo
When Puppeteer opens a new tab using various strategies it relies
on the list of window handles increasing.  When performing the
reverse operation of closing a tab, it looks at the length of <tab>
chrome elements in the UI.

This changes the close operation to use the same mechanism as opening
a new tab to determine if the tab has been closed.  This seems to
be as reliable as looking at the number of <tab> elements.

As part of a forthcoming window tracking refactoring of Marionette
(https://bugzilla.mozilla.org/show_bug.cgi?id=marionette-window-tracking),
the list of window handles will be made even more reliable: a content
browser will not appear in the window handle list until both the tab
and it's linked content browser has been created and properly initialised.

MozReview-Commit-ID: FY5vGBpn64R

--HG--
extra : rebase_source : 99bad0c88f3b00a46131f1a502e40c61560aa59b
2018-07-04 16:36:05 +01:00
Gurzau Raul
ecaa52212e Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-04 19:33:40 +03:00
Henrik Skupin
7744986990 Bug 1473262 - [marionette] Force client to always use IPv4 to connect to Marionette. r=ato
Marionette uses nsIServerSocket which only allows to create a IPv4 listener.
On systems where IPv6 has precedence Marionette client will automatically
use the IPv6 address for `localhost` and will fail to connect to Marionette.
As such we should make sure that Marionette client connects to "127.0.0.1"
by default.

MozReview-Commit-ID: Fwzfa6CwBhX

--HG--
extra : rebase_source : c9f3f80074a18bd94b0836e648da4934e5ffa877
2018-07-04 12:26:32 +02:00
Yura Zenevich
d367361429 Bug 1349223 - update marionette a11y test based on the new handling of aria-hidden. r=ato
MozReview-Commit-ID: EsPY9n3vhHL
2018-07-04 10:21:01 -04:00
Bogdan Tara
6eafe1c00b Backed out changeset 9c75cab2e322 (bug 733530) for breaking artifact builds 2018-07-04 14:50:22 +03:00
Chris AtLee
8745339529 Bug 733530: Use .tar.gz for test archives r=gps
Differential Revision: https://phabricator.services.mozilla.com/D1743

--HG--
extra : moz-landing-system : lando
2018-07-03 18:33:02 +00:00
Andreas Tolfsen
adeb44c73e Bug 1470646 - Update Mn and Fxfn tests to use WebDriver conforming platformName. r=whimboo
MozReview-Commit-ID: 387jlJCbV59

--HG--
extra : rebase_source : 2b203e5e3499d483f1c1889f01bae0587b0b716e
2018-06-24 14:01:54 +01:00
Andreas Tolfsen
4da52dadd7 Bug 1470646 - Return platformName as recommended by WebDriver. r=whimboo
The WebDriver standard recommends that we return one of "windows",
"mac", or "linux".  Additionally Marionette supports Fennec, for
which we return "android": this is fine because the specification
does not yet cover mobile browsers.

MozReview-Commit-ID: EgZ9UKrbsrd

--HG--
extra : rebase_source : da87fc9e809e1b89997712b33781a6ac42b3e8aa
2018-06-23 14:31:00 +01:00
Andreas Tolfsen
46053b96d4 Bug 1470646 - Modularise capabilities module. r=whimboo
This removes the "session." prefixed global export type in favour
of individually exported types.

MozReview-Commit-ID: 3DHTrJsy2IN

--HG--
extra : rebase_source : 74674f2cc549a245472304c55a14dd2eca1ee235
2018-06-26 17:15:28 +01:00
Andreas Tolfsen
cbeff4bcc9 Bug 1470646 - Rename session module to capabilities. r=whimboo
MozReview-Commit-ID: 4hQN2gv3HDd

--HG--
rename : testing/marionette/session.js => testing/marionette/capabilities.js
rename : testing/marionette/doc/internals/session.rst => testing/marionette/doc/internals/capabilities.rst
rename : testing/marionette/test/unit/test_session.js => testing/marionette/test/unit/test_capabilities.js
extra : rebase_source : f93953b08d92b28add94706ee5a5c99f060776b0
2018-06-26 17:13:35 +01:00
Andreas Tolfsen
1c79ab9d74 Bug 1470646 - Silence missing nodeType property warning. r=whimboo
If val does not have a property nodeType, a warning is emitted to
the browser console.  This is observable when running the xpcshell
unit tests because we mock out val without a nodeType property.

MozReview-Commit-ID: GzqMoJQQdF8

--HG--
extra : rebase_source : be793524551751e96e2059907cfc3eed3602cde5
2018-06-23 14:00:50 +01:00
Coroiu Cristina
cc751350dc Backed out 8 changesets (bug 1470646) for linting failure on a CLOSED TREE
Backed out changeset 9b8d9f803b25 (bug 1470646)
Backed out changeset 58e2010d2842 (bug 1470646)
Backed out changeset 2b19429d778f (bug 1470646)
Backed out changeset e543f592454a (bug 1470646)
Backed out changeset 22469044267d (bug 1470646)
Backed out changeset e5415b1e22f5 (bug 1470646)
Backed out changeset 13e47fa99a31 (bug 1470646)
Backed out changeset 42964d651f02 (bug 1470646)

--HG--
rename : testing/marionette/capabilities.js => testing/marionette/session.js
rename : testing/marionette/test/unit/test_capabilities.js => testing/marionette/test/unit/test_session.js
2018-07-02 17:56:27 +03:00
Andreas Tolfsen
5b6126b948 Bug 1470646 - Update Mn and Fxfn tests to use WebDriver conforming platformName. r=whimboo
MozReview-Commit-ID: 387jlJCbV59

--HG--
extra : rebase_source : db18538e3e0e17406d5c6d8e2335eff6a31fe29a
2018-06-24 14:01:54 +01:00
Andreas Tolfsen
c48e826eda Bug 1470646 - Return platformName as recommended by WebDriver. r=whimboo
The WebDriver standard recommends that we return one of "windows",
"mac", or "linux".  Additionally Marionette supports Fennec, for
which we return "android": this is fine because the specification
does not yet cover mobile browsers.

MozReview-Commit-ID: EgZ9UKrbsrd

--HG--
extra : rebase_source : 14227ea60817a97d723d01f5fbaf193ee8e699de
2018-06-23 14:31:00 +01:00