Commit Graph
97 Commits
Author SHA1 Message Date
Alexandre Poirot 4cc4a20117 Bug 1543023 - Use ChromeUtils.import only with one argument in all /devtools/ r=jdescottes
ChromeUtils.import still support a second argument as it used to do
when it was Components.utils.import. But this is deprecated and we should
instead always use the returned value.

Differential Revision: https://phabricator.services.mozilla.com/D37708
2019-07-11 17:08:20 +00:00
Victor Porof 435f7b056d Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35894
2019-07-05 11:29:32 +02:00
Julian Descottes c9481e795f Bug 1552108 - Do not wait for runtimes in about:debugging init if ADB not started r=ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D31403
2019-05-16 13:23:40 +00:00
Julian Descottes 1ccc9d0d4e Bug 1542286 - Show the application version instead of the Gecko version for Fenix runtimes r=daisuke
Depends on D29377

Differential Revision: https://phabricator.services.mozilla.com/D29462
2019-05-07 12:04:36 +00:00
Julian Descottes 7cffe99fdb Bug 1542286 - Show proper runtime name for Fenix in about:debugging r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D29376
2019-05-07 12:02:05 +00:00
Mihai Alexandru Michis 9b69c95e2f Backed out 5 changesets (bug 1542286) for causing devtool failures at browser_about-devtools-toolbox_reload.js CLOSED TREE
Backed out changeset 8b43cfcebf9f (bug 1542286)
Backed out changeset d02d934560c5 (bug 1542286)
Backed out changeset dbb72223a684 (bug 1542286)
Backed out changeset 8a220edc2db3 (bug 1542286)
Backed out changeset 38220ee5ab0c (bug 1542286)
2019-05-07 12:04:53 +03:00
Julian Descottes fd8d7261ae Bug 1542286 - Show the application version instead of the Gecko version for Fenix runtimes r=daisuke
Depends on D29377

Differential Revision: https://phabricator.services.mozilla.com/D29462
2019-05-06 21:02:00 +00:00
Julian Descottes ab6e7f5a0f Bug 1542286 - Show proper runtime name for Fenix in about:debugging r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D29376
2019-05-06 20:56:47 +00:00
Julian Descottes 505829eca3 Bug 1548569 - Fire event from ADB track-devices to unblock aboutdebugging initialization r=Ola
Differential Revision: https://phabricator.services.mozilla.com/D29675
2019-05-03 08:11:54 +00:00
Julian Descottes 9222284cd6 Bug 1514787 - Remain on the same Runtime page when reloading about:debugging r=ladybenko,daisuke
The idea is to wait for ADB runtimes to be available before trying to render the initial route.
This way if we happen to find the runtime matching the current runtime, and if we still have a connected client for it, we can display the same runtime page.

Differential Revision: https://phabricator.services.mozilla.com/D28094
2019-04-29 19:32:16 +00:00
Belén Albeza b0a1d9b3fd Bug 1498469 - Part 1: Wait until adb process is ready to show the 'Usb enabled' message r=jdescottes,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D27296
2019-04-23 11:44:44 +00:00
Julian Descottes de1ad121ae Bug 1505289 - Move unknown runtime logic to aboutdebugging r=Ola,ladybenko
The notion of unknown runtime is only relevant to aboutdebugging
As we will complexify this to handle unplugged devices, moving it to aboutdebugging seems reasonable.

Differential Revision: https://phabricator.services.mozilla.com/D25779
2019-04-15 22:23:01 +00:00
Julian Descottes 5d5928f7e5 Bug 1538708 - Stop storing sockets in adb-client.js;r=ochameau
The client close() method is not used anywhere. Individual callers should be responsible for closing opened sockets if needed.
Removing this method and the _sockets array, we no longer leak strings when calling adb.updateRuntimes()

Differential Revision: https://phabricator.services.mozilla.com/D25213
2019-03-28 15:21:21 +00:00
Julian Descottes fc393c384b Bug 1528912 - Do not stop ADB when closing aboutdebugging or webide;r=daisuke
It looks like we don't need to stop ADB. Most of the logic can stay, in order to start and stop the devices polling.

Differential Revision: https://phabricator.services.mozilla.com/D24398
2019-03-25 08:05:18 +00:00
Edouard Oger fbcc2b613c Bug 1532514 - Update sinon to v7.2.7. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D22046
2019-03-12 19:32:40 +00:00
Dorel Luca 163580f51c Backed out changeset 4b280518c7b1 (bug 1532514) for Browser-chrome failures in browser/components/syncedtabs/test/browser/browser_sidebar_syncedtabslist.js. CLOSED TREE 2019-03-12 03:59:56 +02:00
Edouard Oger 1afa261c1b Bug 1532514 - Update sinon to v7.2.7. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D22046
2019-03-12 00:18:16 +00:00
Julian Descottes e50ea62cc8 Bug 1524731 - Fix ADB tests in aarch64;r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D21424
2019-02-28 07:07:55 +00:00
Andrew Swan 010e0a37f3 Bug 1504056 Part 1: Refactor AddonManager.getInstallForURL() arguments r=kmag
AddonManagergetInstallForURL() has a number of optional arguments, most
of which are passed infrequently.  Convert them from positional arguments
to a single options object.

