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

3203 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen 662639d9ba Bug 1354211 - Add element.findClosest for finding ancestor by CSS selector. r=automatedtester
Introduces a new function, element.findClosest, that finds the
closest parent node by a CSS selector expression.  This is useful to
find arbitrary elements in the tree above us and is quite possibly
reusable for element.getContainer.

MozReview-Commit-ID: 8rBEepmDdPm

--HG--
extra : rebase_source : 3055d23ce7aeba355de93fdeff52eb4ffdffbc24
2017-12-31 14:39:14 +00:00
Andreas Tolfsen 3fcc02c1df Bug 1354211 - Add shorthand for emulating DOM blur event. r=automatedtester
As part of the focussing steps we subsequently need to blur the
element after a focus.

MozReview-Commit-ID: xyCcmqeOpO

--HG--
extra : rebase_source : 6645d354841a67730f2cfd89f59af390bb19691e
2017-12-31 14:36:03 +00:00
Andreas Tolfsen 27edd882b6 Bug 1354211 - Consider <optgroup> when finding container element. r=automatedtester
It is a bug in element.getContainer that <optgroup> is not considered
when locating the containing context element, <select>.  <optgroup>
is also a child element of <select> on the same level as <option>.

MozReview-Commit-ID: 2GJJrRuY5Th

--HG--
extra : rebase_source : 2bfabe6f79bc0d6d473657ef34cded04c51857a3
2017-12-31 14:32:38 +00:00
Andreas Tolfsen a48dd7b64b Bug 1429091 - Use global message manager in AsyncMessageChannel. r=maja_zf
Whenever we make proxied IPC calls to the content frame's message manager,
we do so over the global message manager.  AsyncMessageChannel takes a
closure that returns the current message manager from GeckoDriver#mm,
but this is unnecessary because it always holds a global message channel.

By not having to pass in a closure returning a message manager
to AsyncMessageChannel we losen the tight coupling a little bit.
Future patches will further reduce the tight coupling of browserFn.

MozReview-Commit-ID: EU0pkxA7lab

