Commit Graph

1182 Commits

Author SHA1 Message Date
Andreas Tolfsen
7af4fbe519 Bug 1107706: Part 14: Fix quitApplication 2015-03-20 20:44:17 +00:00
Andreas Tolfsen
c94b7ce173 Bug 1107706: Part 13: Style fixes
Linting; no functional changes.
2015-03-23 20:43:18 +00:00
Andreas Tolfsen
956a3dbd1c Bug 1107706: Part 12: Drop marionette-* prefix on files 2015-03-23 21:32:03 +00:00
Andreas Tolfsen
72a75e297d Bug 1107706: Part 11: Global modal dialogue support 2015-03-20 15:46:46 +00:00
Andreas Tolfsen
4983dd91c2 Bug 1107706: Part 10: Disable test_anonymous_content.py on B2G
It uses chrome context to test XUL related functionality that is not
necessary nor desirable to run on B2G.
2015-03-11 17:10:18 +00:00
Andreas Tolfsen
065eff0695 Bug 1107706: Part 9: Disable XUL component tests on B2G 2015-03-12 18:12:05 +00:00
Andreas Tolfsen
59e69e98e7 Bug 1107706: Part 8: Adapt emulator callbacks
Emulator callbacks are now created dynamically upon request, and uses
a nicer data structure in chrome context.  Each emulator callback is
encapsulated in EmulatorCallback, and stored on Emulator.

Emulator is stored on Dispatcher (as opposed to in marionette-server.js)
which bypasses some of the problems with circumventing the Marionette
protocol in GeckoDriver because of CommandProcessor.

Emulator callbacks to the client should be considered transparent, hence
they do not use the ListenerProxy.  They are explicitly meant _not_
to be blocking.
2015-03-17 16:10:58 +00:00
Andreas Tolfsen
fb915d1273 Bug 1107706: Part 7: Add timeout test for async scripts 2015-02-26 17:41:54 +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
Andreas Tolfsen
6b868b54df 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
e5d5fac47f 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
36a74fc77e 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
Andreas Tolfsen
425ad63aa9 Bug 1107706: Part 1: Change context from strings to enum 2015-02-25 21:11:51 +00:00
David Burns
9076670d74 Bug 1143565: Change requirements to not be fixed to a specific marionette transport and driver; r=chmanchester 2015-03-24 21:31:59 +00:00
David Burns
7398d9633a Bug 1143565: Bump marionette client to v 0.9.2; r=chmanchester 2015-03-24 21:31:46 +00:00
David Burns
f0a2312c96 Bug 1143565: Bump marionette driver to v 0.3.1; r=chmanchester 2015-03-24 21:31:33 +00:00
Jonathan Griffin
bc5492796a Bug 1121577 - Unset pref at delete_session, r=dburns 2015-03-18 10:07:57 -07:00
Ryan VanderMeulen
a98ef87380 Backed out 16 changesets (bug 1107706) for Gaia JS integration test failures.
Backed out changeset d026794b4c0b (bug 1107706)
Backed out changeset bb481b2d170a (bug 1107706)
Backed out changeset 71eba829a8b4 (bug 1107706)
Backed out changeset 3ca5a996676e (bug 1107706)
Backed out changeset 18c48c6a0cd5 (bug 1107706)
Backed out changeset 5dce917aeb92 (bug 1107706)
Backed out changeset 933d7aa1c709 (bug 1107706)
Backed out changeset 0c6e1484ae7a (bug 1107706)
Backed out changeset 9972f443d70e (bug 1107706)
Backed out changeset 20f9b7b24fc5 (bug 1107706)
Backed out changeset 1f4ba5b0fc4f (bug 1107706)
Backed out changeset a4a8e755d815 (bug 1107706)
Backed out changeset 593a7917f917 (bug 1107706)
Backed out changeset 502320aec21f (bug 1107706)
Backed out changeset 60b58aed6d27 (bug 1107706)
Backed out changeset c8315bbbc104 (bug 1107706)

