Commit Graph

1306 Commits

Author SHA1 Message Date
Jonathan Griffin
a779e43382 Bug 1149618 - Add a sandbox parameter to execute, r=dburns 2015-04-23 13:39:38 -07:00
Jonathan Griffin
9f386bdf5a Bug 1149618 - Implement push_permission in Marionette, r=dburns 2015-05-04 09:49:08 -07:00
Andreas Tolfsen
151b17a718 Bug 1060300: Match Marionette's navigation API docs to reality
r=dhunt
2015-05-04 11:25:03 +01:00
Andreas Tolfsen
56b13e8205 Bug 1155716: Part 2: Remove HTMLElement#submit from marionette-driver
Also bumps the marionette-driver version to 0.6 and removes submit tests.

r=dburns
2015-04-29 11:32:01 +01:00
Andreas Tolfsen
49ccec9ef2 Bug 1155716: Part 1: Remove submitElement from Marionette
r=dburns
2015-04-29 11:31:19 +01:00
Andreas Tolfsen
57652b6e6e Bug 1157255: Use typeof to determine MarionetteObj exports
This makes us not rely on try…catch logic to export MarionetteObj
properties and functions on the sandbox.

The patch also cleans up a few more details on
createExecuteContentSandbox.

r=dburns
2015-04-28 19:16:46 +01:00
Armen Zambrano Gasparnian
55b2e8e548 Bug 1159816 - Bump marionette_client to 0.12. DONTBUILD. CLOSED TREE. r=chmanchester 2015-04-29 16:35:33 -04:00
Andreas Tolfsen
bc233731f1 Bug 1157259: Correct ScriptTimeoutError reference in listener
r=dburns
2015-04-28 18:59:07 +01:00
Andreas Tolfsen
748892c75e Bug 1157266: Fix error unable to set cookie in listener
r=dburns
2015-04-28 18:53:51 +01:00
Andreas Tolfsen
d27da8cbe8 Bug 1159232: Avoid use of template string in GeckoDriver#sendAsync
Also avoids it in GeckoDriver#execute.

r=dburns
2015-04-28 14:34:55 +01:00
Andreas Tolfsen
3337bfb2a9 Bug 1159238. Generate UUID internally to ContentSender
r=dburns
2015-04-28 18:15:08 +01:00
Andreas Tolfsen
d0288d07e7 Bug 1159219: Make ContentSender a separate module
r=dburns
2015-04-28 14:25:37 +01:00
Andreas Tolfsen
0d7047e4e4 Bug 1157257: Include error's name if it's not a WebDriver error
When native JavaScript errors are thrown because of internal errors,
this will include the Error prototype's name in the message.

This is useful since the WebDriver protocol doesn't allow for arbitrary
JS error marshaling.

r=chmanchester
2015-04-23 14:34:40 +01:00
Andreas Tolfsen
8df30250a2 Bug 1157253: Port ListenerProxy to use Proxy instead of __noSuchMethod__
r=chmanchester
2015-04-23 16:59:12 +01:00
Andreas Tolfsen
549ae8a536 Bug 1158219: Don't set `id' field if undefined when switching frame
When the `frame' argument is None, which it is by default, we were setting
the `id' field of the packet regardless.  This only works because of a
faulty == operator comparison in the server.

r=jgriffin
2015-04-24 17:55:22 +01:00
Andreas Tolfsen
4e7a9a0a83 Bug 1157258: Fix null type comparisons in driver.js
r=davehunt
2015-04-24 13:55:52 +01:00
Chris Manchester
a6f2432e38 Bug 1157725 - Rewrite test_mouse_action.py to be more robust. r=ato 2015-04-23 22:17:30 -07:00
Andreas Tolfsen
89bd95d8ae Bug 1158113: Removing two straggling error codes from Marionette
r=davehunt
2015-04-24 12:06:43 +01:00
Andreas Tolfsen
9537715638 Bug 1155658: Rename "illegal argument" error to "invalid argument"
r=chmanchester
2015-04-17 18:43:05 +01:00
Andreas Tolfsen
863a2970f8 Bug 1157665: Add mozrunner dependency to marionette_driver
Also bumps the version to 0.5.

