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

262 Коммитов

Автор SHA1 Сообщение Дата
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
Garvit Khatri 166668afbe Bug 1519791 - Remove unused --toolbarbutton*-border-color variables. r=ntim
--HG--
extra : rebase_source : 5359566efb1538c282e7ecfaacbf3cd4619df32d
2019-01-22 10:42:47 +01:00
Jeff Walden ed23151bd7 Bug 1492937 - Make the JS subscript loader load scripts exclusively as UTF-8, with no way to specify any other encoding, and adjust a bunch of existing tests to use UTF-8 directly, rather than Unicode escape sequences or similar. (This also changes the encoding of .sjs scripts and all mochitest-browser tests in the tree from Latin-1 to UTF-8.) r=yzen, r=MattN, r=jimb, r=kmag 2018-12-19 13:46:20 -08:00
Mark Banner ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Florens Verschelde 63be9aad3e Bug 1458224 - Fix Linux root font size in DevTools; r=pbro,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D6155

--HG--
extra : moz-landing-system : lando
2018-10-02 16:46:45 +00:00
Kris Maglione 53f96aa226 Bug 1486182: Part 2a - Add Services.catMan getter for the category manager. r=mossop
This makes it much easier to update existing consumers of
XPCOMUtils.enumerateCategoryEntries to use the category manager directly.

It also, unfortunately, requires updating existing category manager consumers
to use the Services getter in order to avoid ESLint errors.

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

--HG--
extra : rebase_source : fb9fd9b21db80af472ff6250a2e9a35e8d538147
2018-08-24 22:13:57 -07:00
yulia 9334e84033 Bug 1447494 - remove all instances of commandline/helpers; r=ochameau
Removed remaining imports of commandline helpers, as they are no longer used anywhere

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

--HG--
extra : moz-landing-system : lando
2018-08-16 14:06:07 +00:00
Kris Maglione 031076f2f3 Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : source : fcfb99baa0f0fb60a7c420a712c6ae7c72576871
extra : histedit_source : 5be9b7b29a52a4b8376ee0bdfc5c08b12e3c775a
2018-05-21 16:58:23 -07:00
Narcis Beleuzu 561ccb2ceb Backed out 2 changesets (bug 1463016, bug 1463291) for geckoview failures
Backed out changeset fcfb99baa0f0 (bug 1463291)
Backed out changeset 0d69b4fb1ed4 (bug 1463016)
2018-07-29 03:55:23 +03:00
Kris Maglione cb1ee1e34d Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : rebase_source : a13c59d1a5ed000187c7fd8e7339408ad6e2dee6
2018-05-21 16:58:23 -07:00
Nicolas Chevobbe e27df170c7 Bug 1471849 - Add mock for Services in json-viewer; r=Honza.
Services is now used in the reps bundle but can't be loaded in the json-viewer.
Since it's only used in the ObjectInspector, which we don't use in the json-viewer,
we can mock it.

MozReview-Commit-ID: DvAxzXTb67K

--HG--
extra : rebase_source : 59c907824e94825357e5049b83ba60afebeddc9a
2018-06-28 10:43:02 +02:00
Sebastian Hengst 82bbb42c90 Bug 1469872 - update bugzilla products and components in moz.build files: devtools. r=nalexander
MozReview-Commit-ID: 6bs0jkTP6rP

--HG--
extra : rebase_source : 4e554f8e710aea1fb372a0f21d7539cf568baa17
2018-06-20 21:34:40 +03:00
Julian Descottes 7fdc2c153f Bug 1454696 - Fix leftover issues for prefer-const;r=yulia
MozReview-Commit-ID: JwOXoqw2mks

--HG--
extra : rebase_source : a3f07665a42c2779a85b7901a07206266a9d1616
extra : source : ae946f375e0d0f4f0f0fc859c54040fef42cbc2c
2018-06-01 12:19:35 +02:00
Julian Descottes 640fe52298 Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4

