Commit Graph

37 Commits

Author SHA1 Message Date
Andreas Tolfsen
650eade2a3 Bug 1107706: Part 12: Drop marionette-* prefix on files 2015-03-23 21:32:03 +00:00
Andreas Tolfsen
ac57bc3a40 Bug 1107706: Part 11: Global modal dialogue support 2015-03-20 15:46:46 +00:00
Andreas Tolfsen
74619545e3 Bug 1107706: Part 5: Refactor Marionette chrome/content communication
The Marionette server handles requests separately with a global sense
of state which makes it hard to introduce generalised behaviour to many
commands.  This effectively slows down protocol implementation because
each command request individually needs to do heavy lifting.

This patch introduces a series of abstractions that separates out the
WebDriver implementation to a new class, GeckoDriver.  It also features
a new interface to mediate messages between the chrome- and content
processes.

This allows the code living in the chrome context to make direct calls
on the listener through a promise-based API:

	let listener = new ListenerProxy(mm, sendCallback);
	let res = yield listener.functionOnListener("arg1", "arg2");

The MarionetteServer class that used to live in marionette-server.js
has now been moved to server.js, while the WebDriver implementation
has moved to driver.js.  By introducing more stringent separation,
MarionetteServer now properly encapsulates the server process allowing
us to unit tests for it in the future.

The patch is a refactor in the truest sense, in the meaning that no
input or output should have changed.
2015-03-19 21:12:58 +00:00
Andreas Tolfsen
3f4e8f22be Bug 1107706: Part 4: Add dispatching mechanism to encapsulate connection
The dispatcher is analogous to the client socket connection, and handles
receiving packets and closing connections.

It also encompasses some of the functionality needed to establish the
devtools and Marionette connection, that previously used to live in
MarionetteServerConnection in marionette-server.js.

For each connection, recognised commands will be forwarded to the command
processor (command.js) unless a handler is defined in Dispatcher.requests.
2015-03-18 12:27:29 +00:00
Andreas Tolfsen
f8a8c6c3c4 Bug 1107706: Part 3: Add a command processor to Marionette
The command processor receives messages, processes them, and wraps the
execution of the command implementations.  This allows commands to throw
errors without worrying about the side effects.

This patch also introduces a Response object which correspondingly wraps
the replies to the client.  This shifts the responsibility of managing
the correctness of the packets from the commands to this.
2015-03-17 14:49:27 +00:00
Andreas Tolfsen
017a1b17a6 Bug 1107706: Part 2: Add error module and WebDriver error objects
Adds the ability to throw error objects for WebDriver statuses, and an
error module with convenience functions for manipulation of these and
for handling other error related operations.
2015-03-17 14:27:20 +00:00
Wes Kocher
108e153990 Backed out 15 changesets (bug 1107706) for marionette bustage CLOSED TREE
Backed out changeset 3c25064e24da (bug 1107706)
Backed out changeset 3b7cdf06f4b9 (bug 1107706)
Backed out changeset ec2b1317d3c6 (bug 1107706)
Backed out changeset 91b35cb3308b (bug 1107706)
Backed out changeset 43c58b21251f (bug 1107706)
Backed out changeset e3ddaf8aae39 (bug 1107706)
Backed out changeset 0cd696bfc3b0 (bug 1107706)
Backed out changeset eeb3d39874b1 (bug 1107706)
Backed out changeset 7bc309f733fa (bug 1107706)
Backed out changeset 69669d0e6ddc (bug 1107706)
Backed out changeset 7f506cdb77b8 (bug 1107706)
Backed out changeset 7abef4010b30 (bug 1107706)
Backed out changeset b0d00faceef4 (bug 1107706)
Backed out changeset 0c074cdc434e (bug 1107706)
Backed out changeset 3b449f8dd470 (bug 1107706)
2015-03-23 18:48:07 -07:00
Andreas Tolfsen
a01e6bf3da Bug 1107706: Part 12: Drop marionette-* prefix on files 2015-03-23 21:32:03 +00:00
Andreas Tolfsen
d5baf60535 Bug 1107706: Part 11: Global modal dialogue support 2015-03-20 15:46:46 +00:00
Andreas Tolfsen
fe54ac0fd1 Bug 1107706: Part 5: Refactor Marionette chrome/content communication
The Marionette server handles requests separately with a global sense
of state which makes it hard to introduce generalised behaviour to many
commands.  This effectively slows down protocol implementation because
each command request individually needs to do heavy lifting.

