Commit Graph

6787 Commits

Author SHA1 Message Date
Gregory Arndt
9e5e5a3c96 Bug 1142779 - Environment variables needed for automated testing on device. r=me a=config-only 2015-03-26 22:44:55 -05:00
Wes Kocher
5fda97fd8d Merge fx-team to m-c a=merge CLOSED TREE 2015-03-26 17:22:05 -07:00
Wes Kocher
28fd43f9a0 Merge b2g-inbound to m-c a=merge CLOSED TREE 2015-03-26 16:44:47 -07:00
Mike Shal
4b6143078e No bug - Bump mozharness.json to revision 9c18f2f9e0c0; r=jlund a=testing 2015-03-26 18:41:13 -04:00
Ryan VanderMeulen
65b8c960ef Merge mozilla-inbound to m-c. a=merge
CLOSED TREE
2015-03-26 14:43:39 -04:00
Andrew Halberstadt
75ca512b9a Bug 987360 - Fix b2g/android xpcshell bustage, r=bustage 2015-03-27 12:17:00 -04:00
Gregory Arndt
6c0ea29d07 Bug 1142779 - Incorrect test configuration for b2g-inbound flame-kk tests r=me a=config-only 2015-03-26 09:03:38 -05:00
Gregory Arndt
312649437f Bug 1142779 - Update job tasks to use new chunking logic r=lightsofapollo 2015-03-25 15:15:31 -05:00
James Graham
b3397efb33 Bug 1124091 - Try to make the CSP tests a bit more stable, r=Ms2ger
Increase the test timeout for some problematic tests. Ensure that the
report check returns early when a report is detected as expected.
2015-03-27 23:41:13 +00:00
Geoff Brown
c7b982abe7 Bug 1146574 - Update Android 4.3 configs for cppunit; r=dminor 2015-03-26 20:35:36 -06:00
Wes Kocher
dd8a8fcae7 Merge m-c to inbound a=merge CLOSED TREE 2015-03-26 17:46:35 -07:00
Mike Hommey
6ee628d425 Bug 1147283 - Replace mozpack.path with mozpath. r=mshal
Back when mozpack.path was added, it was used as:

  import mozpack.path
  mozpack.path.func()

Nowadays, the common idiom is:

  import mozpack.path as mozpath
  mozpath.func()

because it's shorter.

$ git grep mozpath\\. | wc -l
423
$ git grep mozpack.path\\. | wc -l
123

This change was done with:
$ git grep -l mozpack.path\\. | xargs sed -i 's/mozpack\.path\./mozpath./g'
$ git grep -l 'import mozpack.path$' | xargs sed -i 's/import mozpack.path$/\0 as mozpath/'
$ (pat='import mozpack.path as mozpath'; git grep -l "$pat" | xargs sed -i "1,/$pat/b;/$pat/d")
2015-03-27 08:13:16 +09:00
Mike Taylor
f20dfa5d73 Bug 1064083 - Update srcset web-platform expectations. r=jst 2015-03-27 00:04:00 -04:00
jlal@mozilla.com
67fcdcbd6a Bug 1140587 - Reduce pip warnings a=config-only r=me 2015-03-26 11:08:01 -07:00
Gregory Arndt
add1030b93 Bug 1142779 - Update job tasks to include functional unit and dual sim r=lightsofapollo 2015-03-13 17:09:01 -05:00
Gregory Arndt
fa0880df73 Bug 1142779 - Add buildbot steps for cloning and running tests r=lightsofapollo 2015-03-12 19:53:00 -05:00
Gregory Arndt
6f86baed1e Bug 1142779 - Enable testdroid devices to be used within test tasks r=lightsofapollo 2015-03-12 17:43:28 -05:00
jlal@mozilla.com
6cea95eed7 Bug 1147559 - Optimize mulet/b2g-desktop builds by using isolated worker types r=me a=config-only 2015-03-25 12:38:05 -07:00
jlal@mozilla.com
a2f4a46332 Bug 1147605 - Disable tests on phone builds r=me CLOSED TREE 2015-03-25 14:22:26 -07:00
Wes Kocher
af68e7704b Merge m-c to b2ginbound a=merge CLOSED TREE 2015-03-25 13:24:39 -07:00
jlal@mozilla.com
d9973f5f55 Bug 1147528 - Enable b2g-desktop on production treeherder r=kgrandon a=bustage CLOSED TREE 2015-03-25 12:15:16 -07:00
jlal@mozilla.com
da92b38959 Bug 1142113 - Enable mochitests for mulet by default r=me a=taskcluster-only 2015-03-25 09:49:20 -07:00
Wander Lairson Costa
9924659d55 Bug 1119387 part 5: Update docker images.
Update docker images to use taskcluster-vcs 2.3.4.
2015-03-25 14:25:27 -03:00
Wander Lairson Costa
80744b797c Bug 1119387 part 4: Validate only artifacts that can leak blobs.
With nightly builds, some artifacts may be made available for public
access.

