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

3169 Коммитов

Автор SHA1 Сообщение Дата
Dragana Damjanovic 1ee1f7ed9c Bug 1409449 - Update test for bug 1409449. r=:ckerschb 2017-12-12 10:34:42 +01: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
Andreas Tolfsen 1b0393bfa6 Bug 1423357 - Remove unused properties from GeckoDriver class. r=whimboo
MozReview-Commit-ID: 3tppkWZtCBP

--HG--
extra : rebase_source : fbcd6015295f9ced0a5c96e47e7e0b9554eacb54
2017-12-05 21:59:38 +00:00
Andreas Tolfsen c4a2765582 Bug 1422915 - Be explicit about remote-active data when shutting down. r=whimboo
When Marionette starts and shuts down it emits the remote-active
system notification.  On starting the data is set to true (a boolean),
but on shutdown it is left undefined which defaults to null.

We should use false (boolean) explicitly.

MozReview-Commit-ID: Er0Wn2pZrOi

--HG--
extra : rebase_source : 35d1f7ab471309a25d660c056deb6f69821e40c2
2017-12-04 18:55:42 +00:00
Andreas Tolfsen 14878bd48a Bug 1422915 - Send remote-active after socket has ceased listening. r=whimboo
The remote-active system notification is currently sent before the
TCP socket has stopped listening.  It is marginally safer to send
it as the last action.

MozReview-Commit-ID: KhB6TMvyCPv

--HG--
extra : rebase_source : 5363c00a8da9217d2f93908c52a466d47fb21d75
2017-12-04 18:54:12 +00:00
Vedant Chakravadhanula d81a7eb85a Bug 1422697 - Changed crash reporter detection in unit test r=whimboo
Since the crash reporter interface was made available all the time,
the check for the enabled state of the crash reporter had to be made
via AppConstants.jsm

MozReview-Commit-ID: LPkBVEjBB5o

--HG--
extra : rebase_source : eb49d7ca7c457ae1afaafdd9e6364333aebd03bf
2017-12-05 20:01:55 +05:30
Henrik Skupin 426fd860a6 Bug 1423255 - Cleanup tests in test_click_scrolling.py. r=ato
MozReview-Commit-ID: CWJS4izi4RK

--HG--
extra : rebase_source : 064592ed72d49238dc2cefffff58fa7a2a75013c
2017-12-05 21:43:53 +01:00
Andreas Tolfsen e0301dc51a Bug 1422915 - Send remote-active after socket has ceased listening. r=whimboo
The remote-active system notification is currently sent before the
TCP socket has stopped listening.  It is marginally safer to send
it as the last action.

MozReview-Commit-ID: KhB6TMvyCPv
2017-12-06 14:17:16 +00:00
Henrik Skupin c1a287281d Bug 1420577 - Improve failure messages for invalid proxy configurations. r=ato
MozReview-Commit-ID: 4HitwxCUQH

--HG--
extra : rebase_source : 2315818aaef45ab1fce63cf7dfdf0533a0cd0c70
2017-12-04 23:32:44 +01:00
Henrik Skupin 4fed76fc97 Bug 1420577 - Add template literals to eslint max-len ignore list. r=ato
MozReview-Commit-ID: 8e7v7nbMgOk

--HG--
extra : rebase_source : 0eed9c4c391846cb33b900b803282b3b9e34b23b
2017-12-05 08:06:17 +01:00
Henrik Skupin 0e0f517ffb Bug 1417051 - Report relative path to Marionette test modules starting from cwd. r=maja_zf
Only reporting the basename of the test module doesn't allow someone
to easily figure out where the file is actually located. Instead the
current working directory should be used, and the test module path
reported as relative path.

MozReview-Commit-ID: 8FdYNw4ocjL