--HG--
extra : rebase_source : 65de1b0aba412d9044b5196115f74276caa058f2
2018-06-01 12:36:09 +02:00
Jonathan Kingston 5054bfcd70 Bug 1463398 - Removal of deprecated newChannel() API on nsIIOService r=ckerschb
MozReview-Commit-ID: 5AwSnQhFtT2

--HG--
extra : rebase_source : e9e8a3109f045f5583389042b2c6dc187cf0b6a8
2018-05-22 13:09:41 +01:00
Ognjen Galic d92f87e2e0 Bug 1264557 - Add expand all/collapse all buttons. r=Honza
This adds buttons to collapse and expand the JSON tree. If the file
is larger than 100kB the "Expand All" button is hidden for performance
reasonds, as well as test cases for the buttons.
2018-05-05 12:40:18 +02:00
Oriol Brufau 2571f94ea5 Bug 1460840 - JSON Viewer's converter-child should not trust JSONView without Xrays r=Gijs,kmag
MozReview-Commit-ID: BvrVd9cdRaK

--HG--
extra : rebase_source : 0ea9277b3e576668940b2abaf082a1cd86a0b213
2018-05-11 16:08:47 +02:00
Gijs Kruitbosch aeace8b471 Bug 1459640 - add CSP also via meta tag, r=bgrins
This also fixes all the tests to not rely on eval() anymore.

MozReview-Commit-ID: 8H8r497nQVK

--HG--
extra : rebase_source : 89c7f8a6e1bb77ceb242f05749c22d929ee86929
2018-05-08 12:25:47 +01:00
Csoregi Natalia 33962019e1 Backed out 2 changesets (bug 1264557) for Eslint failure. CLOSED TREE
Backed out changeset e17cd801b578 (bug 1264557)
Backed out changeset d3bf0a95e4e4 (bug 1264557)
2018-05-10 13:48:13 +03:00
Ognjen Galic 5c5a3822fe Bug 1264557 - Add test cases for expand/collapse buttons. r=honza
--HG--
extra : histedit_source : 0c3c6197f3fbce7ff7c3f3f7d90131775eceac4e
2018-05-09 10:10:51 +02:00
Ognjen Galic 2f49407684 Bug 1264557 - Add expand all/collapse all buttons. r=honza
This adds buttons to collapse and expand the JSON tree. If the file
is larger than 100kB the "Expand All" button is hidden for performance
reasonds.

--HG--
extra : histedit_source : 3fa4d8e5523afbc423ebc5a6d803bdb84100f9d7
2018-05-05 12:40:18 +02:00
Kris Maglione 01c298aca6 Bug 1460092: Add ESLint rule to enforce use of ChromeUtils.generateQI. r=Gijs
Also fixes existing code which fails the rule.

MozReview-Commit-ID: CkLFgsspGMU

--HG--
extra : rebase_source : 86a43837659aa2ad83a87eab53b7aa8d39ccf55b
2018-05-08 18:36:22 -07:00
Michael Ratcliffe 764c4c8578 Bug 1098374 - Telemetry: Stop all monkey patching in devtools telemetry tests r=yulia
Changes and notes:
  - Created `devtools/client/shared/test/telemetry-test-helpers.js`, which
    contains test helpers to aid in creating and running telemetry tests.
  - Removed any telemetry monkeypatching as it is not dependable and no longer
    needed (there is some left in GCLI but the test is now disabled because
    we are removing GCLI soon anyhow).
  - Because `telemetry-test-helpers.js` is imported by `shared-head.js` I
    have had to make it available everywhere that shared-head.js is used.
  - All telemetry tests have been rewritten to use the new helper.
  - shared-head.js cannot be imported by tests inside
    `devtools/client/performance/test/` because perf have custom `once` and
    `waitFor` implementations that act differently from the ones inside
    `shared-head.js`. This means I had to import the telemetry helpers into
    `devtools/client/performance/test/head.js`
  - Created `devtools/client/shared/test/browser_telemetry_misc.js` to be sure
    to catch `DEVTOOLS_SCREEN_RESOLUTION_ENUMERATED_PER_USER` (we catch a few
    others to be thorough).
  - Disabled `browser_inspector_menu-02-copy-items.js`, which was failing to
    test some expired scalars. I also corrected the way the scalars are logged
    because it was completely wrong.

