Граф коммитов

237 Коммитов

Автор SHA1 Сообщение Дата
Andreas Tolfsen 54c2f296a7 Bug 1376128 - Use selective imports from error module; r=automatedtester
Instead of importing everything from the testing/marionette/error.js
module into the global scope, we need to be selective about what symbols
we want.

MozReview-Commit-ID: HZDAS0bs0GD

--HG--
extra : rebase_source : 14a300bb2cedc0716168d50846755a6faed83012
2017-06-28 11:01:49 -07:00
Henrik Skupin a4b02086a1 Bug 1223277 - Reorder global JS module imports in listener.js. r=ato
Reorder imports so that global ones are done before local imports.

MozReview-Commit-ID: 7xA9XQlxlj4

--HG--
extra : rebase_source : b144401c5c6c47e87beab669f76f2b61fb79e5b6
2017-05-24 21:44:04 +02:00
Henrik Skupin 3b32d01243 Bug 1223277 - Log outer window id of the content window when framescript is registered. r=ato
It will help a lot for debugging when the outer window id of the
content window gets logged when the frame script gets registered.

MozReview-Commit-ID: D64A1nPEs6l

--HG--
extra : rebase_source : 0e592e10cb1a0979f4331b92dbfcfc905e737120
2017-05-19 11:16:38 +02:00
James Graham 5fd8e99e6a Bug 1363428 - Add reftest-specific endpoints to Marionette, r=ato
This adds commands to start a reftest session, run a test, and end the
session. It as assumed that after you start a reftest session you will
just run reftests until you end the session. When starting a session
the user provides a string indicating when screenshots should be
taken, and an object mapping urls to a count of the number of times
that url is expected to be used in the session, to help with
caching. Running the tests takes a url to a test, an expected status,
a timeout, and a nested list of possible references, in which each
entry at a specific level is combined by OR and nested references are
combined by AND.

The implementation is heavilly inspired by the existing reftest
harness, starting a minimal window with no tabs, and loading the urls
directly in there. In order to get a screenshot in the e10s case we
have to pass the DRAW_VIEW and USE_WIDGET_LAYERS flags when taking the
screenshot.

For performance we heavily cache canvases; for references that will be
repeated we cache the full canvas with image, and we also cache a
single canvas to use for all other screenshots to avoid the overhead
of repeatedly creating a new canvas element.

MozReview-Commit-ID: JOFvtmH7tg
2017-06-24 12:03:11 +01:00
Wes Kocher ea40157e54 Backed out 16 changesets (bug 1363428) for Wr failures a=backout CLOSED TREE
Backed out changeset e86d6d5c2a25 (bug 1363428)
Backed out changeset a0687a63e7b9 (bug 1363428)
Backed out changeset 858dc97498c7 (bug 1363428)
Backed out changeset 582a8dce7932 (bug 1363428)
Backed out changeset 26ae2fd48587 (bug 1363428)
Backed out changeset 7fa8e20fe001 (bug 1363428)
Backed out changeset 829c13a75667 (bug 1363428)
Backed out changeset a94d2c400b04 (bug 1363428)
Backed out changeset ec4a6b343b37 (bug 1363428)
Backed out changeset c27b94038e71 (bug 1363428)
Backed out changeset d1c03b96d270 (bug 1363428)
Backed out changeset 60c1c95b46ca (bug 1363428)
Backed out changeset b0604d88973f (bug 1363428)
Backed out changeset f0b218979773 (bug 1363428)
Backed out changeset 1d359561373c (bug 1363428)
Backed out changeset 956d6c0a646e (bug 1363428)

MozReview-Commit-ID: K8EBA8ACZLC
2017-06-23 14:13:27 -07:00
James Graham c9e960f859 Bug 1363428 - Add reftest-specific endpoints to Marionette, r=ato
This adds commands to start a reftest session, run a test, and end the
session. It as assumed that after you start a reftest session you will
just run reftests until you end the session. When starting a session
the user provides a string indicating when screenshots should be
taken, and an object mapping urls to a count of the number of times
that url is expected to be used in the session, to help with
caching. Running the tests takes a url to a test, an expected status,
a timeout, and a nested list of possible references, in which each
entry at a specific level is combined by OR and nested references are
combined by AND.