--HG--
extra : rebase_source : 338ebdcd34230a9918c6db4297bcc6c91f7c2e77
2017-11-30 17:03:18 +01:00
Henrik Skupin 620529e0ef Bug 1417051 - Don't report test start/end twice. r=maja_zf
The harness already logs the start and end of the test via mozlog.
So there is no need to do it twice. Especially because this requires
another command send to Marionette server.

MozReview-Commit-ID: 5JfU9XgbVqx

--HG--
extra : rebase_source : 28947a416bfdda626dd1329522e02264593368b2
2017-11-30 16:08:10 +01:00
Bogdan Tara ebe0a1a20c Merge inbound to mozilla-central r=merge a=merge 2017-12-04 22:20:49 +02:00
Andreas Tolfsen 76d7517858 NO BUG - TLSify more docs links in geckodriver/Marionette. r=me
DONTBUILD

MozReview-Commit-ID: JIKVfzvwI8z
2017-12-04 13:34:26 +00:00
Andreas Tolfsen 762113d18b NO BUG - Link to CONTRIBUTING from Marionette source docs. r=me
MozReview-Commit-ID: BGaVQSJwKM5
2017-12-04 13:31:31 +00:00
Andreas Tolfsen 200365e99c NO BUG - Add bug tracking and communication sections to README. r=me
DONTBUILD

MozReview-Commit-ID: 2yah3fUKsDF
2017-12-04 13:31:31 +00:00
Andreas Tolfsen d90168a921 NO BUG - TLSify link in Marionette README. r=me
DONTBUILD

MozReview-Commit-ID: DNuKtvtRsHd
2017-12-04 13:31:30 +00:00
Andreas Tolfsen fb875ac56c NO BUG - Use Marionette docs introduction from README. r=me
DONTBUILD

MozReview-Commit-ID: 5Zuak0B2TPd
2017-12-04 13:31:30 +00:00
Henrik Skupin cb6d8c72b5 Bug 1414322 - Use WebDriver conformant interactability checks for sendKeysToElement. r=ato
Enables webdriver spec keyboard interactability tests for 'Element Send Keys'
by default by re-using the same capability 'moz:webdriverClick' from
'Element Click'. It can be disabled by turning off this preference.

Also various webplatform tests for webdriver spec have been added which
cover both the scroll into view action, and keyboard interactability check.

Existing Marionette unit tests will be run in both modes, until we can
get rid of the legacy mode.

MozReview-Commit-ID: dFB8sQ6CN5

--HG--
extra : rebase_source : 9f6a3c3e42f779f039f61d0b239f9f5925ecdcf5
2017-11-10 20:29:04 +01:00
Henrik Skupin 88c43fb94d Bug 1414322 - Refactor sendKeysToElement methods. r=ato
Each call to sendKeysToElement should go through the interaction
module, and never by directly calling event.sendKeysToElement. This
will make sure that keyboard interactability checks will always be
performed, even for chrome scope like alerts or modal dialogs.

MozReview-Commit-ID: GoDKjMsNZsq

--HG--
extra : rebase_source : c305c748e68e60abd01dab37d00a7e3aff7d3d64
2017-11-09 20:39:51 +01:00
Henrik Skupin c6f563baa8 Bug 1414322 - Update Marionette accessibility tests for non keyboard-interactable elements. r=yzen
Because with webdriver interactability checks turned on, accessability
checks are done afterward, and like in this case would even never run
due to <h1> is not a keyboard-interactability element, which causes an
ElementNotInteractableException.

As such those obsolete tests can be removed now.

MozReview-Commit-ID: 6pw5TCgMb7l

--HG--
extra : rebase_source : 05a13ac45530c67bc45e16f8ac893e5fa3bf9d51
2017-11-28 17:18:37 +01:00
Henrik Skupin a646337e2e Bug 1414322 - Refactor keyboard and visibility tests. r=ato
Both 'test_text.py' and 'test_typing.py' contained nearly duplicated
tests for send_keys(), which have been removed from test_text.py now.