r=davehunt
2015-04-23 13:11:31 +01:00
Chris Manchester
5fdce942ec Bug 1157823 - Update dependency to reflect that the marionette client requires a more recent mozhttpd. r=ato 2015-04-23 11:08:34 -07:00
Chris Manchester
7802afa94b Bug 1157261 - Fix typo in reference to curFrame in marionette listener. r=ato 2015-04-22 10:22:26 -07:00
Andreas Tolfsen
b7da86f48a Bug 1154525: Make HTMLElement#location and #size use #rect internally
getElementSize and getElementLocation are getting removed from the
Marionette server (bug 1153911) and this is in preparation for that.

Fortunately getElementRect is backwards compatible and we can extract
the properties we need from that dictionary.

r=chmanchester
2015-04-17 17:02:14 +01:00
Andreas Tolfsen
53552389c1 Bug 945729: Replace error number codes with strings
Brings Marionette closer to compliance with the W3C WebDriver standard
which prescribes that errors should be identified by a string rather
than a magic number.

r=dburns
2015-04-08 19:02:34 +01:00
Andreas Tolfsen
6c95467af0 Bug 1152682: Correct invalid selector errors in elements.js
r=jgriffin
2015-04-20 13:45:59 +01:00
Andreas Tolfsen
b84d199405 Bug 1154757: Correct unable to set cookie error
r=dburns
2015-04-20 13:53:51 +01:00
Andreas Tolfsen
2ce5b5d5ae Bug 1154681: Use static lookups in errors.py
r=jgraham
2015-04-21 12:26:39 +01:00
Carsten "Tomcat" Book
b741df7041 Backed out changeset 9947bd361636 (bug 945729) for wpt test failures 2015-04-21 16:01:40 +02:00
Chris Manchester
9e1adeaf61 Bug 1083131 - Always remove a profile created by marionette when the runner shuts down. r=ato 2015-04-16 18:04:24 -07:00
Andreas Tolfsen
3fdf2dbfb3 Bug 945729: Replace error number codes with strings
Brings Marionette closer to compliance with the W3C WebDriver standard
which prescribes that errors should be identified by a string rather
than a magic number.

r=dburns
2015-04-08 19:02:34 +01:00
Andreas Tolfsen
425a524144 Bug 1154691: Align Marionette with WebDriver errors
Adds `invalid selector' and `invalid session id' errors to the server,
and aligns the exceptions in the Python client with those in the server.

Some of the exceptions are not in use yet and consequently do not carry
a `code` property.  This is fine because it makes us future-proof when
the server starts using them.

r=dburns
2015-04-15 13:38:01 +01:00
Andreas Tolfsen
6a44259ba9 Bug 1153832: New dispatch style framework in Marionette listener
Takes advantage of the new dispatching technique introduced in bug
1107706 on the content side.

The patch introduces the framework to write simpler command handlers
in content space, but does not convert all commands in listener.js to
use this.  This can be done gradually, as both techniques are still
compatible.

r=dburns
2015-04-15 12:18:00 +01:00
Andreas Tolfsen
7a653b24be Bug 1155260: Fix base URL override in Marionette runner
Fixes regression from bug 941085, and bumps marionette_client to 0.11.

r=davehunt
2015-04-20 11:22:00 +01:00
Carsten "Tomcat" Book
29b4e6b4be Backed out changeset 0b28f5ff48a6 (bug 1153832) for suspicion of making dt Asan test fail frequent/permanently 2015-04-20 14:37:12 +02:00
Carsten "Tomcat" Book
13be452edd Backed out changeset 330f6df11b2f (bug 1154691) 2015-04-20 14:36:17 +02:00
Andreas Tolfsen
66edfde42f Bug 1154691: Align Marionette with WebDriver errors
Adds `invalid selector' and `invalid session id' errors to the server,
and aligns the exceptions in the Python client with those in the server.

Some of the exceptions are not in use yet and consequently do not carry
a `code` property.  This is fine because it makes us future-proof when
the server starts using them.

r=dburns
2015-04-15 13:38:01 +01:00
Ryan VanderMeulen
f4b44516a7 Backed out changeset c7eea3e8f98a (bug 1154691) for Windows w-p-t failures.
CLOSED TREE
2015-04-17 17:55:08 -04:00
Andreas Tolfsen
98b5837502 Bug 1154691: Align Marionette with WebDriver errors
Adds `invalid selector' and `invalid session id' errors to the server,
and aligns the exceptions in the Python client with those in the server.