The implementation is heavilly inspired by the existing reftest
harness, starting a minimal window with no tabs, and loading the urls
directly in there. In order to get a screenshot in the e10s case we
have to pass the DRAW_VIEW and USE_WIDGET_LAYERS flags when taking the
screenshot.

For performance we heavily cache canvases; for references that will be
repeated we cache the full canvas with image, and we also cache a
single canvas to use for all other screenshots to avoid the overhead
of repeatedly creating a new canvas element.

MozReview-Commit-ID: JOFvtmH7tg

--HG--
extra : rebase_source : ab5a2ef2e450b9bbdc6bc3c9487ed5dfda2c1d4b
2017-05-10 10:51:10 +01:00
Ryan VanderMeulen dacc2546ba Backed out 6 changesets (bug 1223277) for causing Marionette test regressions.
Backed out changeset 85c86dc86122 (bug 1223277)
Backed out changeset aacd8d27b192 (bug 1223277)
Backed out changeset e6921a7229a3 (bug 1223277)
Backed out changeset b9f95fc81d23 (bug 1223277)
Backed out changeset 547744157e2a (bug 1223277)
Backed out changeset afbaa1138de3 (bug 1223277)
2017-06-23 12:15:23 -04:00
Henrik Skupin 7a2a397654 Bug 1223277 - Reorder global JS module imports in listener.js. r=ato
Reorder imports so that global ones are done before local imports.

MozReview-Commit-ID: 7xA9XQlxlj4

--HG--
extra : rebase_source : b144401c5c6c47e87beab669f76f2b61fb79e5b6
2017-05-24 21:44:04 +02:00
Henrik Skupin 29b61fdb0c Bug 1223277 - Log outer window id of the content window when framescript is registered. r=ato
It will help a lot for debugging when the outer window id of the
content window gets logged when the frame script gets registered.

MozReview-Commit-ID: D64A1nPEs6l

--HG--
extra : rebase_source : 0e592e10cb1a0979f4331b92dbfcfc905e737120
2017-05-19 11:16:38 +02:00
Andreas Tolfsen b51e4887c3 Bug 1371733 - Move cookie service to chrome space; r=whimboo
The cookie service relies on the current document's
domain which is accessible from chrome space through
this.curBrowser.contentBrowser.contentURI.host.

As it is implemented currently, Marionette's cookie service jumps
between chrome- and content space more than necessary.  This incurs
significant serialisation and IPC overhead, considering that the domain,
hostname, and current path information is readily available in chrome
space.

This patch removes all cookie-related functionality from
testing/marionette/listener.js, and implements a pure chrome-only
version of the service.  It does, however, not try to fix conformance
issues with the WebDriver specification, of which there are many.

Some of the algorithms, especially to do with iteration over cookies,
implemented in cookie.iter, is also highly suboptimal.  I have not
fundamentally changed any algorithms, and so my recommendation is to
address this later when addressing potential conformance bugs.

MozReview-Commit-ID: Fgs8ocbDJxb

--HG--
extra : rebase_source : 16470d5341459e40b1ceed12728451d517bbc490
2017-06-12 18:05:22 +01:00
Andreas Tolfsen d69ce374f7 Bug 1371733 - Singularise cookie module name; r=whimboo
Marionette uses singular module names.  Make the cookie module
fall in line by renaming it from testing/marionette/cookies.js to
testing/marionette/cookie.js.

MozReview-Commit-ID: H4jyvI3lFxz

--HG--
rename : testing/marionette/cookies.js => testing/marionette/cookie.js
extra : rebase_source : 6da48d3d9215de34ccb97823c0430766538fb45f
2017-06-09 18:06:51 +01:00
Phil Ringnalda 1d977147a3 Backed out 3 changesets (bug 1372595) for build bustage everywhere except Linux32 and OS X
CLOSED TREE

Backed out changeset 6d9081d16588 (bug 1372595)
Backed out changeset 65c71d2ef601 (bug 1372595)
Backed out changeset 5cbd77708cd9 (bug 1372595)