Differential Revision: https://phabricator.services.mozilla.com/D18475
2019-02-01 15:23:55 -08:00
Kris Maglione 856fa07b17 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
2019-01-17 10:18:31 -08:00
Julian Descottes 74199a796c Bug 1508956 - Check for ADB runtimes updates periodically;r=daisuke,ladybenko
Depends on D14318. This patch introduces a setInterval to check if
new runtimes have appeared on monitored devices, directly from ADB. This is
one of the scenarios where we don't get an update from ADB. ADB is able to
track devices appearing or disappearing but here we are looking for a new
process, containing a specific string. Out of the box I don't think we can
do anything for this.

Maybe we could ask the devtools server to "broadcast" its presence when it
starts, but at the moment I am not sure how we should implement that.

Differential Revision: https://phabricator.services.mozilla.com/D14324
2018-12-20 09:25:41 +00:00
Daisuke Akatsuka 222a61e84b Bug 1507126: Corresponds to USB device disconnection. r=jdescottes
Depends on D14709

So far, because we supported only single device, we could correspond to
disconnection by following code. From now, because we will support multi
devices, fix the code that changes the status.

Differential Revision: https://phabricator.services.mozilla.com/D14831
2018-12-19 09:02:23 +00:00
Daisuke Akatsuka b93355babb Bug 1507126: Prepare port forwarding for specified device. r=jdescottes
Depends on D14708

Differential Revision: https://phabricator.services.mozilla.com/D14709
2018-12-18 04:38:51 +00:00
Daisuke Akatsuka 9c8c353d8a Bug 1507126: Execute adb shell command to specified device. r=jdescottes
Depends on D14313

Differential Revision: https://phabricator.services.mozilla.com/D14708
2018-12-18 01:44:15 +00:00
Julian Descottes f953c364ec Bug 1508956 - Add unknown runtime entries for devices with no runtime detected;r=daisuke
Depends on D14307. Introduce a placeholder UnknownAdbRuntime extending AdbRuntime.
AdbRuntime implements isUnknown(). This method is used to filter out the unknown runtimes in
webide and about:debugging. (filter will be removed in about:debugging in a patch in the same
queue)

Differential Revision: https://phabricator.services.mozilla.com/D14309
2018-12-19 18:07:37 +00:00
Julian Descottes 0ef5eecfcf Bug 1508956 - Refactor AdbDevice to have an async initialize step;r=daisuke
The model information is duplicated between adb runtime and adb device.
This allows to keep the information in a single place.

Differential Revision: https://phabricator.services.mozilla.com/D14307
2018-12-19 18:06:28 +00:00
Julian Descottes 02c1477472 Bug 1492700 - Fix eslint failure in test_adb.js;r=fix 2018-12-06 10:33:02 -05:00
Julian Descottes 295192bca0 Bug 1492700 - Introduce adb singleton to register adb consumers;r=daisuke
Depends on D13476

Differential Revision: https://phabricator.services.mozilla.com/D13477
2018-12-06 14:57:03 +00:00
Julian Descottes 4f199c24d6 Bug 1492700 - Rename adb.js to adb-process.js and switch to class;r=daisuke
Depends on D13475

Differential Revision: https://phabricator.services.mozilla.com/D13476
2018-12-05 20:51:58 +00:00
Julian Descottes 07f2b9f917 Bug 1492700 - Remove unused observables in commands/track-devices;r=daisuke
Depends on D13474

Differential Revision: https://phabricator.services.mozilla.com/D13475
2018-12-05 20:51:41 +00:00
Julian Descottes 38a808959d Bug 1492700 - Migrate adb/commands/track-devices to a Class;r=daisuke
Depends on D13473

Differential Revision: https://phabricator.services.mozilla.com/D13474
2018-12-05 20:49:24 +00:00
Julian Descottes b0732e04db Bug 1492700 - Split adb.js in several files;r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D13473
2018-12-05 20:47:34 +00:00
Julian Descottes 073cdf0137 Bug 1492700 - Migrate AdbRuntime to a class;r=daisuke
Depends on D12766

Differential Revision: https://phabricator.services.mozilla.com/D12767
2018-11-27 12:53:26 +00:00
Julian Descottes 47dfd8f2ba Bug 1492700 - Extract AdbRuntime out of adb-scanner.js;r=daisuke
Depends on D12765