MozReview-Commit-ID: JjQEGM6hT61

--HG--
extra : rebase_source : cd1214d01bd11908f69167839975cd93ecb83421
2018-05-01 18:06:14 +01:00
Oriol Brufau d98c7c3a6b Bug 1457513 - Let JSON Viewer display unmodified headers r=Honza
MozReview-Commit-ID: R54uNEefvw

--HG--
extra : rebase_source : 98f2feff9054702998eb6b4c1325fb514bdeaa45
2018-04-27 19:58:25 +02:00
Kris Maglione a7b308c3a2 Bug 1456686: Part 1 - Fix unused and shadowed explicit imports. r=standard8
These issues were previously ignored due to the nature of our global import
rules. They need to be fixed before that rule can be updated.

MozReview-Commit-ID: DCChktTc5TW

--HG--
extra : rebase_source : cffb1c9762191c579d1397c8169e6e7635d229da
extra : histedit_source : dea59ddd2daaae52069c5faceae9149a4f08dd73
2018-04-24 20:18:09 -07:00
Brian Grinstead a977789695 Bug 1378108 - Part 2 - Remove Firebug theme;r=gl
MozReview-Commit-ID: 930pvUVLsiP

--HG--
rename : devtools/client/themes/images/firebug/read-only.svg => devtools/client/themes/images/read-only.svg
extra : rebase_source : e4b1609bff47753d01d4c21ceaca993ce8d93071
2018-04-04 12:32:54 -07:00
Brian Grinstead cb65a965a1 Bug 1378108 - Part 1 - Remove non-variable css selector overrides for Firebug theme;r=gl
MozReview-Commit-ID: 6WfdDVs1EKg

--HG--
extra : rebase_source : f5eb20b62644506abd96afe47c0ab7dd6eca7ee4
2018-04-04 12:32:39 -07:00
Peter Van der Beken f5754d679a Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : 5911f91bd7a63cd3603494e087e3858bd0527500
2018-03-01 20:19:56 +01:00
Gijs Kruitbosch 4d7458825a Bug 1442840, r=ckerschb
--HG--
extra : rebase_source : b5aca0bb6d138b612f33befd419473221e37c97d
2018-03-08 20:46:13 +00:00
Gijs Kruitbosch a9e1b0e919 Bug 1442840, r=bgrins
--HG--
extra : rebase_source : dc87379c22ac47eee13e1ffec6dbff67afb6e2b0
2018-03-08 20:45:00 +00:00
Oriol Brufau 4c531dcdc3 Bug 1447012 - Use waitForNewTab instead of progress listener in addJsonViewTab r=Honza
MozReview-Commit-ID: KInGiOtMLex

--HG--
extra : rebase_source : 42e1b32bdfd7bf53fef75bebbc8373c8788509a4
2018-03-19 02:55:17 +01:00
Tooru Fujisawa 1adba8c1fc Bug 1442465 - Part 4.2: Stop unnecessarily awaiting on BrowserTestUtils.removeTab (simple part). r=dao 2018-03-19 11:16:45 +09:00
Nicolas Chevobbe 61e732837c Bug 1440388 - Adapt JSONViewer to the new Reps bundle; r=Honza.
We don't populate the href attribute on links anymore and reps require
that we pass an openLink function to handle them.
This had an impact on the test where we are testing those links.

MozReview-Commit-ID: Hj2PBX79HZu