We now validate only the image that contain the commercial binaries.
2015-03-25 14:25:27 -03:00
Wander Lairson Costa
de34310bc6 Bug 1119387 part 3: Add option to specify mozharness branch.
Allow the user to specify the mozharness branch to use
through the option --mozharness-ref.
2015-03-25 14:25:27 -03:00
Wander Lairson Costa
379c78a420 Bug 1119387 part 2: Add flame nightly build script.
This will build flame and upload the results to ftp, balrog and symbol
server.
2015-03-25 14:25:27 -03:00
Wander Lairson Costa
0c0f1d24f3 Bug 1119387 part 1: Move basic build setup to a separate script.
In order to avoid code duplication for additional builds, we move the
basic build setup to a common script.
2015-03-25 14:25:27 -03:00
Eddy Bruël
95d8938ff0 Bug 1141507 - Some preliminary refactors;r=jlong 2015-03-26 20:15:36 +01:00
Dave Townsend
1e80532d23 Bug 1144742: Unload the test module loader at the end of test runs to make leak detection easier. r=erikvold 2015-03-26 11:51:57 -07:00
John Schoenick
88b3ff855a Bug 1139554 - Fix srcset parser mishandling bare URLs followed by a comma. r=jst 2015-03-04 23:07:00 -05:00
Bill McCloskey
89f1e20315 Bug 1132072 - Tab switch refactoring (r=mconley) 2015-03-27 08:38:47 -07:00
Andrew Halberstadt
0094fdf983 Bug 987360 - Add ability to tag tests with arbitrary strings and run them, r=chmanchester
Add a `tags` attribute to a test or DEFAULT section in a manifest:

[test_foo]
tags = foo

Then run all tests with a given tag by passing in `--tag foo` to a supported test harness. So far mochitest, xpcshell and marionette are supported.
2015-03-19 16:15:33 -04:00
Ryan VanderMeulen
e55eb3d955 Backed out changeset a6b9c152a7d1 (bug 1140293) for mochitest failures.
CLOSED TREE
2015-03-25 08:42:46 -04:00
Dave Hunt
e670fee3f5 Bug 1140406 - [mozdevice] Allow connecting to a remote ADB server in adb.py. r=bclary 2015-03-25 12:25:44 +00:00
James Graham
fcad4482cc Bug 1092458 - Disable additional drawFocusIfNeeded test for instability on Windows 2015-03-25 11:42:15 +00:00
David Burns
f837bbe14d 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
4cb3ebb06a Bug 1143565: Bump marionette client to v 0.9.2; r=chmanchester 2015-03-24 21:31:46 +00:00
David Burns
4ef49f8770 Bug 1143565: Bump marionette driver to v 0.3.1; r=chmanchester 2015-03-24 21:31:33 +00:00
David Anderson
b745ff69a6 Fix some tests that depend on synchronous scrolling. (bug 1140293 part 1, r=masayuki,mstange,kgilbert) 2015-03-25 01:03:48 -07:00
Jonathan Griffin
5eb007c73d Bug 1121577 - Unset pref at delete_session, r=dburns 2015-03-18 10:07:57 -07:00
Ryan VanderMeulen
aa17f3167b 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
James Graham
8ebb6996ff Bug 1092458 - Disable drawFocusIfNeeded tests for instability on Windows, (CLOSED TREE) r=RyanVM 2015-03-24 17:42:41 +00:00
Shian-Yow Wu
f37c123bc0 Bug 1115495 - Part 2: PAC generator for browsing and system wide proxy. r=mcmanus, r=echen 2015-03-26 15:11:08 +08:00
Chris Peterson
e67a9d8945 Bug 1083499 - Replace JS1.7's nonstandard destructuring for…in loops in mochitest/server.js. r=jmaher 2015-03-23 20:37:47 -07:00
Ben Turner
54be8e1b34 Bug 1131776 - Use WITHOUT ROWID tables for IndexedDB, r=janv. 2015-02-16 09:48:14 -08:00
Vaibhav Agrawal
e4697b1920 Bug 1144573 - Cleanup after removing android*.json. r=ahal, r=jmaher
CLOSED TREE
2015-03-26 14:39:57 +08:00
Andreas Tolfsen
ba9767eee1 Bug 1107706: Part 16: Fix rebase of action chains for chrome space 2015-03-24 15:35:58 +00:00
Andreas Tolfsen
2e842f0f33 Bug 1107706: Part 15: Fix emulator callbacks for content process 2015-03-23 15:40:51 +00:00
Andreas Tolfsen
40da952834 Bug 1107706: Part 14: Fix quitApplication 2015-03-20 20:44:17 +00:00
Andreas Tolfsen
a3c22d4b07 Bug 1107706: Part 13: Style fixes
Linting; no functional changes.
2015-03-23 20:43:18 +00:00
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
da04fcbb9c 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
c10d422432 Bug 1107706: Part 9: Disable XUL component tests on B2G 2015-03-12 18:12:05 +00:00
Andreas Tolfsen
7b053a4df1 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
f047cd2ee4 Bug 1107706: Part 7: Add timeout test for async scripts 2015-02-26 17:41:54 +00:00
Andreas Tolfsen
9f56ef3fb8 Bug 1107706: Part 6: Make SpecialPowersError a prototypal Error
If special powers is imported using Components.utils.import on B2G which
has some special concepts around global scoping, a TypeError will be
raised unless the custom error is a prototypal Error.