MozReview-Commit-ID: KXCLB1Rt0KN
2017-06-22 19:23:30 -07:00
Andreas Tolfsen a1145f3db2 Bug 1372595 - Return cookie expiry timestamp; r=whimboo
The expires property on nsICookie2 does not exist and we are
consequently returning it as undefined, which gets omitted in the JSON
serialisation to the client.

This patch changes it to return the correct property so that the expiry
property is returned as part of the serialised cookie.

MozReview-Commit-ID: IIjf4NWnUoQ

--HG--
extra : rebase_source : 5e2dc27fb550a010dcbe40eee49d9ae31244d749
2017-06-16 16:41:59 +01:00
Andreas Tolfsen 912429a173 Bug 1370863 - Remove log and getLogs commands from Marionette; r=automatedtester
MozReview-Commit-ID: HFZfJGwSqyT

--HG--
extra : rebase_source : 689dc42349854ad7ba6c717263dbb2c1260c7ae1
2017-06-07 14:17:41 +01:00
Wes Kocher 8b6a6ce487 Backed out 5 changesets (bug 1370863) for marionette test failures a=backout CLOSED TREE
Backed out changeset e4605e515ffd (bug 1370863)
Backed out changeset 986d20fecd11 (bug 1370863)
Backed out changeset b0a081dfd577 (bug 1370863)
Backed out changeset bb80abe6a298 (bug 1370863)
Backed out changeset 90b14cb85f51 (bug 1370863)

MozReview-Commit-ID: chPvs0RWbK
2017-06-12 17:18:38 -07:00
Andreas Tolfsen f2225720a9 Bug 1370863 - Remove log and getLogs commands from Marionette; r=automatedtester
MozReview-Commit-ID: HFZfJGwSqyT

--HG--
extra : rebase_source : eb04f0a3fa55d17eb5fef9bff3170ba5ce147eff
2017-06-07 14:17:41 +01:00
Andreas Tolfsen afba0a5aaf Bug 1370871 - Remove "global" global from evaluate script context; r=automatedtester
Marionette exposes a global called "global" to scripts that are
evaluated in sandboxes.  This is no longer needed after the rewrite of
the testing/marionette/evaluate.js module.

MozReview-Commit-ID: BobdwilaCy0

--HG--
extra : rebase_source : 96df7df0711eba9833b7e1198ffab0768b87e5cb
2017-06-07 14:24:24 +01:00
David Burns 21aac9bd4d Bug 1368674 - Remove setTestName functionality from Marionette r=whimboo
setTestName was used for logging which test was being run for the
JS Tests used in B2G.

MozReview-Commit-ID: FNF4Sm7vAYM

--HG--
extra : rebase_source : cbb6667bb0d8be65c34c6e84b70caf21c6b3c34d
2017-05-30 16:28:36 +01:00
David Burns db1c923084 Bug 1368674 - Remove simpleTest functionality from Marionette. r=whimboo
This is a remanent of the B2G code for injecting Mochitest style tests
into Gecko. This is no longer used by anything and is now dead code.

MozReview-Commit-ID: 4qaB3vxQzon

--HG--
extra : rebase_source : 7297648ed73faf326dc98f9c26604a447d658beb
2017-05-30 13:51:02 +01:00
Jessica Jong 62de86ac19 Bug 1369413 - Remove the use of const INPUT_DATETIME_PREF. r=ato
MozReview-Commit-ID: 5Orzh1X7Ln2

--HG--
extra : amend_source : 5bf1aefca05bebe08cbca5cc4c2da0fe8d3c3130
2017-06-02 02:52:00 -04:00
Ryan VanderMeulen 17e61d02f4 Backed out 3 changesets (bug 1368674) for Android test failures. a=merge
Backed out changeset ff3c813fcdea (bug 1368674)
Backed out changeset 0d9bb636b9a9 (bug 1368674)
Backed out changeset 1d0202706572 (bug 1368674)

MozReview-Commit-ID: CrCFYIEDH4o

--HG--
extra : source : bf5e8ffae40db7b2c2afcb1851fb8eb80b98e5b6
2017-06-01 19:21:31 -04:00
David Burns 5fe3dc363a Bug 1368674 - Remove setTestName functionality from Marionette r=whimboo
setTestName was used for logging which test was being run for the
JS Tests used in B2G.

MozReview-Commit-ID: FNF4Sm7vAYM

