Commit Graph

24 Commits

Author SHA1 Message Date
Andreas Tolfsen
b7603848e6 Bug 1240576 - Use Preferences.jsm throughout Marionette; r=automatedtester
A distinct advantage is that try...catch statements are no longer used
to control the flow of code.
2016-01-18 22:05:30 +00:00
Wes Kocher
8577fb09b1 Backed out changeset f3011bfcf124 (bug 1240576) for b2g xpcshell failures CLOSED TREE 2016-01-19 18:26:54 -08:00
Andreas Tolfsen
a9216b89fc Bug 1240576 - Use Preferences.jsm throughout Marionette; r=automatedtester
A distinct advantage is that try...catch statements are no longer used
to control the flow of code.
2016-01-18 22:05:30 +00:00
Andreas Tolfsen
c727b67b98 Bug 1240182 - Use Log.Level.Debug for logging accepted and closed sockets; r=automatedtester 2016-01-18 19:09:31 +00:00
Nigel Babu
77ee33f307 Backed out changeset 8ca79644b089 (bug 1240182) for xpcshell bustage on b2g 2016-01-19 10:49:12 +05:30
Andreas Tolfsen
e009cbea38 Bug 1240182 - Use Log.Level.Debug for logging accepted and closed sockets; r=automatedtester 2016-01-18 19:09:31 +00:00
Andreas Tolfsen
c143de5656 Bug 1211489: Provide message sequencing in Marionette
Message sequencing allows Marionette to provide an asynchronous,
parallel pipelining user-facing interface, limit chances of payload
race conditions, and remove stylistic inconsistencies in how commands
and responses are dispatched internally.

Clients that deliver a blocking WebDriver interface are still be expected
to not send further command requests before the response from the last
command has come back, but if they still happen to do so because of
programming error or otherwise, no harm will be done.  This will guard
against bugs such as bug 1207125.

This patch formalises the command and response concepts, and applies
these concepts to emulator callbacks. Through the new message format,
Marionette is able to provide two-way parallel communication.  In other
words, the server will be able to instruct the client to perform a
command in a non ad-hoc way.

runEmulatorCmd and runEmulatorShell are both turned into command
instructions originating from the server.  This resolves a lot of
technical debt in the server code because they are no longer special-cased
to circumvent the dispatching technique used for all other commands;
commands may originate from either the client or the server providing
parallel pipelining enforced through message sequencing:

             client      server
               |            |
    msgid=1    |----------->|
               |  command   |
               |            |
    msgid=2    |<-----------|
               |  command   |
               |            |
    msgid=2    |----------->|
               |  response  |
               |            |
    msgid=1    |<-----------|
               |  response  |
               |            |

The protocol now consists of a "Command" message and the corresponding
"Response" message.  A "Response" message must always be sent in reply
to a "Command" message.

This bumps the Marionette protocol level to 3.

r=dburns
r=jgriffin
2015-09-26 17:12:01 +01:00
Sebastian Hengst
a23751d9c1 Backed out changeset c2aa06a2ab49 (bug 1211489) for Gij(39) failures. r=backout 2015-11-26 23:47:34 +01:00
Andreas Tolfsen
b5ea175897 Bug 1211489: Provide message sequencing in Marionette
Message sequencing allows Marionette to provide an asynchronous,
parallel pipelining user-facing interface, limit chances of payload
race conditions, and remove stylistic inconsistencies in how commands
and responses are dispatched internally.

Clients that deliver a blocking WebDriver interface are still be expected
to not send further command requests before the response from the last
command has come back, but if they still happen to do so because of
programming error or otherwise, no harm will be done.  This will guard
against bugs such as bug 1207125.

This patch formalises the command and response concepts, and applies
these concepts to emulator callbacks. Through the new message format,
Marionette is able to provide two-way parallel communication.  In other
words, the server will be able to instruct the client to perform a
command in a non ad-hoc way.

runEmulatorCmd and runEmulatorShell are both turned into command
instructions originating from the server.  This resolves a lot of
technical debt in the server code because they are no longer special-cased
to circumvent the dispatching technique used for all other commands;
commands may originate from either the client or the server providing
parallel pipelining enforced through message sequencing:

             client      server
               |            |
    msgid=1    |----------->|
               |  command   |
               |            |
    msgid=2    |<-----------|
               |  command   |
               |            |
    msgid=2    |----------->|
               |  response  |
               |            |
    msgid=1    |<-----------|
               |  response  |
               |            |

The protocol now consists of a "Command" message and the corresponding
"Response" message.  A "Response" message must always be sent in reply
to a "Command" message.

This bumps the Marionette protocol level to 3.

r=dburns
r=jgriffin
2015-09-26 17:12:01 +01:00
J. Ryan Stinnett
281c27c39b Bug 1203159 - Rewrite DevTools resource URLs. r=ochameau 2015-10-21 12:48:53 -05:00
Carsten "Tomcat" Book
d7f143eaad Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Sebastian Hengst
cd93f441eb Backed out changeset c6b267589d0d (bug 1202902) for Mulet Reftest, W3C Platform Test and other failures. r=backout a=backout on a CLOSED TREE 2015-10-07 13:36:26 +02:00
Carsten "Tomcat" Book
b9e5717f50 Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)
2015-10-07 12:13:45 +02:00
Shu-yu Guo
b5f316de44 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Shu-yu Guo
f0cdd04e91 Bug 1202902 - Fix the world. (r=ato for marionette, rs=Mossop for rest) 2015-10-06 14:00:30 -07:00
J. Ryan Stinnett
1fcbd86174 Bug 912121 - Rewrite require / import to match source tree. rs=devtools
In a following patch, all DevTools moz.build files will use DevToolsModules to
install JS modules at a path that corresponds directly to their source tree
location.  Here we rewrite all require and import calls to match the new
location that these files are installed to.
2015-09-21 12:04:18 -05:00
Shu-yu Guo
45211869c8 Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Jonathan Griffin
46f72e36a5 Bug 1149618 - Remove SpecialPowers from Marionette, r=dburns 2015-05-18 16:36:15 -07:00
Jonathan Griffin
c1efbce967 Backout cc15c275b1e3 (Bug 1149618) on a CLOSED TREE for suspected debug emulator bustage, a=bustage 2015-05-19 19:35:38 -07:00
Jonathan Griffin
831992c796 Bug 1149618 - Remove SpecialPowers from Marionette, r=dburns 2015-05-18 16:36:15 -07:00
Jonathan Griffin
ee3a23ffc4 Bug 1149347 - Don't initialize SpecialPowers unconditionally, r=ato 2015-03-31 09:44:02 -07:00
Andreas Tolfsen
7af4fbe519 Bug 1107706: Part 14: Fix quitApplication 2015-03-20 20:44:17 +00:00
Andreas Tolfsen
956a3dbd1c Bug 1107706: Part 12: Drop marionette-* prefix on files 2015-03-23 21:32:03 +00:00
Andreas Tolfsen
94e00faccb 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