An explanation can be found for a similar issue in bug 843892, which
states that toString is attached to the instances rather than the
prototype, and that this causes problems once the object goes through
Object.freeze.  It was patched in bug 1014484.

This patch also renames SpecialPowersException to SpecialPowersError.
2015-02-26 17:40:21 +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
Andreas Tolfsen
f0c2bf3bfe Bug 1107706: Part 1: Change context from strings to enum 2015-02-25 21:11:51 +00:00
Jonathan Griffin
75695e50c1 Bug 1147029 - Land luciddream in-tree, r=ted 2015-03-24 15:17:53 -07:00
Andreas Tolfsen
3ab360e04d Bug 1107706: Part 16: Fix rebase of action chains for chrome space 2015-03-24 15:35:58 +00:00
Andreas Tolfsen
701c39c21b Bug 1107706: Part 15: Fix emulator callbacks for content process 2015-03-23 15:40:51 +00:00
Andreas Tolfsen
ef06d52635 Bug 1107706: Part 14: Fix quitApplication 2015-03-20 20:44:17 +00:00
Andreas Tolfsen
7a7cf071d4 Bug 1107706: Part 13: Style fixes
Linting; no functional changes.
2015-03-23 20:43:18 +00:00
Andreas Tolfsen
edb6847dc3 Bug 1107706: Part 12: Drop marionette-* prefix on files 2015-03-23 21:32:03 +00:00
Andreas Tolfsen
90b586a8d7 Bug 1107706: Part 11: Global modal dialogue support 2015-03-20 15:46:46 +00:00
Andreas Tolfsen
84573a72d5 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
d4c4167105 Bug 1107706: Part 9: Disable XUL component tests on B2G 2015-03-12 18:12:05 +00:00
Andreas Tolfsen
c78fe53484 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
abeb0eef80 Bug 1107706: Part 7: Add timeout test for async scripts 2015-02-26 17:41:54 +00:00
Andreas Tolfsen
8ae37c031b Bug 1107706: Part 6: Make SpecialPowersError a prototypal Error
If special powers is imported using Components.utils.import on B2G which
has some special concepts around global scoping, a TypeError will be
raised unless the custom error is a prototypal Error.

An explanation can be found for a similar issue in bug 843892, which
states that toString is attached to the instances rather than the
prototype, and that this causes problems once the object goes through
Object.freeze.  It was patched in bug 1014484.

This patch also renames SpecialPowersException to SpecialPowersError.
2015-02-26 17:40:21 +00:00
Andreas Tolfsen
d13d607312 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
655ee4aa68 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
233f84d7a8 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
c92bfd11ea 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
3a54fed5ae Bug 1107706: Part 1: Change context from strings to enum 2015-02-25 21:11:51 +00:00
Chris Cooper
6977876a7f Bug 1146855 - Add cygwin dlls to manifest for minidump_stackwalk - r-ted 2015-03-24 11:46:30 -04:00
Mike Shal
bdd3d99afa Bug 1117960 - bump mozharness.json to rev 93f17b170f43; r=jlund 2015-03-23 09:42:38 -04:00
Giovanny Andres Gongora Granada
76240ff56b Bug 1118313 - newSession looks for non-conforming session_id property on Command. r=dburns 2015-03-23 19:56:00 -04: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
Wes Kocher
e748054f7f 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
258247b47c Backed out changeset 8673899b8229 (bug 1143565) 2015-03-23 18:35:46 -07:00
Andreas Tolfsen
5b451903dc Bug 1107706: Part 15: Fix emulator callbacks for content process 2015-03-23 15:40:51 +00:00
Andreas Tolfsen
013d39a671 Bug 1107706: Part 14: Fix quitApplication 2015-03-20 20:44:17 +00:00
Andreas Tolfsen
0d093569bf Bug 1107706: Part 13: Style fixes
Linting; no functional changes.
2015-03-23 20:43:18 +00: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
05887e4d25 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
31622f3939 Bug 1107706: Part 9: Disable XUL component tests on B2G 2015-03-12 18:12:05 +00:00
Andreas Tolfsen
8f2340370b 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
13f8a26edc Bug 1107706: Part 7: Add timeout test for async scripts 2015-02-26 17:41:54 +00:00
Andreas Tolfsen
8b1e3107f2 Bug 1107706: Part 6: Make SpecialPowersError a prototypal Error
If special powers is imported using Components.utils.import on B2G which
has some special concepts around global scoping, a TypeError will be
raised unless the custom error is a prototypal Error.

An explanation can be found for a similar issue in bug 843892, which
states that toString is attached to the instances rather than the
prototype, and that this causes problems once the object goes through
Object.freeze.  It was patched in bug 1014484.

This patch also renames SpecialPowersException to SpecialPowersError.
2015-02-26 17:40:21 +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
Andreas Tolfsen
4b8c7a459f Bug 1107706: Part 1: Change context from strings to enum 2015-02-25 21:11:51 +00:00