--HG--
extra : rebase_source : b12fd8ce04e7da739a8a5ec0e7b30b6734c58e4a
2017-05-30 16:28:36 +01:00
David Burns 8cb144921e Bug 1368674 - Remove simpleTest functionality from Marionette. r=whimboo
This is a remanent of the B2G code for injecting Mochitest style tests
into Gecko. This is no longer used by anything and is now dead code.

MozReview-Commit-ID: 4qaB3vxQzon

--HG--
extra : rebase_source : 3af2c7655ecd2d03f266d0a1ad02eadfea1b1a0b
2017-05-30 13:51:02 +01:00
Ryan VanderMeulen e36ce0e346 Backed out 3 changesets (bug 1368674) for flake8 failures.
Backed out changeset 9aa183c8533e (bug 1368674)
Backed out changeset 837ccbc38bfc (bug 1368674)
Backed out changeset 7f4f851da483 (bug 1368674)
2017-06-01 16:54:10 -04:00
David Burns 06b3c56c83 Bug 1368674 - Remove setTestName functionality from Marionette r=whimboo
setTestName was used for logging which test was being run for the
JS Tests used in B2G.

MozReview-Commit-ID: FNF4Sm7vAYM

--HG--
extra : rebase_source : 6ad739d2ff9bf3d6bafaed0450c8794a257657e7
2017-05-30 16:28:36 +01:00
David Burns 58b95498e0 Bug 1368674 - Remove simpleTest functionality from Marionette. r=whimboo
This is a remanent of the B2G code for injecting Mochitest style tests
into Gecko. This is no longer used by anything and is now dead code.

MozReview-Commit-ID: 4qaB3vxQzon

--HG--
extra : rebase_source : b4b7e66452b7ce7335ef5f509957121f403d7043
2017-05-30 13:51:02 +01:00
Jessica Jong efe6bfa010 Bug 1366188 - Part 1: Fix Marionette's DateTimeValue when dom.forms.datetime is enabled. r=ato
When we enable "dom.forms.datetime", <input type=date> and <input type=time>
are displayed as multi-field text box, where the fields are ordered depending
on locale. To avoid too much overhead, instead of synthesising each key event,
we set the element's value property and fire the corresponding events to
emulate user interaction.

MozReview-Commit-ID: Ao6ip61CNT6

--HG--
extra : rebase_source : f03d9c5d2e2540e6c2189b542d9270be5fb63919
2017-05-30 23:37:00 +02:00
David Burns fa48a67c05 Bug 1368648: Remove importScript functionality from Marionette r=ato
This removes importScript functionality that was used extensively for
B2G testing but is no longer used in tree.

MozReview-Commit-ID: 1O7GWCZPWRZ

--HG--
extra : rebase_source : dc57710690116d9f473271f88f43f298590e895e
2017-05-30 11:25:14 +01:00
Henrik Skupin 2d096423ea Bug 1368101 - getCurrentUrl can retrieve the URL via the chrome process. r=ato
There is no reason for the command to call into the content framescript.
It's only adding overhead and can currently cause hangs if the framescript
gets reloaded.

Instead use the content browser which is always aware of the current URL.

MozReview-Commit-ID: 9Ui7qClFEWJ

--HG--
extra : rebase_source : e428e71ddb66e0152d164f2aebd20efb0593ceec
2017-05-26 20:37:36 +02:00
Andreas Tolfsen a9505b4395 Bug 1363053 - Move element.fromJson/toJson to evaluate module r=maja_zf
This patch renames element.fromJson and element.toJson to
evaluate.fromJSON and evaluate.toJSON, respectively.

The JSON (de)serialisation code belongs more naturally in the evaluate
module, which did not exist when these functions were written.

MozReview-Commit-ID: FJGbjGD1kZ6

--HG--
extra : rebase_source : b2528f545c8213b06b9116299806d8ab8a875250
2017-05-08 17:05:20 +01:00
Henrik Skupin 2a458fb433 Bug 937659 - Implement page load strategy. r=ato
By using the page load strategy each navigation request has to return
when the page load has reached the expected document ready state, or
immediately if a strategy of "none" is set.

This also removes the page load checks when switching frames because
this is not part of the webdriver spec.