This patch introduces a series of abstractions that separates out the
WebDriver implementation to a new class, GeckoDriver.  It also features
a new interface to mediate messages between the chrome- and content
processes.

This allows the code living in the chrome context to make direct calls
on the listener through a promise-based API:

	let listener = new ListenerProxy(mm, sendCallback);
	let res = yield listener.functionOnListener("arg1", "arg2");

The MarionetteServer class that used to live in marionette-server.js
has now been moved to server.js, while the WebDriver implementation
has moved to driver.js.  By introducing more stringent separation,
MarionetteServer now properly encapsulates the server process allowing
us to unit tests for it in the future.

The patch is a refactor in the truest sense, in the meaning that no
input or output should have changed.
2015-03-19 21:12:58 +00:00
Andreas Tolfsen
f912c129ab Bug 1107706: Part 4: Add dispatching mechanism to encapsulate connection
The dispatcher is analogous to the client socket connection, and handles
receiving packets and closing connections.

It also encompasses some of the functionality needed to establish the
devtools and Marionette connection, that previously used to live in
MarionetteServerConnection in marionette-server.js.

For each connection, recognised commands will be forwarded to the command
processor (command.js) unless a handler is defined in Dispatcher.requests.
2015-03-18 12:27:29 +00:00
Andreas Tolfsen
0d8b40d434 Bug 1107706: Part 3: Add a command processor to Marionette
The command processor receives messages, processes them, and wraps the
execution of the command implementations.  This allows commands to throw
errors without worrying about the side effects.

