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

207 Коммитов

Автор SHA1 Сообщение Дата
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
Sebastian Hengst 8571b4be42 Backed out changeset 7d8f800a7229 (bug 1335778)
MozReview-Commit-ID: LGFPR1XveMh
2017-04-19 18:53:27 +02:00
Henrik Skupin b7bf594659 Bug 1335778 - Add debug logging output for page load events. r=ato
To ease the investigation of possible page load issues debug logging
output is added to the page load listener.

MozReview-Commit-ID: 18itxTHtnBf

--HG--
extra : rebase_source : 7d5f64125453e57113aa565ca09b4eb61a14ec9a
2017-04-12 22:41:21 +02:00
Henrik Skupin f1d53ae011 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 : 2c4d2a19a006645ecd44e08a28309367bf4f8d32
2017-04-13 20:16:23 +02:00
Henrik Skupin 4e01e939f1 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 : 3bc63d130c370354dab27bf40bbf13ec441bd423
2017-04-07 21:44:32 +02:00
Henrik Skupin c646d63631 Bug 1356000 - Ensure unwrapped content listeners catch errors. r=ato
Content listeners that are using the old IPC dispatching technique can
cause Marionette to hang when errors are thrown but not handled. To
ensure errors are returned to the chrome process, all the code has to
be placed in try/catch blocks.

MozReview-Commit-ID: J6fwnFUURl7

--HG--
extra : rebase_source : ade78c8839e58ccb1e603c8e92cba1938519d2f4
2017-04-13 10:26:02 +02:00
Henrik Skupin 3055f8532d Bug 1291320 - Make refresh command synchronous. r=ato,automatedtester
Update the refresh command to make it synchronous, and let it return
once the target page has been loaded. This can be accomplished by using
the loadListener object in listener.js.

MozReview-Commit-ID: Lc8QoGFeQrY

--HG--
extra : rebase_source : 1fd914aec1c55fe91a0de773cfd7ff22b5d12167
2017-03-27 16:16:36 +02:00
Henrik Skupin bdc3b68d5c Bug 1291320 - Refactor page load algorithm for listener framescript. r=ato,automatedtester
This refactoring allows us to re-use the same load algorithm for
each command which could trigger a page load. It also takes remoteness
changes into account, and waits until the load has been done.

With this change we no longer check for readyState only, but observe
the necessary DOM events as fired for page unloads and loads. This will
help us to implement the page loading strategy later.

By observing the DOM events, I also expect a small increase of performance
for any kind of page load, given that we now return immediately and do not
have a delay of 100ms at maximum.

MozReview-Commit-ID: IVtO6KgJFES

--HG--
extra : rebase_source : 40f90e3b9d1bf0a2f9123271cd08513769616e41
2017-03-28 21:41:38 +02:00
David Burns 7e5554522e Bug 1348782: Updated expected key parameter for sendKeysToElement. r=ato
The expected command parameter has been updated from `value`
to `text`. This aligns marionette with W3C WebDriver
Send Keys To Element command.

MozReview-Commit-ID: EkQ1UJ58V7f

--HG--
extra : rebase_source : 1706113816eb4184334330e237e07c1f480d4500
2017-03-24 21:37:43 +00:00
Carsten "Tomcat" Book b74a02d6b7 Backed out changeset 3f619577e5d7 (bug 1291320) 2017-03-27 12:01:49 +02:00
Carsten "Tomcat" Book 9b4bc03f6b Backed out changeset 8580c2a3629e (bug 1291320) 2017-03-27 12:01:47 +02:00
Henrik Skupin c64b04d4ae Bug 1291320 - Make refresh command synchronous. r=ato,automatedtester
Update the refresh command to make it synchronous, and let it return
once the target page has been loaded. This can be accomplished by using
the loadListener object in listener.js.

MozReview-Commit-ID: Lc8QoGFeQrY