MozReview-Commit-ID: 3KbsDvzEG6c

--HG--
extra : rebase_source : 68170235424e181c083febd44fca6bb0c5dfec63
2017-04-19 13:22:13 +02:00
Henrik Skupin 7d15bba78b Bug 1318351 - Remove mainContent and related code used by B2G. r=ato
MozReview-Commit-ID: 1BZY5VvCMZ9

--HG--
extra : rebase_source : f306e0509b2403496dd60fa19ca28abe2e198cdb
2017-05-04 11:45:08 +02:00
Henrik Skupin e266de9045 Bug 1318351 - Remove obsolete B2G code from listener frame script. r=ato
MozReview-Commit-ID: J5e3AQGgOxh

--HG--
extra : rebase_source : b4d6998db644c7c44b29f1fec0668ce0484b1d38
2017-05-03 16:46:58 +02:00
Henrik Skupin 6c250f896a Bug 1318351 - Remove readyStateTimer which was only used for B2G. r=ato
MozReview-Commit-ID: 5vrrMLiSSQW

--HG--
extra : rebase_source : 1d2e0b80b31e0f3149e43b4211935d69f5571d41
2017-05-02 23:27:00 +02:00
Henrik Skupin 4baa8cc9a2 Bug 1361983 - Extend page unload timer if flushEventLoop returns after beforeunload event. r=ato
In cases when the navigation trigger function returns too late and the
beforeunload event has already been fired, the page load currently gets
canceled. This happens because the page unload timer hasn't been set at
this time and the unbeforeunload handler doesn't extend its time.

With this patch a flag is used which indicates if an beforeunload
event already occurred, so when the pageunload timer notifies the page
listener the unload timer can be extended to 5s as expected.

MozReview-Commit-ID: FKK0oGEWijU

--HG--
extra : rebase_source : bf4342cfb439eb85cb87cad922054953e5cb97f3
2017-05-04 11:53:30 +02:00
Henrik Skupin 891449384c Bug 1357634 - Use 'beforeunload' to detect a possible page load. r=ato
Using only the different unload events to detect a page load is
unreliable because of a possible delay in starting the navigation,
which could be triggered by a slowness of the application.

By using 'beforeunload', an event will be received much earlier,
and the unload timer can be extended to a couple more seconds to
wait for the navigation request to start.

If a website has it's own 'beforeunload' listener registered,
a tab modal dialog will be opened by Firefox, and Marionette
returns from the currently active command immediately to allow
the test to handle the dialog.

MozReview-Commit-ID: 6ZUYtFJSSnz

--HG--
extra : rebase_source : 3f7b9d9d0067ed7c65a3bb8774f0a5ae8bc702c2
2017-04-28 10:27:12 +02:00
Henrik Skupin ea0737e52e Bug 1360466 - Only handle hashchange event for the current window. r=ato
Similar to the other unload and load events during a page load,
the hashchange event should only be handled if the event's target
document is the current window.

MozReview-Commit-ID: F1LMBh5Cy4A

--HG--
extra : rebase_source : 668fd6946067989e7e732b24baf6de2e85541f21
2017-04-28 14:16:59 +02:00
Henrik Skupin 5b9b18e398 Bug 1360466 - Use target instead of originalTarget in handleEvent. r=ato
originalTarget seems to be outdated and not used anymore for each
navigation related event. But target is, and as such handleEvent
has to make use of that instead.

MozReview-Commit-ID: AN2H1PbCt7A

--HG--
extra : rebase_source : fbead2b5b802454f0e288fb9696db5d422e46b50
2017-04-28 17:36:42 +02:00
Henrik Skupin d92bf63b99 Bug 1357407 - Enable logger output for framescript when remoteness is enabled. r=ato
With remoteness enabled content framescripts don't seem to inherit the
appenders for loggers, which have been set by the main script. To get
the output written to stdout they have to add their own appender. To
prevent duplicated output after framescripts get reloaded, the addition
of the appender should only happen once.

MozReview-Commit-ID: A5TMQvQu0Iy