--HG--
extra : rebase_source : 1602504731c5a3be4379f9f6631aaf492c7d6daf
2018-03-09 15:30:40 +01:00
Oriol Brufau 3744073b0f Bug 1445801 - Remove unsafe CPOWs in JSON Viewer tests r=jryans
MozReview-Commit-ID: L4B2Zc0dXpn

--HG--
extra : rebase_source : 8058a15a6d0be519a4aab1f72f2bb5e27a6b253b
2018-03-15 19:02:43 +01:00
shindli 9bfc016707 Merge inbound to mozilla-central. a=merge 2018-03-15 12:15:17 +02:00
Kris Maglione 83957914cc Bug 1445551: Part 1b - Whitelist unsafe CPOW use in existing tests. r=mconley
MozReview-Commit-ID: 4ojwvjw9XGT

--HG--
extra : rebase_source : f7b79ad5998f1138266e89767ee1b434e4797b30
2018-03-14 14:35:05 -07:00
Michael Ratcliffe 73ac8a3582 Bug 1440609 - Uncouple DEBUG_JS_MODULES and DEBUG in devtools code r=jryans
MozReview-Commit-ID: 6qiu3D5eYyn

--HG--
extra : rebase_source : e39302f3f8fba26144c540e9f4b50ab7321a714c
2018-03-13 12:49:39 +00:00
Alexandre Poirot bcf6facc3c Bug 1440321 - Convert Task.jsm to async/await in devtools/client. r=jryans
MozReview-Commit-ID: HaGOC5cn3JD
2018-03-12 19:46:35 -05:00
J. Ryan Stinnett 23ff4cc75d Bug 1443081 - Apply spacing via `eslint --fix` for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
Kris Maglione 3eba816ee8 Bug 1443964: Part 1 - Fix most tests that rely on add-on shims. r=mconley
browser_google_behavior.js is the only remaining exception.

MozReview-Commit-ID: GA15P7f0KBv

--HG--
extra : rebase_source : 7cb70cb6108abc6746a9261922bd2826bb11a9b7
2018-03-07 14:35:16 -08:00
J. Ryan Stinnett d56f6a7b1f Bug 1436187 - Move frame-script-utils.js to shared/test. r=bgrins
Move frame-script-utils.js into shared/test since it is a test only file.  In
addition, it's removed from jar.mn so it won't be part the file we ship.  Test
manifests can use the absolute path syntax to make it accessible in new
directories.

MozReview-Commit-ID: 5sKYvv2rsJs

--HG--
rename : devtools/client/shared/frame-script-utils.js => devtools/client/shared/test/frame-script-utils.js
extra : rebase_source : 8c4d77c37cacdae36d17102b4dbf1222ec1fbd8a
2018-03-06 14:14:55 -06:00
J. Ryan Stinnett c6cf60a39f Bug 1436187 - Centralize frame-script-utils loading via shared-head. r=bgrins
Use `loadFrameScriptUtils` from shared-head as a central utility for loading the
frame script utils helper.  This means less stray references to the utils file's
path across our tests.

As part of this, I went ahead and converted Canvas Debugger, Shader Editor, and
Web Audio Editor to shared-head, as that seemed like the best path to reduce
duplication.

(I left one extra path reference in profiler-mm-utils.js as-is, since it's a
module, so shared-head is not easily usable there.)

MozReview-Commit-ID: AKbZt8Jo0GM

--HG--
extra : rebase_source : e70b29153ef8d96d7026bc3abd0fb0d2306849bc
2018-03-05 16:31:49 -06:00
J. Ryan Stinnett 724f46419e Bug 1436187 - Move existing shared head files to devtools/client/shared. r=bgrins
Move shared-head.js and shared-redux-head.js into shared.

MozReview-Commit-ID: 5NUxcl9gkLl