--HG--
extra : rebase_source : f5aa7a9a6d144b849b2808b08d78ca99fc83e518
2017-03-14 18:10:00 +01:00
Henrik Skupin 6df67da555 Bug 1291320 - Refactor page load algorithm for listener framescript. r=ato,automatedtester
This refactoring allows us to re-use the same load algorithm for
each command which could trigger a page load. It also takes remoteness
changes into account, and waits until the load has been done.

With this change we no longer check for readyState only, but observe
the necessary DOM events as fired for page unloads and loads. This will
help us to implement the page loading strategy later.

By observing the DOM events, I also expect a small increase of performance
for any kind of page load, given that we now return immediately and do not
have a delay of 100ms at maximum.

MozReview-Commit-ID: IVtO6KgJFES

--HG--
extra : rebase_source : 7cce694d464a18773c65056c336b9f900f5466d0
2017-03-23 21:54:02 +01:00
Sebastian Hengst 97615466db Backed out changeset 7c314416a41c (bug 1291320) 2017-03-23 21:48:36 +01:00
Sebastian Hengst 5396a97731 Backed out changeset 1c0d8a46504a (bug 1291320) 2017-03-23 21:48:31 +01:00
Henrik Skupin 4951f9acb7 Bug 1291320 - Make refresh command synchronous. r=ato,automatedtester
Update the refresh command to make it synchronous, and let it return
once the target page has been loaded. This can be accomplished by using
the loadListener object in listener.js.

MozReview-Commit-ID: Lc8QoGFeQrY

--HG--
extra : rebase_source : e97d791ae9094b4fce7e2371c68d1a3120bd56b7
2017-03-14 18:10:00 +01:00
Henrik Skupin c313eb89a0 Bug 1291320 - Refactor page load algorithm for listener framescript. r=ato,automatedtester
This refactoring allows us to re-use the same load algorithm for
each command which could trigger a page load. It also takes remoteness
changes into account, and waits until the load has been done.

With this change we no longer check for readyState only, but observe
the necessary DOM events as fired for page unloads and loads. This will
help us to implement the page loading strategy later.

By observing the DOM events, I also expect a small increase of performance
for any kind of page load, given that we now return immediately and do not
have a delay of 100ms at maximum.

MozReview-Commit-ID: IVtO6KgJFES

--HG--
extra : rebase_source : fe55e090c271476a4e52f655ced6a3b0fe8a92e4
2017-03-15 14:51:41 +01:00
Andreas Tolfsen 7fbc7c7a97 Bug 1333014 - Align element interaction errors with spec; r=whimboo
This renames the ElementNotVisibleError to ElementNotInteractableError,
and adds a new ElementClickInterceptedError.

MozReview-Commit-ID: 6cjVghUCvyv

--HG--
extra : rebase_source : 3f2105c1f631ac4776e231bb6c88a00e26f1ae6c
2017-02-03 19:30:13 +00:00
Henrik Skupin 7c4d3ea96b Bug 1330348 - Make forward- and backward commands synchronous. r=ato
Both `goBack` and `goForward` commands should not return immediately,
but when the requested page has been fully loaded. To handle that a general
`waitForPageUnloaded` method has been added, which will call
`pollForReadyState` when necessary.

Similar to `get` the dispatcher cannot be used due to possible remoteness
changes. As such the driver has to poll the framescript until the page load
has been finished.

MozReview-Commit-ID: 4F7Piymxwhs

--HG--
extra : rebase_source : 58084cb9fa8ac96ced4ff5d719dd55cbb0dafa03
2017-03-06 14:14:21 +01:00
Henrik Skupin 275f3c88d7 Bug 1330348 - Make pollForReadyState a shared method for navigation commands. r=ato
All navigation commands including get, goBack, goForward, and maybe others
in the future should rely on the same method for fetching the readyState of
a document. As such prepare `pollForReadyState` and `get` for the upcoming
usage.

MozReview-Commit-ID: 5Y4U9dgM7uj