--HG--
extra : rebase_source : 9a9ecdb8aec8d7b310b916407edbac77b8ec88c9
2017-04-27 12:09:10 +02:00
Henrik Skupin 247b5f9899 Bug 1335778 - Make element click command check for page load and wait. r=ato
If the click command triggered a page load, it should not return before
the page has been fully loaded. With this patch we allow an opt-in for
commands to make use of an unload check. It's set to 200ms right now, and
will cancel an ongoing waitForPageLoad() if no page activity is detected.

MozReview-Commit-ID: DWV53sckBS2

--HG--
extra : rebase_source : 1b7905c101b7ebf406e88c73be5d0e069b7342c0
2017-04-20 12:12:27 +02:00
Henrik Skupin 7ec2768336 Bug 1335778 - Synchronize navigate() for trigger methods using generators. r=ato
In the case when the trigger callback inside navigate() uses a generator,
the code has to be synchronized and needs to wait until the contained
command has been completed.

MozReview-Commit-ID: 8qKUMvH7HpS

--HG--
extra : rebase_source : 19a87058d62088701914ab2a468ddffaecec1fe2
2017-04-07 21:44:32 +02:00
Henrik Skupin fd0dae0214 Bug 1335778 - Make switchToFrame synchronous for in-process frames. r=ato
In the case of switching to an in-process frame, the checkLoad timer
is setup which waits for the frame's content to finish loading.

But the command doesn't actually wait for those events and calls
sendResponse() immediately. This causes a race condition for the
following commands.

MozReview-Commit-ID: 6vuQ7paQ55K

--HG--
extra : rebase_source : ceb590f435d84ead4eba2e718e1ebaa01900d33f
2017-04-25 11:29:02 +02:00
Sebastian Hengst 3a9a395200 Backed out changeset 4a9cc95b8a9f (bug 1335778) for failing firefox-ui-functional-local's test_notifications.py TestNotifications.test_addon_install_failed_notification. r=backout 2017-04-26 14:13:09 +02:00
Sebastian Hengst 58e94402a0 Backed out changeset 5589cde521f8 (bug 1335778) 2017-04-26 14:12:21 +02:00
Sebastian Hengst 2bb5df4de7 Backed out changeset e084deb550c2 (bug 1335778) 2017-04-26 14:12:13 +02:00
Henrik Skupin d9653a7941 Bug 1335778 - Make element click command check for page load and wait. r=ato
If the click command triggered a page load, it should not return before
the page has been fully loaded. With this patch we allow an opt-in for
commands to make use of an unload check. It's set to 200ms right now, and
will cancel an ongoing waitForPageLoad() if no page activity is detected.

MozReview-Commit-ID: DWV53sckBS2

--HG--
extra : rebase_source : 455e252e85c14b4ca841f02794bf0d33133ef10a
2017-04-20 12:12:27 +02:00
Henrik Skupin 2a85a061ba Bug 1335778 - Synchronize navigate() for trigger methods using generators. r=ato
In the case when the trigger callback inside navigate() uses a generator,
the code has to be synchronized and needs to wait until the contained
command has been completed.

MozReview-Commit-ID: 8qKUMvH7HpS

--HG--
extra : rebase_source : 19a87058d62088701914ab2a468ddffaecec1fe2
2017-04-07 21:44:32 +02:00
Henrik Skupin e1a0e9491a Bug 1335778 - Make switchToFrame synchronous for in-process frames. r=ato
In the case of switching to an in-process frame, the checkLoad timer
is setup which waits for the frame's content to finish loading.

But the command doesn't actually wait for those events and calls
sendResponse() immediately. This causes a race condition for the
following commands.

MozReview-Commit-ID: 6vuQ7paQ55K

--HG--
extra : rebase_source : ceb590f435d84ead4eba2e718e1ebaa01900d33f
2017-04-25 11:29:02 +02:00
Sebastian Hengst d8ac097a1d Backed out changeset b5def807ceda (bug 1335778) for permafailing test_crash.py TestCrash.test_crash_content_process on Windows 8. r=backout a=backout
MozReview-Commit-ID: 1uXKHg77IKy
2017-04-19 18:55:49 +02:00
Sebastian Hengst b1985f3e25 Backed out changeset 938d57f025ea (bug 1335778)
MozReview-Commit-ID: 1PODrjHutgJ
2017-04-19 18:53:32 +02:00