--HG--
extra : rebase_source : f6d6735e2d5bacdfbf20bde9a835f3f83846b2d6
2018-01-09 15:53:46 +00:00
Margareta Eliza Balazs a331a849a4 Backed out changeset 6d539e4a02bd (bug 1403519) for lint failures on a CLOSED TREE 2018-01-11 22:32:27 +02:00
Dustin J. Mitchell 522245f2f2 Bug 1403519 - only build docs when necessary r=gps
This marks **/docs/** as exclusively docs, and code that is autodoc'd as
inclusively docs.

That means that a change that purely modifies documentation files will *only*
run `docs` tasks, while a change that modifies autodoc'd source code will
*additionaly* run `docs` tasks.  The tasks do not run by default.

MozReview-Commit-ID: G9tOK0AwtrI

--HG--
extra : rebase_source : 8dd971e5c9b0eb5f47895664a4ea49442f303ecb
extra : source : 0881de9b2b5e36ec37cc866f1d4af109da57a919
2017-10-02 18:22:56 +00:00
Andreas Tolfsen 07e106bfb3 Bug 1429111 - Remove unused nsITimer from element.Store. r=maja_zf
There is an unused nsITimer instance in element.Store#timer that
this patch safely removes.

MozReview-Commit-ID: APvPsXfHUk9

--HG--
extra : rebase_source : f936abcb20d42c0eb27cfdee62d461d276cc2e5c
2018-01-09 16:29:13 +00:00
Andreas Tolfsen 653d4278ce Bug 1429116 - Turn Context enum into a class. r=maja_zf
There is no functional purpose of this patch apart from laying
groundwork to make the window tracking patches easier to review.

MozReview-Commit-ID: GOIysDLVWIf

--HG--
extra : rebase_source : b7ddbd91fa3bc53f30552a7a4761bbf7e9efda1b
2018-01-09 16:45:06 +00:00
Henrik Skupin f3030b9118 Bug 1429562 - Remove obsolete optional parameter `reset_session_id` from `delete_session`. r=ato
By calling "delete_session" the currently used session id always has to be reset,
because each session has its own unique id.

MozReview-Commit-ID: H9RiuNj7fRd

--HG--
extra : rebase_source : 13ca1cf1c80d74024fce5323f9d91b12fd8b5ad2
2018-01-11 12:24:15 +01:00
Andreas Tolfsen cf4259bb3d Bug 1426154 - Refactor Marionette content frame script registration. r=automatedtester
The Marionette:newSession IPC message is never used, and the
newSession function is consequently never called.  Since we no
longer have a need for resetting the content frame script, like
had with B2G, removing it is probably fine.

This also changes the Marionette:Register command to return an object
with the "outerWindowID" key, making it easier to identify and extract.

MozReview-Commit-ID: Ae3cPFWshcv

--HG--
extra : rebase_source : 056e9f2016317c314b9d46699669bfc76ea0bc37
2018-01-09 19:50:30 +00:00
Andreas Tolfsen 480ee1d6e7 Bug 1426154 - Sort message listeners lexicographically. r=automatedtester
It is easier to review what message listeners are added and removed
when the list is sorted.

MozReview-Commit-ID: 2fMpulA42Ww

--HG--
extra : rebase_source : 64e80f7c314596f27400657bd2e77da110f1443e
2018-01-09 19:48:14 +00:00
Andreas Tolfsen 7eb64afd98 Bug 1426154 - Use targetted IPC messages to talk to content frames. r=automatedtester
Prior to this patch Marionette used a broadcasting technique that
sent every IPC message to every registered content frame's message
manager.  This was implemented in GeckoDriver#sendAsync and worked
by appending the frame's outerWindowID to the message name to ensure
it reached the correct recipient.

Because it is hugely wasteful for every content frame to receive every IPC
message, this patch changes it so that we use a frame's dedicated message
manager to only channel messages it cares about.  A content frame's
direct message manager is stored in browser.Context#messageManager,
whereas GeckoDriver#mm is always the global message manager.

MozReview-Commit-ID: L0sD3VhzStv

--HG--
extra : rebase_source : 3f77075d88036d1e381a1a3fbbd359656838532c
2018-01-09 17:48:57 +00:00
Andreas Tolfsen ae01ba2bf2 Bug 1429384 - Stop toggling selectedness state of <option disabled>. r=automatedtester
When WebDriver:ElementClick clicks an <option disabled> element,
its selectedness state should according to a new specification
change proposed not change:

	https://github.com/w3c/webdriver/pull/1189

This patch provides tests for the specification change.

MozReview-Commit-ID: EXG98LjgB7d

--HG--
extra : rebase_source : d9e5b31dbd869c8151d85eb2b5bb8ba94a378a52
2018-01-10 13:30:17 +00:00
Henrik Skupin 8850686c20 Bug 1428740 - Improve Marionette unit tests for parent and content crashes. r=maja_zf
For parent process crashes a Wait().until() condition was added, which is
not necessary because if the parent (chrome) process dies, the browser
window will be gone immediately, and the IOError is thrown directly.

Further the tests should check that the correct type of crash is shown
in the IOError exceptions.

MozReview-Commit-ID: JC90CObZQ3r

--HG--
extra : rebase_source : 050fea4217c9ad95a84e20b6d5d92b42a89c3521
2018-01-08 11:37:41 +01:00
Andreas Tolfsen 591e869879 Bug 1429083 - Lazily load uuid-generator in proxy module. r=whimboo
The uuid-generator is not always used when the proxy module is imported.
This changes it to be lazily loaded so we do not always initialise it.

MozReview-Commit-ID: In0oAGDFjWy

--HG--
extra : rebase_source : d4d6c594cd1ac0872a1f34a30f3e7452a7759300
2018-01-09 15:37:57 +00:00
Andreas Tolfsen cc531c6af0 Bug 1429082 - Drop SyncChromeSender from proxy module. r=whimboo
The SyncChromeSender class and its factory construction function
proxy.toChrome is not used in Marionette and can be safely removed.

MozReview-Commit-ID: jBJ0nIkn3i

--HG--
extra : rebase_source : 83d9c8261eafc9385d8edee913cc0fdfed48dcaa
2018-01-09 15:42:55 +00:00
Andreas Tolfsen 813ae317c3 Bug 1429082 - Drop AsyncChromeSender from proxy module. r=whimboo
The AsyncChromeSender and its factory construction function
proxy.toChromeAsync are no longer in use.

MozReview-Commit-ID: 8tFr1IUTd5g

--HG--
extra : rebase_source : 0ade57fd83aa7d38b93f22cc87952e004902995d
2018-01-09 15:42:01 +00:00
Tim Nguyen c9103613c5 Bug 1428849 - Remove datetimepicker.xml bindings. r=mconley
MozReview-Commit-ID: LhfabvhJP5d

--HG--
extra : rebase_source : 8a2c329fab9b90746af9a09877be049479459b75
2018-01-09 19:39:30 +00:00
Andreas Tolfsen 5fe12f3b2d Bug 1379490 - Query capabilities configuration from chrome. r=automatedtester
Capabilities are currently sent to the content frame script when
its IPC message listeners attach (on Marionette:ListenersAttached).
If for whatever reason a capability's value changes since the script
was registered, for example by a user calling the WebDriver:SetTimeouts
command, a race condition is introduced where the capabilities in
chrome will differ from those cached in the frame script.

To remove any chance of race conditions, this patch changes the
content frame script to query the capabilities from chrome every time
it needs them.  This is slightly less efficient, but should be neglible.

The patch also clears up some unused state, such as the
curBrowser.newSessionCommandId property, which did not appear to
be used for anything interesting.

MozReview-Commit-ID: 1bSrRu5nK3h

--HG--
extra : rebase_source : 06f6fb8e4a6d04e5c4fa56d1becafd55ed0d1dee
2018-01-02 12:00:41 +00:00
Myk Melez c3da3e7642 Bug 1379338 - scriptify preferences XBL; r=jaws
MozReview-Commit-ID: Egyzs2KxhzH
2018-01-04 21:37:47 -08:00
Maja Frydrychowicz 9b8d78724d Bug 1341466 - Stop Marionette test run when Android emulator is unresponsive; r=automatedtester
The clean-up code in FennecInstance now counts and logs consecutive DMErrors.
The Marionette clean-up code then throws an UnresponsiveInstanceException
if we hit consecutive errors more than twice, which interrupts the
test run entirely. (Previously, MarionetteTestRunner would just keep running
tests despite consecutive clean-up failures, and eventually it would time out.)

This change allows us to take advantage of the retry mechanism in the
mozharness script that runs all Android tests: it sets the job status to "retry"
if it finds DMError in the test log after the run_tests step is done.

MozReview-Commit-ID: J36XuFVK1aK

--HG--
extra : rebase_source : 99914fd768522fe45160f171966a5efc65c59cc2
2017-11-16 12:00:49 -05:00
Andreas Tolfsen 45270b179b NO BUG - Fix links in contribution advice. r=me
DONTBUILD

MozReview-Commit-ID: 1kYhz990ClM
2018-01-02 14:08:25 +00:00
Andreas Tolfsen f139dda1d0 NO BUG - Prefer "./mach test" over flavor-specific commands. r=me
DONTBUILD

MozReview-Commit-ID: 54cAflnaEc3
2018-01-02 14:08:00 +00:00
Andreas Tolfsen aa9db7f619 Bug 1425708 - Fix link to contribution advice. r=me
DONTBUILD

MozReview-Commit-ID: FFaQxZdPXLX
2018-01-02 12:20:34 +00:00
Andreas Tolfsen 400eeee9cc Bug 1425708 - Link to Marionette README. r=me
DONTBUILD

MozReview-Commit-ID: feWWjE334r
2018-01-02 12:20:32 +00:00
Andreas Tolfsen 7ed916f9f0 Bug 1425708 - Document advice for working on Marionette. r=maja_zf,automatedtester
There are many gotchas to be aware of when working on Marionette
source code.  It would be a good idea to collect this in a single
document that could serve as documentation in onboarding new
developers.

DONTBUILD

MozReview-Commit-ID: DuVqckA7wLP
2018-01-02 12:20:18 +00:00
Andreas Tolfsen 946bc11136 Bug 1425708 - Simplify and make contribution advice coherent. r=maja_zf
DONTBUILD

MozReview-Commit-ID: 45HJNi3bp58
2018-01-02 12:20:12 +00:00
Andreas Tolfsen ae4c39f701 Bug 1425708 - Link to contribution and source docs in Marionette README. r=maja_zf
DONTBUILD

MozReview-Commit-ID: FVPrTxggaxQ
2018-01-02 12:20:05 +00:00
Leni Kadali af1b617e27 Bug 1315704 - Test that BaseMarionetteArguments constructs arguments as expected; r=maja_zf 2017-12-13 12:59:09 +03:00
Andreas Tolfsen 82905af7f5 Bug 1424635 - Consider DOCUMENT_NODE a valid web element. r=automatedtester
When looking up the parent of <html> using an XPath parent expression
such as "..", the nodeType of the returned HTMLDocument will be 9
(DOCUMENT_NODE).  <html> is a valid web element and we should be
able to serialise and return it to the user.

It is worth noting that other WebDriver implementations fail this
test because they fail on the nodeType check.

MozReview-Commit-ID: 4FMJEd8B4PZ

--HG--
extra : rebase_source : 24e7cb9da64cde0f133a09781c595b23f919ed59
2017-12-14 12:14:56 -06:00
Csoregi Natalia cc9c96cfe3 Merge mozilla-central to autoland. r=merge a=merge CLOSED TREE
MozReview-Commit-ID: 3aJiWXQpsFU

--HG--
extra : rebase_source : 2d07da0b40980836e6946a53c45739cc02cb60c3
2017-12-14 00:15:40 +02:00
Andrew Halberstadt 3e46924759 Bug 1209463 - [test] Use a common logger across suites from |mach test| and other test commands, r=gbrown
In order for |mach test| and |mach mochitest| to log an overall summary,
every test harness invocation they make needs to use the same structured
logger (otherwise the affected suite will be missing from the summary).

MozReview-Commit-ID: 8LJw7r8SItk

--HG--
extra : rebase_source : 1417dce3817bae94ad61a5250065c6cbc35857e4
2017-11-23 13:04:19 -05:00
Andrew Halberstadt 7f664cfdaf Bug 1209463 - [test] Log suite names in test harnesses, r=gbrown
Suite names are currently only used by formatters to print out
an overall summary from |mach test| and |mach mochitest|. So
this doesn't need to be exact and can be tweaked further at a
later date.

If multiple test invocations have the same suite name, their
results will be merged in the overall summary. If a suite name
is missing, the summary will contain a placeholder name.

MozReview-Commit-ID: K1xpb9hUQRX

--HG--
extra : rebase_source : cc8cc8b36255d939dd5dffd3c5444c34951ac8e2
2017-11-27 17:20:06 -05:00
Dragana Damjanovic 1ee1f7ed9c Bug 1409449 - Update test for bug 1409449. r=:ckerschb 2017-12-12 10:34:42 +01:00
Henrik Skupin 8a5c331fd2 Bug 1397612 - Skip TestQuitRestart.test_in_app_restart_safe_mode across all platforms. r=whimboo 2017-12-13 15:53:30 -06:00
Andreas Tolfsen 844fad888d Bug 1423282 - Remove last remenants of frame.Manager. r=automatedtester
This removes the last remenants of frame.Manager and
testing/marionette/frame.js from Marionette.  The preceding commits
in this changeset has gradually removed the unused and duplicated
features that it implemented.  The only remaining pieces are the
registrating of some chrome-side IPC message handlers which we can
leave attached for the duration of the Marionette session.

MozReview-Commit-ID: EYjrJBeTybz

--HG--
extra : rebase_source : cf8b2d04c05d22eea6fe24061ccb9b21680f0d3c
2017-12-05 21:28:59 +00:00
Andreas Tolfsen 0dd9f4d02f Bug 1423282 - Remove unused IPC listener Marionette:getImportedScripts. r=automatedtester
MozReview-Commit-ID: EwRaq9ljYxo

--HG--
extra : rebase_source : f018496a4593f05fc8637411492bcecb8416fd55
2017-12-05 21:21:26 +00:00
Andreas Tolfsen 3bf8512e70 Bug 1423282 - Drop Marionette:emitTouchEvent IPC message and related infra. r=automatedtester,maja_zf
This removes the Marionette:emitTouchEvent IPC message which is
currently not in use by any tests.  Along with removing this message
listener we can get rid of a tonne of complicated infrastructure
in testing/marionette/frame.js.

On switching the content frame we no longer await frame scripts to
register themselves because they implicitly inherit the parent's
frame script in Firefox/Fennec.  This was a relic from the B2G days
when each frame was OOP.

MozReview-Commit-ID: 5vxrWHjzd68

--HG--
extra : rebase_source : 544013f42c9ee9eebb119b8d98061d997c7a10f0
2017-12-05 21:08:48 +00:00
Andreas Tolfsen 1ce25757d1 Bug 1423282 - Remove legacy action chain browser close guard. r=automatedtester,maja_zf
It turns out that we no longer need to guard against the browser/frame
closing when using the legacy actions module.  This means we can
get rid of GeckoDriver#addFrameCloseListener, which again populates
mozBrowserClose and adds handlers for the related mozbrowserclose event.

The mozbrowsercloseevent was set for every case of Marionette:ok,
Marionette:done, and Marionette:error IPC messages.  These events
are still in use in testing/marionette/proxy.js, but with this
patch we stop listening for these events in testing/marionette/driver.js.

MozReview-Commit-ID: jp34kh7nqD

--HG--
extra : rebase_source : b9551972717c9c399806b7c7e1e2a1adc99593c5
2017-12-05 21:05:37 +00:00
Andreas Tolfsen abd2686324 Bug 1423282 - Remove aliveCheck to frame message manager. r=automatedtester
The IPC message "aliveCheck" will always fail because there is no such
message handler in Marionette and because it swallows all thrown errors.

MozReview-Commit-ID: JISuK65ZcGM

--HG--
extra : rebase_source : e4ccbb96727a67ce11f31463a08f66768bd23589
2017-12-05 20:50:14 +00:00
Andreas Tolfsen 774177521d Bug 1423282 - Drop MarionetteFrame:getCurrentFrameId IPC message. r=automatedtester,maja_zf
The MarionetteFrame:getCurrentFrameId IPC message was used for B2G
applications that needed access to chrome-scoped APIs for emitting
touch events.  Now that actions happen either in chrome _or_ in
content this is no longer necessary functionality to maintain.

MozReview-Commit-ID: Bk9LRAOxjAw

--HG--
extra : rebase_source : 71dac090db681a24dc5ebb54fdf1cf02a97563b0
2017-12-05 19:40:29 +00:00
Andreas Tolfsen f42cdc3940 Bug 1423282 - Drop MarionetteFrame:getInterruptedState IPC message. r=automatedtester,maja_zf
MarionetteFrame:getInterruptedState was used in B2G to abortence
if the OOP frame got interrupted by a modal dialogue.  Like the
MarionetteFrame:handleModal IPC message, the frame script needed
chrome assistance for querying the presence of this dialogue.

Today modal dialogues (known as "user prompts") are handled entirely
in chrome space, and the presence of such a dialogue is indeed
meant to pause script execution in the web document.

This patch makes some rather questionable changes to the legacyaction
module, but this is alright because we don't expect any more tests to
be written using it.  This patch just about makes sure the remaining
body of tests keeps passing.

MozReview-Commit-ID: 72g0GlYy21T

--HG--
extra : rebase_source : f44ed5999554a42c67827d6935bd96cc79a8e5dd
2017-12-05 19:22:53 +00:00
Andreas Tolfsen 79058696cd Bug 1423282 - Drop MarionetteFrame:handleModal IPC message. r=automatedtester
The MarionetteFrame:handleModal IPC message is not used in listener.js,
and it is no longer a requirement that this is done through a call
from the content frame script.

MozReview-Commit-ID: Bn40b1VT7Da

--HG--
extra : rebase_source : 9def3f7faa5f860622259bd85982e1072b436be0
2017-12-05 18:52:07 +00:00
Andreas Tolfsen 0bcf875fad Bug 1423282 - Drop Marionette:shareData IPC message. r=automatedtester
The Marionette:shareData IPC message was used by the simpletest
harness to share test logs with the main process.  This is no longer
a requirement.

MozReview-Commit-ID: 4nn7FefCdJ8

--HG--
extra : rebase_source : 44d8334c4a116d7056ee7a938fdf900e350d73f2
2017-12-05 18:48:37 +00:00
Andreas Tolfsen 74a8fcb707 Bug 1423282 - Drop Marionette:log IPC message. r=automatedtester
We used to transport log messages to the main process for logging.
This is no longer required and the IPC message has not been in use
for some time.

MozReview-Commit-ID: F5thqDOJADd

--HG--
extra : rebase_source : b1ba930cc870655398f7024213c77cb6b93113c9
2017-12-05 18:46:49 +00:00
Andreas Tolfsen f1282f9d51 Bug 1423282 - Drop Marionette:switchToModalOrigin IPC message. r=automatedtester
In B2G, when a frame was interrupted by a modal dialogue, the
Marionette:switchToModalOrigin IPC message allowed you to switch
back to the frame that was interrupted.  It got called by the
interrupted frame once the dialogue got dismissed and the frame
resumed its process.  This functionality is no longer requried.

MozReview-Commit-ID: DtCOzeW45qP

--HG--
extra : rebase_source : 46ed3841abc53e0369246625d16839e9b2576d39
2017-12-05 18:44:24 +00:00
Dorel Luca ed8dc2034d Merge inbound to mozilla-central r=merge a=merge 2017-12-07 00:01:19 +02:00
Andreas Tolfsen 68c9c60264 Bug 1423209 - Drop ability to put frame script to sleep. r=automatedtester
Marionette has a Marionette:sleepSession IPC command it uses to put a
content frame script "to sleep".  This removes certain message handlers
and clears some state by calling deleteSession() in listener.js.
The frame script can later be "restarted" by calling Marionette:restart.

This is B2G-specific functionality we no longer need.  In an effort
to remove old cruft from Marionette before tackling the window
tracking refactoring we want to remove support for this.

This removes the Marionette:sleepSession and Marionette:restart
IPC messages as well as GeckoDriver#switchToGlobalMessageManager.
The latter function additionally resets GeckoDriver#mm to the global
message manager which is fine, because for Firefox/Fennec we never
use the targetted message manager.

There will be a follow-up bug to remove OOP frame handling and the
targetted message manager used in GeckoDriver#sendAsync.

MozReview-Commit-ID: GRSBReBfQGX

--HG--
extra : rebase_source : 9f5ff562e3547ee804ec350678cb688f2cf1b4fa
2017-12-05 17:07:36 +00:00
Tiberius Oros 3d72365a57 Backed out 2 changesets (bug 1422915)for eslint failure on /builds/worker/checkouts/gecko/testing/marionette/server.js:391:5 r=backout on a CLOSED TREE
Backed out changeset d61481e31a93 (bug 1422915)
Backed out changeset a30ad544bf0f (bug 1422915)
2017-12-06 14:04:06 +02:00
Henrik Skupin c032e116cb Bug 1422741 - Skip test_strategy_after_remoteness_change for intermittent failures. r=whimboo
MozReview-Commit-ID: HPgIF2S8hT1

--HG--
extra : rebase_source : 5f58a28e3aa4e9df2ddc0de82ef3454078b67583
2017-12-06 10:28:00 +01:00