--HG--
extra : rebase_source : f66908fbe013fd961468679862db4caa77230ec9
2017-03-09 11:21:30 +01:00
Carsten "Tomcat" Book 1f281c3405 Backed out changeset 74b0c928a23e (bug 1322383) for frequent failure rate in marionette tests
--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_window_type_chrome.py => testing/marionette/harness/marionette_harness/tests/unit/test_window_type.py
2017-03-01 12:49:21 +01:00
Henrik Skupin adf2cd32d2 Bug 1322383 - Add missing checks for valid window r=ato+446296
MozReview-Commit-ID: Ad67SPx8vBx

--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_window_type.py => testing/marionette/harness/marionette_harness/tests/unit/test_window_type_chrome.py
extra : rebase_source : f799c6b272a48654dff8cbbb7df7fe8fbb05bc22
2017-02-03 17:49:38 +01:00
Sebastian Hengst 94a3198643 Backed out changeset deb5b08545fd (bug 1322383) for frequently failing to find windows in wpt tests on Windows. r=backout
--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_window_type_chrome.py => testing/marionette/harness/marionette_harness/tests/unit/test_window_type.py
2017-02-09 18:13:02 +01:00
Henrik Skupin f681f14f4f Bug 1322383 - Add missing checks for valid window r=ato
MozReview-Commit-ID: Ad67SPx8vBx

--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_window_type.py => testing/marionette/harness/marionette_harness/tests/unit/test_window_type_chrome.py
extra : rebase_source : 16bcd69d1906d8f2a544fd441cac2ff59634a5a1
2017-02-03 17:49:38 +01:00
Florian Quèze be4dbae285 Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:02 +01:00
Maja Frydrychowicz 320a29e888 Bug 1328726 - Make performActions and releaseActions blocking; r=ato
Now the server response isn't sent until the command's Promise is
resolved.

MozReview-Commit-ID: LUdL6mZQ5jE

--HG--
extra : rebase_source : f933e75ca948140a1fd763670b9793b4ff51df67
2017-01-11 10:26:22 -05:00
Wes Kocher abd222ddc9 Backed out 8 changesets (bug 1328726) for webdriver bustage a=backout CLOSED TREE
Backed out changeset 1039c2ca90ee (bug 1328726)
Backed out changeset de5830f1b8ab (bug 1328726)
Backed out changeset c039479ce446 (bug 1328726)
Backed out changeset 6d9673eedd91 (bug 1328726)
Backed out changeset be79eb6f9d64 (bug 1328726)
Backed out changeset 6be0203f1a26 (bug 1328726)
Backed out changeset 4430151d0cb4 (bug 1328726)
Backed out changeset 2143f1aa8087 (bug 1328726)

MozReview-Commit-ID: GrWBTO2rhXm
2017-01-25 10:51:08 -08:00
Maja Frydrychowicz 5147eeee67 Bug 1328726 - Make performActions and releaseActions blocking; r=ato
Now the server response isn't sent until the command's Promise is
resolved.

MozReview-Commit-ID: LUdL6mZQ5jE

--HG--
extra : rebase_source : f933e75ca948140a1fd763670b9793b4ff51df67
2017-01-11 10:26:22 -05:00
Wes Kocher 26b0e2ee32 Backed out 7 changesets (bug 1328726) for lint failures a=backout
Backed out changeset 93218dc2249f (bug 1328726)
Backed out changeset 0e6e8d3fccec (bug 1328726)
Backed out changeset 5606cc9b0654 (bug 1328726)
Backed out changeset 40fceb2644d7 (bug 1328726)
Backed out changeset 0c10680f0705 (bug 1328726)
Backed out changeset a2520d52c7cc (bug 1328726)
Backed out changeset ec1a2cd38ffe (bug 1328726)

MozReview-Commit-ID: KnktbcccJoR
2017-01-24 13:55:07 -08:00
Maja Frydrychowicz 9cc3470245 Bug 1328726 - Make performActions and releaseActions blocking; r=ato
Now the server response isn't sent until the command's Promise is
resolved.

MozReview-Commit-ID: LUdL6mZQ5jE

--HG--
extra : rebase_source : f933e75ca948140a1fd763670b9793b4ff51df67
2017-01-11 10:26:22 -05:00
Florian Quèze 85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00