Some of the exceptions are not in use yet and consequently do not carry
a `code` property.  This is fine because it makes us future-proof when
the server starts using them.

r=dburns
2015-04-15 13:38:01 +01:00
Andreas Tolfsen
28dae81171 Bug 1153832: New dispatch style framework in Marionette listener
Takes advantage of the new dispatching technique introduced in bug
1107706 on the content side.

The patch introduces the framework to write simpler command handlers
in content space, but does not convert all commands in listener.js to
use this.  This can be done gradually, as both techniques are still
compatible.

r=dburns
2015-04-15 12:18:00 +01:00
Ryan VanderMeulen
b194af2156 Backed out changeset 5c83a36d9eba (bug 1153832) for Gip(a) failures.
CLOSED TREE
2015-04-16 12:20:48 -04:00
Andreas Tolfsen
a73b52ebf9 Bug 1153832: New dispatch style framework in Marionette listener
Takes advantage of the new dispatching technique introduced in bug
1107706 on the content side.

The patch introduces the framework to write simpler command handlers
in content space, but does not convert all commands in listener.js to
use this.  This can be done gradually, as both techniques are still
compatible.

r=dburns
2015-04-15 12:18:00 +01:00
Carsten "Tomcat" Book
a39954a551 Backed out changeset cc8eb386f147 (bug 1154691) for b2g test bustage on a CLOSED TREE 2015-04-16 13:47:51 +02:00
Andreas Tolfsen
ceb18d3d01 Bug 1154691: Align Marionette with WebDriver errors
Adds `invalid selector' and `invalid session id' errors to the server,
and aligns the exceptions in the Python client with those in the server.

Some of the exceptions are not in use yet and consequently do not carry
a `code` property.  This is fine because it makes us future-proof when
the server starts using them.

r=dburns
2015-04-15 13:38:01 +01:00
Ryan VanderMeulen
9d62ad9368 Backed out changeset 043a824dd7b7 (bug 1153832) for mass Mn failure.
CLOSED TREE
2015-04-15 12:58:51 -04:00
Andreas Tolfsen
09d9d76c64 Bug 1153832: New dispatch style framework in Marionette listener
Takes advantage of the new dispatching technique introduced in bug
1107706 on the content side.

The patch introduces the framework to write simpler command handlers
in content space, but does not convert all commands in listener.js to
use this.  This can be done gradually, as both techniques are still
compatible.

r=dburns
2015-04-15 12:18:00 +01:00
Dave Hunt
1154163aa9 Bug 1153795 - Bump marionette_driver to 0.4 and marionette_client to 0.10. r=atolfsen 2015-04-13 15:35:15 +01:00
Andreas Tolfsen
12d9563d64 Bug 984921: Clean up Marionette navigation tests
Cleans up navigation tests to use assertion routines that give us better
feedback if tests were to fail.

Also adds a test for setting location through executeScript, and a test
for getCurrentUrl returning the URL of the top-level browsing context
when inside an iframe.

r=dburns
2015-04-11 17:56:53 +01:00
Andreas Tolfsen
1ec5d87931 Bug 1153240: Fix variable assignment of value in GeckoDriver#multiAction
Bug 1150041 inadvertently fixed a closely related issue.

r=njpark
2015-04-10 15:09:25 +01:00
Andreas Tolfsen
9e9bf1cd54 Bug 941085: File uploads support in Marionette
Adds support for W3C WebDriver compatible file uploads, where additional
calls to sendKeys on <input type=file multiple> will append files,
rather than reset the field.

r=dburns
2015-04-02 15:16:00 +01:00
Ryan VanderMeulen
ae63dabf53 Merge fx-team to m-c. a=merge 2015-04-09 22:57:56 -04:00
Chris Manchester
5b2fc91ba1 Bug 1149843 - Modify test_window_handles not to hit the network. r=dburns 2015-04-02 14:56:00 -07:00
Andreas Tolfsen
01c1ab537e Bug 1152425: Fix unicode string lookup in Marionette client
r=jgraham
2015-04-08 18:39:53 +01:00
Ryan VanderMeulen
605fc7c163 Merge m-c to b2g-inbound. a=merge 2015-04-09 12:08:54 -04:00
Thomas Zimmermann
90dc6d375b Bug 1146355: Move Bluetooth legacy interface into sub-directory bluetooth1/, r=joliu 2015-04-09 15:57:40 +02:00
Chris Manchester
b1582c251f Bug 1150170 - Avoid toSource and string templates when logging requests and responses in marionette to avoid high memory use. r=ato
CLOSED TREE
2015-04-07 10:24:09 -07:00
Andreas Tolfsen
e26f263017 Bug 1150522: Add WebDriver string statuses to Marionette client
Adds string based statuses as defined by the W3C WebDriver protocol
to the Marionette Python client.  Importantly, it does not remove the
ability to look up errors by their Selenium protocol number for backwards
compatibility reasons.