Differential Revision: https://phabricator.services.mozilla.com/D12766
2018-11-27 12:52:00 +00:00
Julian Descottes 18c0feb7f4 Bug 1492700 - Merge Runtime and FirefoxForAndroidRuntime into AdbRuntime;r=daisuke
Depends on D12764

Differential Revision: https://phabricator.services.mozilla.com/D12765
2018-11-27 12:51:37 +00:00
Julian Descottes d529e6b5d0 Bug 1492700 - Fold FirefoxOnAndroidRuntime.detect in scanner.detectRuntimes;r=daisuke
Depends on D12763

Differential Revision: https://phabricator.services.mozilla.com/D12764
2018-11-27 12:51:14 +00:00
Julian Descottes ffa9050a80 Bug 1492700 - Stop exposing shell() on adb-device because it only forwards to ADB;r=daisuke
Depends on D12762

Differential Revision: https://phabricator.services.mozilla.com/D12763
2018-11-27 12:50:57 +00:00
Julian Descottes 2e9c9a300f Bug 1492700 - adb-device.js should export AdbDevice and not Device;r=daisuke
Depends on D12761

Differential Revision: https://phabricator.services.mozilla.com/D12762
2018-11-27 12:50:45 +00:00
Julian Descottes fb53831f3c Bug 1492700 - Convert Devices.jsm to adb-devices-registry module;r=daisuke
Depends on D12760

Differential Revision: https://phabricator.services.mozilla.com/D12761
2018-11-27 12:50:12 +00:00
Julian Descottes 2ec2804e7a Bug 1492700 - Move Devices.jsm to devtools/shared/adb folder;r=daisuke
Depends on D12759

Differential Revision: https://phabricator.services.mozilla.com/D12760
2018-11-27 12:49:49 +00:00
Julian Descottes 366719d337 Bug 1492700 - Stop sending adb-addon updates from Devices.jsm;r=daisuke
Depends on D12758

Differential Revision: https://phabricator.services.mozilla.com/D12759
2018-11-27 12:49:11 +00:00
Julian Descottes b054cdfd03 Bug 1492700 - Fix ADB stop() in case ADB start() was called several times;r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D12758
2018-11-27 12:48:48 +00:00
Julian Descottes 2848b0a6f8 Bug 1507071 - Explicitly uninstall valence and adbhelper when starting aboutdebugging and webide;r=ochameau
Depends on D11862

Differential Revision: https://phabricator.services.mozilla.com/D11890
2018-11-14 15:33:01 +00:00
Julian Descottes 5c2f850fda Bug 1507071 - Uninstall valence when starting adb-addon module;r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D11862
2018-11-14 15:27:57 +00:00
Julian Descottes a0c9032217 Bug 1490629 - Update adb-addon install() to make source parameter mandatory;r=daisuke
Depends on D11166

Differential Revision: https://phabricator.services.mozilla.com/D11179
2018-11-08 07:29:11 +00:00
Mark Banner 3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Julian Descottes 755a26a5c2 Bug 1494549 - Add a mochitest test for status message;r=ladybenko
Depends on D8334.
In this changeset we also change the way we are reading the preferences
in adb-addon.js to avoid caching the value of the preference the first
time the module is loaded.

This allows the module to follow updates of said preferences without
having to restart Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D8335
2018-10-17 11:10:33 +00:00
Margareta Eliza Balazs e3c9edad06 Backed out 3 changesets (bug 1494549) for multiple failures e.g.: devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_sidebar_usb_status.js CLOSED TREE
Backed out changeset 5729da1055e8 (bug 1494549)
Backed out changeset 7c62247314d7 (bug 1494549)
Backed out changeset bff7126ddd3f (bug 1494549)
2018-10-17 11:52:14 +03:00
Julian Descottes 945a62dd6f Bug 1494549 - Add a mochitest test for status message;r=ladybenko
Depends on D8334.
In this changeset we also change the way we are reading the preferences
in adb-addon.js to avoid caching the value of the preference the first
time the module is loaded.

This allows the module to follow updates of said preferences without
having to restart Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D8335
2018-10-17 07:20:08 +00:00
Belén Albeza d1850f87d4 Bug 1494543 - Part 2: Add model + short runtime name to the sidebar item. r=jdescottes,daisuke
Added new getters to the ADB scanner so our runtime objects have now the information we need.

Note that the UX of the devices in this patch doesn't still match what we had in the mockups (icons don't match, and we also need a circle with a tick), but since we have another bug to handle the CSS in the Sidebar, we can always adapt it there. The information needed to display what is shown in the mockups should be passed in this patch –if I miss anything, give me a shout!

Differential Revision: https://phabricator.services.mozilla.com/D7705
2018-10-16 11:57:45 +00:00