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

17 Коммитов

Автор SHA1 Сообщение Дата
Victor Porof 2b036e45c5 Bug 1561435 - Format testing/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35962

--HG--
extra : source : c0948f31e520ca087279cf429ca5f1db5a8341b8
2019-07-05 11:01:24 +02:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Andreas Tolfsen 0be64b42c5 Bug 1467744 - Lazily import globals in Marionette. r=whimboo
Calling Cu.importGlobalProperties immediately defines the import
properties and any prototypes that they require.  Aside from CPU
overhead, this also tends to consume a lot of memory, especially
for objects with complex prototypes.  And it does this once for
every global you call it in.  This is especially a problem for
content processes, since we get this memory overhead in each and
every content process.

This patch moves Marionette to use the new
XPCOMUtils.defineLazyGlobalGetters so that symbols are constructed
only when actually needed.

MozReview-Commit-ID: 3RYWTcdO7FM

--HG--
extra : rebase_source : 0c450c8900e5de5446796b34ae4ab6bdf0fe9118
2018-06-08 13:16:29 +01:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Henrik Skupin 21872db2c4 Bug 1406150 - Always throw exceptions by using 'new'. r=maja_zf
MozReview-Commit-ID: GmI1PuSQwWU

--HG--
extra : rebase_source : 61d87d94d683094a579d776e10134dc961182969
2017-10-06 14:07:13 +02:00
Andreas Tolfsen d28ce13224 Bug 1405279 - Remove unused variables. r=whimboo
MozReview-Commit-ID: CmiDVCw6xVK

--HG--
extra : rebase_source : e71cfb7da973d95c796a93cc1e4da6f709acf65e
2017-10-03 14:35:47 +01:00
Andreas Tolfsen dd7a57fd22 Bug 1384517 - Fix testing/marionette API docs; r=automatedtester
Various fixes to make the generated API documentation from
testing/marionette somewhat easier to read.

MozReview-Commit-ID: F9duuQoOYBt

--HG--
extra : rebase_source : 3ade69773ceba42826aedef05b1371240b51cf82
2017-07-26 13:11:53 +01:00
Henrik Skupin 3dd4e99bb1 Bug 1374672 - Don't wait for page load events for identical hash parameters. r=automatedtester
If the target URL has the exact same hash parameter as the current URL no
page load will happen. As such Marionette should not wait for the appropriate
events.

MozReview-Commit-ID: LNbGJQgChya

--HG--
extra : rebase_source : a775f090c9c4e558803af80078c3eb3bf79fa583
2017-07-07 17:34:27 +02:00
Andreas Tolfsen de001d80b7 Bug 1376128 - Lint testing/marionette; r=automatedtester
MozReview-Commit-ID: DY4yCSBEZrN

--HG--
extra : rebase_source : d4e25369418cc72a6ee9f78d44b050a87403391d
2017-06-29 16:40:24 -07: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
Carsten "Tomcat" Book b74a02d6b7 Backed out changeset 3f619577e5d7 (bug 1291320) 2017-03-27 12:01:49 +02: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
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
Thomas Charles acf2f9d4dd Bug 1316975 - Correct function definition style in Marionette components; r=ato
No functional changes.

MozReview-Commit-ID: 25cWAnpRB9H

--HG--
extra : rebase_source : c8b14bf47a476488568f54d3640b51bbeed5b04b
2016-12-04 12:42:52 +01:00
Andrea Marchesini 9f4ca5a041 Bug 1310483 - Implement nsIURIWithQuery for having query part in simple URI, r=valentin 2016-11-14 13:04:33 +01:00
Andreas Tolfsen 175975b04b Bug 1280300 - Support navigation by fragment; r=automatedtester
Adds support for navigating to a fragment on the currenty visible document
without waiting for a DOM event that the document has been fully loaded.

This addresses https://github.com/mozilla/geckodriver/issues/150.

MozReview-Commit-ID: 7uiPT5cjGQE

--HG--
extra : rebase_source : f9152a6623a25c17e10dc3bc6552b8e635c21317
2016-07-19 18:47:33 +01:00