CLOSED TREE
2015-03-24 13:54:55 -04:00
Andreas Tolfsen
8bf9484117 Bug 1107706: Part 16: Fix rebase of action chains for chrome space 2015-03-24 15:35:58 +00:00
Andreas Tolfsen
fe68ae5dea Bug 1107706: Part 15: Fix emulator callbacks for content process 2015-03-23 15:40:51 +00:00
Andreas Tolfsen
b754e701de Bug 1107706: Part 14: Fix quitApplication 2015-03-20 20:44:17 +00:00
Andreas Tolfsen
06ee509588 Bug 1107706: Part 13: Style fixes
Linting; no functional changes.
2015-03-23 20:43:18 +00:00
Andreas Tolfsen
d12fa68d8f Bug 1107706: Part 12: Drop marionette-* prefix on files 2015-03-23 21:32:03 +00:00
Andreas Tolfsen
de8dfb835a Bug 1107706: Part 11: Global modal dialogue support 2015-03-20 15:46:46 +00:00
Andreas Tolfsen
7ee80928f6 Bug 1107706: Part 10: Disable test_anonymous_content.py on B2G
It uses chrome context to test XUL related functionality that is not
necessary nor desirable to run on B2G.
2015-03-11 17:10:18 +00:00
Andreas Tolfsen
c33674b8d3 Bug 1107706: Part 9: Disable XUL component tests on B2G 2015-03-12 18:12:05 +00:00
Andreas Tolfsen
0e2f927b7b Bug 1107706: Part 8: Adapt emulator callbacks
Emulator callbacks are now created dynamically upon request, and uses
a nicer data structure in chrome context.  Each emulator callback is
encapsulated in EmulatorCallback, and stored on Emulator.

Emulator is stored on Dispatcher (as opposed to in marionette-server.js)
which bypasses some of the problems with circumventing the Marionette
protocol in GeckoDriver because of CommandProcessor.

Emulator callbacks to the client should be considered transparent, hence
they do not use the ListenerProxy.  They are explicitly meant _not_
to be blocking.
2015-03-17 16:10:58 +00:00
Andreas Tolfsen
b96fdee2d3 Bug 1107706: Part 7: Add timeout test for async scripts 2015-02-26 17:41:54 +00:00
Andreas Tolfsen
612a488697 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
4ad54d8567 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
e28cf6eedb 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
45f7ea8898 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
Andreas Tolfsen
ae957e985e Bug 1107706: Part 1: Change context from strings to enum 2015-02-25 21:11:51 +00:00
Giovanny Andres Gongora Granada
13aaa0e1c7 Bug 1118313 - newSession looks for non-conforming session_id property on Command. r=dburns 2015-03-23 19:56:00 -04:00
Wes Kocher
9359b09a77 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
Wes Kocher
cb5648ba2c Backed out changeset 3f4f37b1b910 (bug 1143565) for web platform test failures due to pypi download errors CLOSED TREE 2015-03-23 18:36:15 -07:00
Wes Kocher
4db9767616 Backed out changeset 8673899b8229 (bug 1143565) 2015-03-23 18:35:46 -07:00
Andreas Tolfsen
04f42875fc Bug 1107706: Part 15: Fix emulator callbacks for content process 2015-03-23 15:40:51 +00:00
Andreas Tolfsen
b0692bd995 Bug 1107706: Part 14: Fix quitApplication 2015-03-20 20:44:17 +00:00
Andreas Tolfsen
7f29c2edbd Bug 1107706: Part 13: Style fixes
Linting; no functional changes.
2015-03-23 20:43:18 +00:00
Andreas Tolfsen
b1b972fa94 Bug 1107706: Part 12: Drop marionette-* prefix on files 2015-03-23 21:32:03 +00:00
Andreas Tolfsen
e3da054553 Bug 1107706: Part 11: Global modal dialogue support 2015-03-20 15:46:46 +00:00
Andreas Tolfsen
18f01362a5 Bug 1107706: Part 10: Disable test_anonymous_content.py on B2G
It uses chrome context to test XUL related functionality that is not
necessary nor desirable to run on B2G.
2015-03-11 17:10:18 +00:00
Andreas Tolfsen
d44d656ddf Bug 1107706: Part 9: Disable XUL component tests on B2G 2015-03-12 18:12:05 +00:00
Andreas Tolfsen
f73350a73c Bug 1107706: Part 8: Adapt emulator callbacks
Emulator callbacks are now created dynamically upon request, and uses
a nicer data structure in chrome context.  Each emulator callback is
encapsulated in EmulatorCallback, and stored on Emulator.

Emulator is stored on Dispatcher (as opposed to in marionette-server.js)
which bypasses some of the problems with circumventing the Marionette
protocol in GeckoDriver because of CommandProcessor.

Emulator callbacks to the client should be considered transparent, hence
they do not use the ListenerProxy.  They are explicitly meant _not_
to be blocking.
2015-03-17 16:10:58 +00:00
Andreas Tolfsen
fd9b8256c3 Bug 1107706: Part 7: Add timeout test for async scripts 2015-02-26 17:41:54 +00:00
Andreas Tolfsen
436bd6d84a 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
e96a09ec31 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
9712ea8319 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
633262693f 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