The HTML testcase file 'javaScript.html' was used in various tests
whereby it's initial purpose was to test keyboard events. As such
unit tests have been updated to use inline HTML, or another more
generic HTML testcase file. Also parts of the the file related to
visibility checks have been moved to 'visibility.html'.

MozReview-Commit-ID: CEWPPGdAffW

--HG--
rename : testing/marionette/harness/marionette_harness/www/javascriptPage.html => testing/marionette/harness/marionette_harness/www/keyboard.html
extra : rebase_source : 6a8fc6bfb5e421b4a1d545f8bdc7d9fbd38ef3f3
2017-11-10 11:01:40 +01:00
Andreas Tolfsen 95288d7450 Bug 1422593 - Pretty print WindowProxy and ChromeWindow. r=whimboo
Enhances format.pprint to also provide pretty-printing of WindowProxy
and ChromeWindow prototypes.

Unfortunately there is no good way of testing this because
Object.prototype.toString.call always gets the underlying prototype.

MozReview-Commit-ID: 5sKzJvpWVyc

--HG--
extra : rebase_source : ca021d78a19c49ad2c2a381832d25c201ee8b2e0
2017-12-03 15:48:13 +00:00
Henrik Skupin fa71543913 Bug 1419538 - Marionette log entries should show object details. r=ato
By missing to convert a Javascript object to a packet and serializing
it, no details were printed eg for session capabilities for the call
to "start_session()".

MozReview-Commit-ID: HdcehGpBvdA

--HG--
extra : rebase_source : 7ab6e794972869b89aeb957ae53c703727d84094
2017-11-30 15:09:32 +01:00
Andreas Tolfsen 7fe6af9075 Bug 1106913 - Detect cyclic objects when marshaling objects. r=whimboo
Marionette does currently not test for cyclic object references as
it marshals return values for transport across the wire.

Example of cyclic object:

	let obj = {};
	obj.cyclic = obj;

Passing this through evalaute.toJSON currently causes an infinite
recursion due to obj being referenced inside itself.  We can use
JSON.stringify to test if obj contains such cyclic values.  It is
assumed that the input to assert.acyclic is already JSON safe, so it can
be parsed by JSON.stringify, because of the previous checks it has made.

MozReview-Commit-ID: 4CnY2dcW5IF

--HG--
extra : rebase_source : e1a5fb595ad487fa47566bad5c2129a79c1d7b34
2017-11-24 18:21:17 +00:00
Andreas Tolfsen 17e02f9dbb Bug 1106913 - Add assert.acyclic for testing for cyclic objects. r=whimboo
Introduces a new assert.acyclic assertion helper function that uses
JSON.stringify to test if the input contains cyclic object references.
A JavaScriptError will be thrown if the object is not acyclic.

MozReview-Commit-ID: 3y8pnkPgf2k

--HG--
extra : rebase_source : 069ae9e1e6d3738c8712fe5c1838f6d3a91125e4
2017-11-24 18:21:03 +00:00
Andreas Tolfsen 0cde42dcd0 Bug 1106913 - Send errors from sendResponse/sendError back to chrome. r=whimboo
Errors that arise from inside sendResponse or sendError are currently
only logged to stdout.  Now that we have a pretty safe error.wrap
implementation we should serialise them and return them to the main
process so that they are not "lost" in stdout.

MozReview-Commit-ID: FuMeUqQ7CMv

--HG--
extra : rebase_source : 2d43eb63ec13dbfb461d72dd9ddee232ff4ff9d8
2017-11-24 18:19:18 +00:00
Henrik Skupin d9dbc0370f Bug 1420098 - Release Marionette driver 2.5.0 and harness 4.3.0. r=ato
MozReview-Commit-ID: 8XvkYnDOAF7

--HG--
extra : rebase_source : 5483f396b1606dd35d5fa8973e9f0c7f5fe9e59c
2017-11-30 15:20:36 +01:00
muthuraj90ec@gmail.com 502bc1193d Bug 1385476 - Synthesize dblclick MouseEvent when performing webdriver actions; r=maja_zf
MozReview-Commit-ID: 9u2mtolhjUq