This patch also introduces a Response object which correspondingly wraps
the replies to the client.  This shifts the responsibility of managing
the correctness of the packets from the commands to this.
2015-03-17 14:49:27 +00:00
Andreas Tolfsen
f6d781f7d9 Bug 1107706: Part 2: Add error module and WebDriver error objects
Adds the ability to throw error objects for WebDriver statuses, and an
error module with convenience functions for manipulation of these and
for handling other error related operations.
2015-03-17 14:27:20 +00:00
Chris Manchester
4ad6fcd0b8 Bug 1135846 - Expose marionette's actions code to chrome scope where applicable. r=dburns 2015-03-19 18:41:19 -07:00
Alexandre Lissy
2a69c8a3f7 Bug 1130287 - Expose isB2G in SpecialPowers. r=sicking
Some mochitests needs to behave differently when ran on B2G Desktop.
Currently, this is implemented using user agent string detection,
mostly relying on "Mobile" being present and "Android" being absent.
This is only true on B2G Desktop when ran on Try because the mozconfig
defined FXOS_SIMULATOR and that, per bug 1115935, this substring is only
added in this case, but not if just MOZ_B2G is defined. A better
approach is to expose 'isB2G' in SpecialPowers for this kind of
detection.
2015-02-08 10:09:00 +01:00
Fernando Jimenez
61e3a5f489 Bug 1097928 - Convert MozPaymentProvider to WebIDL. r=bholley,fabrice 2015-01-19 14:50:32 +01:00
Malini Das
dee908c600 Bug 1038864 - Marionette find element fails on social chat component. r=automatedtester 2014-07-28 14:49:00 +02:00
Alexandre Poirot
7b3b1cc88a Bug 965257 - Expose Assert.jsm in mochitest-plain chrome script. r=ted 2014-03-25 12:03:21 -04:00
Malini Das
78383d1a72 Bug 779284 - Implement B2G Modal dialog handling to Marionette, r=jgriffin,mdas 2013-09-19 13:35:19 -04:00
Jonathan Griffin
284ff1a1b5 Bug 779284 - Back out 705d668fb81b for suspected perf regressions, a=test-only 2013-08-25 11:23:19 -07:00
Malini Das
1c5e0ab176 Bug 779284 - Implement Modal dialog handling to Marionette, r=jgriffin 2013-08-16 16:54:41 -04:00
Mounir Lamouri
3612d22748 Bug 886046 - Add a MockColorPicker module in SpecialPowers. r=ctalbert 2013-07-08 15:11:36 -04:00
Jonathan Griffin
5457563e70 Bug 885940 - Move common code inato marionette-common.js, r=mdas
--HG--
rename : testing/marionette/marionette-log-obj.js => testing/marionette/marionette-common.js
2013-06-28 14:07:55 -07:00
William Lachance
2dacbf3da8 Bug 797529 - Remove dependence on debugger server, r=jgriffin 2013-05-14 16:54:07 -04:00
Jonathan Griffin
1e2ba240dc Bug 865867 - Remove unused perf code from Marionette, r=mdas 2013-04-29 09:38:54 -07:00
Doug Turner
2c40fe1d13 Bug 805178 - Device Storage - Add tests to ensure Application Permissions match that of the Permission Matrix. r=jmaher 2012-10-31 10:06:51 -07:00
Joel Maher
c3c481579d Bug 762908 - Rip enablePrivilege out of spidermonkey tests. r=ted
--HG--
rename : testing/mochitest/specialpowers/Makefile.in => testing/specialpowers/Makefile.in
rename : testing/mochitest/specialpowers/chrome.manifest => testing/specialpowers/chrome.manifest
rename : testing/mochitest/specialpowers/components/SpecialPowersObserver.js => testing/specialpowers/components/SpecialPowersObserver.js
rename : testing/mochitest/MockFilePicker.jsm => testing/specialpowers/content/MockFilePicker.jsm
rename : testing/mochitest/tests/SimpleTest/MozillaLogger.js => testing/specialpowers/content/MozillaLogger.js
rename : testing/mochitest/tests/SimpleTest/SpecialPowersObserverAPI.js => testing/specialpowers/content/SpecialPowersObserverAPI.js
rename : testing/mochitest/specialpowers/content/specialpowers.js => testing/specialpowers/content/specialpowers.js
rename : testing/mochitest/tests/SimpleTest/specialpowersAPI.js => testing/specialpowers/content/specialpowersAPI.js
rename : testing/mochitest/specialpowers/install.rdf => testing/specialpowers/install.rdf
rename : testing/mochitest/specialpowers/jar.mn => testing/specialpowers/jar.mn
2012-09-20 09:06:50 -04:00
David Burns
19ec8c4624 Bug 751637: Added keys helper to Marionette and removing sendKeysToElement atom; r=jgriffin 2012-08-05 12:49:42 -07:00
Malini Das
a2dc93c7cb Bug 771224 - use chrome:// instead of loading remote xul. r=jgriffin 2012-07-12 11:01:20 -04:00
Ryan VanderMeulen
891e38e528 Revert c39d36167b99 due to a horribly munged backout. 2012-06-10 19:44:50 -04:00
Ryan VanderMeulen
f497d31a0a Backout the bug 754202 backout due to orange. 2012-06-10 19:37:47 -04:00
Malini Das
b92a2b574b Bug 744902 - Add perf testing to Marionette, r=jgriffin, DONTBUILD because NPOTB 2012-06-08 18:33:54 -04:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Philipp von Weitershausen
8998e5052c Bug 754178 - Expose SpecialPowers in Marionette content JS. r=jgriffin 2012-05-18 13:30:13 -07:00
Philipp von Weitershausen
d34b2f9dc6 Bug 754178 - Expose SpecialPowers in Marionette chrome JS. r=jgriffin 2012-05-18 13:30:04 -07:00
Malini Das
a35fc1fad4 Bug 742947 - Integrate Selenium atoms, r=jgriffin 2012-04-10 17:28:08 -07:00
Joel Maher
7040eedb07 Bug 712643 - land Marionette on m-c. r=mossop,robcee 2012-03-22 11:19:57 -04:00