--HG--
rename : devtools/client/framework/test/shared-head.js => devtools/client/shared/test/shared-head.js
rename : devtools/client/framework/test/shared-redux-head.js => devtools/client/shared/test/shared-redux-head.js
extra : rebase_source : c6f6cd75a9c1a5349f8406f337c9c39f2f755dab
2018-03-02 19:14:05 -06:00
Cosmin Sabou 0bc675f657 Backed out 4 changesets (bug 1436187) for mochitest devtools failures at browser_se_editors-error-gutter.js on a CLOSED TREE
Backed out changeset 253f74e28723 (bug 1436187)
Backed out changeset 9875771c9967 (bug 1436187)
Backed out changeset b2d808aa8c2e (bug 1436187)
Backed out changeset e747480f3cd2 (bug 1436187)

--HG--
rename : devtools/client/shared/test/shared-head.js => devtools/client/framework/test/shared-head.js
rename : devtools/client/shared/test/shared-redux-head.js => devtools/client/framework/test/shared-redux-head.js
rename : devtools/client/shared/test/frame-script-utils.js => devtools/client/shared/frame-script-utils.js
2018-03-07 22:04:35 +02:00
J. Ryan Stinnett a5ba5726ef Bug 1436187 - Move frame-script-utils.js to shared/test. r=bgrins
Move frame-script-utils.js into shared/test since it is a test only file.  In
addition, it's removed from jar.mn so it won't be part the file we ship.  Test
manifests can use the absolute path syntax to make it accessible in new
directories.

MozReview-Commit-ID: 5sKYvv2rsJs

--HG--
rename : devtools/client/shared/frame-script-utils.js => devtools/client/shared/test/frame-script-utils.js
extra : rebase_source : cb18b88016df8bc7fba1620534beed473ebb406a
2018-03-06 14:14:55 -06:00
J. Ryan Stinnett 7d61e3b235 Bug 1436187 - Centralize frame-script-utils loading via shared-head. r=bgrins
Use `loadFrameScriptUtils` from shared-head as a central utility for loading the
frame script utils helper.  This means less stray references to the utils file's
path across our tests.

As part of this, I went ahead and converted Canvas Debugger, Shader Editor, and
Web Audio Editor to shared-head, as that seemed like the best path to reduce
duplication.

(I left one extra path reference in profiler-mm-utils.js as-is, since it's a
module, so shared-head is not easily usable there.)

MozReview-Commit-ID: AKbZt8Jo0GM

--HG--
extra : rebase_source : d00f578d7c9078088be8c33ad80eb30a59d6a6e8
2018-03-05 16:31:49 -06:00
J. Ryan Stinnett 5ff93bf9fd Bug 1436187 - Move existing shared head files to devtools/client/shared. r=bgrins
Move shared-head.js and shared-redux-head.js into shared.

MozReview-Commit-ID: 5NUxcl9gkLl

--HG--
rename : devtools/client/framework/test/shared-head.js => devtools/client/shared/test/shared-head.js
rename : devtools/client/framework/test/shared-redux-head.js => devtools/client/shared/test/shared-redux-head.js
extra : rebase_source : 58e35632f0a82b0d7e880b0297306500097676e3
2018-03-02 19:14:05 -06:00
Sebastian Hengst 3a10644021 Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout
Backed out changeset 83c87140dc3d (bug 888600)
Backed out changeset 2efb9b1753f6 (bug 888600)
Backed out changeset af5303781961 (bug 888600)
Backed out changeset 79ef59047e63 (bug 888600)
Backed out changeset 30d568d628dd (bug 888600)
Backed out changeset c7bd4c6c9741 (bug 888600)

--HG--
extra : histedit_source : 791b22f6770f4fead2f909478a93d65d85829fe0%2Cbb387309e90f53e1dde45dcf8cf4ebedcc6e5c5e
2018-03-01 11:51:09 +02:00
Florian Quèze f3ee8dd20b Bug 1433175 - more aggressive scripted patch to replace remaining Components.classes, Components.interfaces, Components.utils and Components.results uses with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:35 +01:00
Florian Quèze c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00