--HG--
extra : rebase_source : 76b2e3fbd3cbb86f062227c779e88e61fefc1d8d
2017-11-24 15:53:57 -05:00
Dorel Luca be78e6ea9b Merge inbound to mozilla-central r=merge a=merge 2017-11-29 12:26:15 +02:00
Tiberius Oros 18ea9ecad9 Merge mozilla-central to mozilla-inbound. r=merge a=merge CLOSED TREE
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-618078-network-exceptions.html => devtools/client/webconsole/new-console-output/test/mochitest/test-network-exceptions.html
rename : devtools/client/webconsole/new-console-output/test/mochitest/test_bug1092055_shouldwarn.html => devtools/client/webconsole/new-console-output/test/mochitest/test-subresource-security-error.html
rename : devtools/client/webconsole/new-console-output/test/mochitest/test_bug1092055_shouldwarn.js => devtools/client/webconsole/new-console-output/test/mochitest/test-subresource-security-error.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/test_bug1092055_shouldwarn.js^headers^ => devtools/client/webconsole/new-console-output/test/mochitest/test-subresource-security-error.js^headers^
extra : rebase_source : e126b0ab427161de0acd67cdfb9a1434415412dc
2017-11-29 02:25:59 +02:00
Alan Williams 950cd321a9 Bug 1393831 - pointerMove action calculates wrong default element centre point. r=maja_zf
--HG--
extra : rebase_source : 32b0fecfa011b8bba9e5926316f124b2811bcded
2017-11-28 14:36:18 -05:00
Andreas Tolfsen 4a2fe54072 Bug 1420431 - Return no such element error when on no active element. r=maja_zf
document.activeElement will return null if there is no document
element.  This may happen if, for example, in an HTML document the
<body> element is removed.

The WPT test test_sucess_without_body in get_active_element.py
is wrong.  It expects Get Active Element to return null if there
is no document element, but following a recent specification change
we want it to return a no such element error.

Specification change: https://github.com/w3c/webdriver/pull/1157

MozReview-Commit-ID: LQJ3slV9aty

--HG--
extra : rebase_source : cc349bb642f57bb2203d126ecd86d8d988d90301
2017-11-24 16:23:02 +00:00
Andreas Tolfsen 4ee38f4584 Bug 1420431 - Allow WebElement to be returned from GeckoDriver. r=maja_zf
Instead of having to assign resp.body.value explicitly when dealing
with WebElements, this makes it possible to return WebElement
references directly from GeckoDriver command handlers.  This was
not possible in the past because web element representations were
just plain object literals.

MozReview-Commit-ID: EPqXJ2gpNen

--HG--
extra : rebase_source : 334a5f4f597259c28b3c00c93f3ad24912d5dd87
2017-11-24 16:20:21 +00:00
Cosmin Sabou 651cb90a8a Backed out changeset be86ccde4f4a (bug 1352497) for bc failures on Windows 7 debug with e10s at docshell/test/browser/browser_bug1309900_crossProcessHistoryNavigation.js r=backout a=backout 2017-11-26 01:36:44 +02:00
Andreas Tolfsen 51b3c4eebd Bug 1417821 - Prevent missing click event from causing deadlock in interaction.flushEventLoop. r=whimboo
If the DOM click event does not fire, which currently happens in
this edge case where Firefox does not bubble the click event up
to <body>, interaction.flushEventLoop will hang forever.

This is believed to be a bug in Gecko, but it is probably safer to
use a TimedPromise here in case anything else bad were to happen.

Thanks-to: Alexei Barantsev <barancev@gmail.com>
MozReview-Commit-ID: KZBdR8zcfJb

--HG--
extra : rebase_source : aba0c4c810a703877d858fa6f4398ad960ece0d1
2017-11-23 15:02:17 +00:00