r=dburns
2015-04-02 20:07:20 +01:00
Ryan VanderMeulen
0e2884a524 Backed out changeset 93166201fca0 (bug 941085) for Gip failures.
CLOSED TREE
2015-04-02 12:05:56 -04:00
Andreas Tolfsen
d972152e6f Bug 941085: File uploads support in Marionette
Adds support for W3C WebDriver compatible file uploads, where additional
calls to sendKeys on <input type=file multiple> will append files,
rather than reset the field.

r=dburns
2015-04-02 15:16:00 +01:00
Andreas Tolfsen
3980a33e94 Backed out changeset 0115bb737f64 (bug 941085)
Rebase went wrong.
2015-04-02 15:04:58 +01:00
Andreas Tolfsen
b61ef00e83 Bug 941085: File uploads support in Marionette
Adds support for W3C WebDriver compatible file uploads, where additional
calls to sendKeys on <input type=file multiple> will append files,
rather than reset the field.

r=dburns
2015-03-31 16:45:27 +01:00
David Burns
e4c93e63a8 Bug 1082773: Disable Marionette Chrome Tests on B2G; r=me 2015-04-02 14:44:17 +01:00
Eric Rahm
34d7a9d2f5 Bug 1150247 - Check if value is function before binding. r=ato
Rather than attempting to bind non-functions and catching the exception this
explicitly checks if it is a function. This helps reduce memory consumption
needed for the exception stack traces. Realistically that will go away when GC
is run, but it throws off memory measurments prior to that.
2015-04-01 18:58:21 -07:00
Andrew Halberstadt
ce3d9d78f3 Bug 1150050 - Bump manifestparser to v1.1 and marionette-client to v0.9.3 to pick up tagging feature, r=AutomatedTester 2015-04-01 11:22:48 -04:00
Andreas Tolfsen
4ce24cc147 Bug 1150041: Fix max_len extraction in GeckoDriver#multiAction
Fixes use of pinch() routine in gestures.py as part of Gaia UI tests.
Regressed as part of bug 1107706.

r=dburns
2015-04-01 16:17:05 +01:00
Andreas Tolfsen
588f110218 Bug 1149625: Order errors by name rather that status code
This patch has no functional changes, apart from correctly naming
InvalidElementStateError and exporting it.  It's not currently in use.

r=dburns
2015-03-31 18:00:32 +01:00
Boris Kudryavtsev
9e2aa5f382 Bug 1139158 - Actions made availabe via marionette_driver object. r=jgriffin 2015-03-30 16:57:00 -04:00
Jonathan Griffin
ee3a23ffc4 Bug 1149347 - Don't initialize SpecialPowers unconditionally, r=ato 2015-03-31 09:44:02 -07:00
Carsten "Tomcat" Book
889e5d30e1 merge mozilla-inbound to mozilla-central a=merge 2015-03-31 14:43:50 +02:00
J. Ryan Stinnett
25bdf137f9 Bug 1138591 - Remove the chrome-enabled pref. r=past 2015-03-28 03:42:33 -05:00
Andrew Halberstadt
be7dbc01a9 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
97dfa3b8cd Backed out changesets acbab9e22691 and 3c34fd480729 (bug 987360) for Android/B2G xpcshell bustage.
CLOSED TREE
2015-03-27 13:12:19 -04:00
Andrew Halberstadt
c14b32c6f1 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
Andreas Tolfsen
c766020a8d Bug 1107706: Part 16: Fix rebase of action chains for chrome space 2015-03-24 15:35:58 +00:00
Andreas Tolfsen
7b1907f4e4 Bug 1107706: Part 15: Fix emulator callbacks for content process 2015-03-23 15:40:51 +00:00
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