Commit Graph
261 Commits
Author SHA1 Message Date
Alexandre Poirot 3e32f9edd3 Bug 1506546 - Refactor about:debuggings. r=yulia,jdescottes
I did a dedicated patch for converting both about:debuggings as it is slightly more
complex as we have to tweak redux data, wrappers, mocks.
This patch also convert a manual "reload" request being done by about:debugging
and instead use protocol.js front to do it.
Also, I moved isLegacyTemporaryExtension to the front as it depends on accessing the form
and it should be better to keep form processing to the fronts, if possible.

MozReview-Commit-ID: 16qZkuCBp9b

Depends on D12576

Differential Revision: https://phabricator.services.mozilla.com/D12577
2018-11-27 19:17:11 +00:00
Andreea Pavel 2e1438afd5 Backed out 7 changesets (bug 1506546) fo failing devtools at devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_system_addons.js on a CLOSED TREE
Backed out changeset fbe3f2183f32 (bug 1506546)
Backed out changeset 8972a2f14015 (bug 1506546)
Backed out changeset 00fe26234b3d (bug 1506546)
Backed out changeset 7d8e650e25c2 (bug 1506546)
Backed out changeset a293a37483b9 (bug 1506546)
Backed out changeset 7b75250a4f12 (bug 1506546)
Backed out changeset 23ad29cb776e (bug 1506546)
2018-11-27 14:37:14 +02:00
Belén Albeza 01e18ace08 Bug 1479746 - (part 2) Add test for routes. r=jdescottes,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D12316
2018-11-27 12:08:04 +00:00
Belén Albeza 849b1604bb Bug 1479746 - Add router-like feature to navigate via URL bar. r=jdescottes,daisuke
I'm sorry this is just one commit, I should have split it :( I will submit tests in another patch.

- Vendored [react-router-dom](https://www.npmjs.com/package/react-router-dom) library.
- Removed `getSelectedPageComponent` from `App` component and changed it to use React Router's `Route` components.
- Made the sidebar links to point to proper URL's. Thanks to this we don't need a lot of code/props we were passing to these items to select the proper page.

Some considerations over the implementation:

- React Router's `Switch` is used to wrap our routes, to ensure only one is rendered. Right now is not strictly necessary, but I think it helps to clarify that the routes are _not_ nested.
- We need to pass a `key` prop to the `RuntimePage` rendered in the route, so when we change the actual runtime shown, the page gets updated.
- The action `selectPage` gets called on `componentWillMount`, so it doesn't change state while rendering.
- When we reload the page and a device runtime is selected, we redirect to "This Firefox" page.

(Click on this GIF to see navigation 👇)
{F1100903}

I'm sorry this has taken this long, it has been a bit of a headache 🙏

Differential Revision: https://phabricator.services.mozilla.com/D12147
2018-11-27 12:03:12 +00:00
Alexandre Poirot b607a11eb5 Bug 1506546 - Refactor about:debuggings. r=yulia,jdescottes
I did a dedicated patch for converting both about:debuggings as it is slightly more
complex as we have to tweak redux data, wrappers, mocks.
This patch also convert a manual "reload" request being done by about:debugging
and instead use protocol.js front to do it.
Also, I moved isLegacyTemporaryExtension to the front as it depends on accessing the form
and it should be better to keep form processing to the fronts, if possible.

MozReview-Commit-ID: 16qZkuCBp9b

Depends on D12576

Differential Revision: https://phabricator.services.mozilla.com/D12577
2018-11-27 11:23:24 +00:00
Julian Descottes b84b89e88e Bug 1497457 - Remove transportDetails from runtimeDetails;r=daisuke,ladybenko
Depends on D12095. Now that we pass a remoteId to open about:devtools-toolbox, we actually don't need transportDetails

Differential Revision: https://phabricator.services.mozilla.com/D12097
2018-11-27 10:23:24 +00:00
Julian Descottes d0d97d61ad Bug 1497457 - Clear clients stored in remote client manager after tests;r=daisuke,ladybenko
Depends on D12040. If we don't cleanup the clients after the test, some tests may leak.

Differential Revision: https://phabricator.services.mozilla.com/D12095
2018-11-27 10:22:40 +00:00
Julian Descottes 6398bfec53 Bug 1497457 - Reuse clients from remote client manager in about:devtools-toolbox;r=daisuke,ladybenko
Depends on D12039

Differential Revision: https://phabricator.services.mozilla.com/D12040
2018-11-27 10:22:31 +00:00
Julian Descottes 55c2f9171c Bug 1497457 - Test runtime is still connected after about:debugging reload;r=daisuke,ladybenko
Depends on D11993

Differential Revision: https://phabricator.services.mozilla.com/D12039
2018-11-27 10:17:55 +00:00
Julian Descottes 8960039ce5 Bug 1497457 - Introduce remote client manager to persist connected remote clients;r=daisuke,ladybenko
Depends on D11992

Differential Revision: https://phabricator.services.mozilla.com/D11993
2018-11-27 10:14:50 +00:00
Daniel Varga 2338233c05 Backed out 7 changesets (bug 1497457) for devtools failure at devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_sidebar_usb_runtime_refresh.js on a CLOSED TREE
Backed out changeset d3b46f3a0306 (bug 1497457)
Backed out changeset bd490139b395 (bug 1497457)
Backed out changeset b2830500918c (bug 1497457)
Backed out changeset 9923755ee205 (bug 1497457)
Backed out changeset f2a39a18f2f6 (bug 1497457)
Backed out changeset 95365a2d7470 (bug 1497457)
Backed out changeset 0e93acc09952 (bug 1497457)
2018-11-27 00:59:34 +02:00
Julian Descottes 3030eab6a9 Bug 1497457 - Fix aboutdebugging systemaddons test after signature change; r=fix 2018-11-26 22:18:18 +01:00
Julian Descottes 1c27d85b74 Bug 1497457 - Remove transportDetails from runtimeDetails;r=daisuke,ladybenko
Depends on D12095. Now that we pass a remoteId to open about:devtools-toolbox, we actually don't need transportDetails

Differential Revision: https://phabricator.services.mozilla.com/D12097
2018-11-26 19:57:35 +00:00
Julian Descottes 5537812de2 Bug 1497457 - Clear clients stored in remote client manager after tests;r=daisuke,ladybenko
Depends on D12040. If we don't cleanup the clients after the test, some tests may leak.

Differential Revision: https://phabricator.services.mozilla.com/D12095
2018-11-26 19:57:02 +00:00
Julian Descottes 1377a1398b Bug 1497457 - Reuse clients from remote client manager in about:devtools-toolbox;r=daisuke,ladybenko
Depends on D12039

Differential Revision: https://phabricator.services.mozilla.com/D12040
2018-11-26 19:55:33 +00:00
Julian Descottes 7d098bfc50 Bug 1497457 - Test runtime is still connected after about:debugging reload;r=daisuke,ladybenko
Depends on D11993

Differential Revision: https://phabricator.services.mozilla.com/D12039
2018-11-26 19:54:15 +00:00
Julian Descottes 6f2105e279 Bug 1497457 - Introduce remote client manager to persist connected remote clients;r=daisuke,ladybenko
Depends on D11992

Differential Revision: https://phabricator.services.mozilla.com/D11993
2018-11-26 19:53:47 +00:00
Julian Descottes 6708e0ad1f Bug 1488499 - Hide system addons in aboutdebugging-new if showSystemAddons pref is false;r=ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D12462
2018-11-26 19:02:23 +00:00
Ola Gasidlo b6e9b093e5 Bug 1509301. Adding contact info to README.md r=ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D12894
2018-11-26 12:03:45 +00:00
Julian Descottes aa1daa9cba Bug 1508307 - Rollback getDeviceDescription change and add test for this-firefox mock;r=daisuke
Changed my mind about getDeviceDescription :)
I think it is better to remain explicit and to always say which properties we are exporting.
I also added a small test for the this-firefox mock to avoid future regressions.

Differential Revision: https://phabricator.services.mozilla.com/D12318
2018-11-23 08:11:41 +00:00
Julian Descottes 8c849bcd42 Bug 1500005 - Add types file for aboutdebugging debug-target;r=ladybenko,daisuke
Depends on D11780

Differential Revision: https://phabricator.services.mozilla.com/D11781
2018-11-21 07:24:00 +00:00
Julian Descottes d5d43fa654 Bug 1500005 - Stop storing worker front in aboutdebugging state;r=daisuke
Depends on D11780

Differential Revision: https://phabricator.services.mozilla.com/D12512
2018-11-21 07:20:28 +00:00
Julian Descottes 2a51ee9bea Bug 1500005 - Add dedicated types folder for aboutdebugging types;r=ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D11780
2018-11-21 07:15:07 +00:00
Julian Descottes 590b4335cd Bug 1506056 - Rename runtimeDetails.client to clientWrapper;r=daisuke
Note that I fixed the worker bug at the same time. We can keep your other bug to add a test.

Differential Revision: https://phabricator.services.mozilla.com/D12007
2018-11-21 06:51:56 +00:00
Julian Descottes 4aa0233cb1 Bug 1493968 - Wait for requests to finish in aboutdebugging navigate test;r=ladybenko
Still not sure what is the root issue here, but none of the regular connect tests are failing so I think the issue occurs when we remove tabs in the second step.

Differential Revision: https://phabricator.services.mozilla.com/D12332
2018-11-20 15:38:27 +00:00
Daisuke Akatsuka e1a2af0ac1 Bug 1497449: Introduce deviceName into getSystemInfo(). r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D11748
2018-11-16 04:30:29 +00:00
Alexandre Poirot e1d0ca7c1b Bug 1506548 - Return WorkerTargetFront from listWorkers instead of form. r=yulia
MozReview-Commit-ID: 4CBQNwC8tKq

Depends on D11762

Differential Revision: https://phabricator.services.mozilla.com/D11763
2018-11-15 10:23:50 +00:00
Julian Descottes cbf547acf8 Bug 1503914 - Add mochitest to check that USB runtimes are not disconnected on refresh;r=daisuke
Depends on D11798

Differential Revision: https://phabricator.services.mozilla.com/D11799
2018-11-14 03:57:38 +00:00
Julian Descottes cccf567a09 Bug 1503914 - Stop disconnecting all devices when clicking on Refresh Devices;r=daisuke
Depends on D11663

Differential Revision: https://phabricator.services.mozilla.com/D11798
2018-11-14 03:44:00 +00:00
Julian Descottes 94a91c93f2 Bug 1506581 - Add mochitest to test updates of the addon list for USB runtimes;r=daisuke
Depends on D11651, Depends on D11643

Differential Revision: https://phabricator.services.mozilla.com/D11663
2018-11-13 18:13:35 +00:00
Julian Descottes 893efdce3f Bug 1506581 - Listen to addons list changes on DevTools client instead of AddonManager;r=daisuke
Depends on D11644

Differential Revision: https://phabricator.services.mozilla.com/D11651
2018-11-13 06:46:41 +00:00
Julian Descottes 64c32817a5 Bug 1495381 - Show Manifest URL for addon target only with This Firefox;r=daisuke
Depends on D11643

Differential Revision: https://phabricator.services.mozilla.com/D11666
2018-11-14 17:15:18 +00:00
Julian Descottes 3ce5df1dad Bug 1495381 - Create debug-target-pane test for USB runtimes;r=daisuke
Depends on D11642

Differential Revision: https://phabricator.services.mozilla.com/D11643
2018-11-13 06:43:39 +00:00
Julian Descottes 7e5ce39359 Bug 1495381 - Create a UsbMocks helper to simplify USB tests;r=daisuke,ladybenko
Depends on D11641

This adds a wrapper that aims to simplify USB tests.

Differential Revision: https://phabricator.services.mozilla.com/D11642
2018-11-14 16:30:06 +00:00
Julian Descottes 27a7fecb58 Bug 1495381 - Fix USB runtime test and client-wrapper mock;r=daisuke
Depends on D11640

Leftover from the previous bug that introduced the testing solution for USB runtimes.

Differential Revision: https://phabricator.services.mozilla.com/D11641
2018-11-13 04:56:10 +00:00
Julian Descottes 46258a6184 Bug 1495381 - Enable extension debugging for USB devices;r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D11640
2018-11-13 06:57:25 +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 1ae10200fb Bug 1505765 - Add documentation to test remote dbg changes on Android;r=ladybenko,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D11319
2018-11-12 12:12:35 +00:00
Julian Descottes ba192bfff2 Bug 1505285 - Add mochitest to check that aboutdebugging shows tab favicons;r=ladybenko
Depends on D11161

Differential Revision: https://phabricator.services.mozilla.com/D11162
2018-11-09 17:30:38 +00:00
Julian Descottes 1029bdc9d8 Bug 1497917 - Mock runtimes and client for USB tests;r=ladybenko,daisuke
Depends on D10096

Adds a first test that simply connects to a USB runtime (but also has to
mock this-firefox runtime).

Differential Revision: https://phabricator.services.mozilla.com/D10097
2018-11-09 09:41:41 +00:00
Julian Descottes d0b135a607 Bug 1497917 - Extract client creation to RuntimeHelper module;r=ladybenko,daisuke
Depends on D10095

The initial intent was to extract the logic to create the USB clients
so that it could be mocked in our tests. However since USB clients
share most of their logic with network clients, it did not make sense
to extract USB without network. And once you have USB and network, there
is no good reason to keep local client out.

I don't think "runtime-helper.js" is a good module name here. The role
of this module is to build clients for runtimes, but at the same time
it is just a static helper. Could not find a good name, and we already
have inconsistent module names in our modules/ folder so I did not want
to introduce something like RuntimeClientBuilder of RuntimeClientProvider
etc...

One of the consequences is that once we start mocking this helper (in the
next patch) we will also have to mock the this-firefox runtime. It has
advantages and disadvantages but I think we can live with this for now.

Differential Revision: https://phabricator.services.mozilla.com/D10096
2018-11-09 09:40:41 +00:00
Julian Descottes 3532dd11b1 Bug 1497917 - Add ClientWrapper to interact with DevTools client in aboutdebugging;r=ladybenko,daisuke
Depends on D9801

This a preparatory work that ensures that all the calls to DevTools client are made
through a wrapper called ClientWrapper. I initially tried having a static "client" helper
but the test code was really hard to follow. Keeping a "client-like" object makes this
easier.

Differential Revision: https://phabricator.services.mozilla.com/D10095
2018-11-09 09:39:47 +00:00
Julian Descottes f747bd6446 Bug 1497917 - Add USB runtime mock and sidebar test for USB runtimes;r=ladybenko,daisuke
I want to go through a first round of review before moving forward. If we agree
on the basic approach in this patch two things:
- I want to complexify things by adding a test that connects to a runtime and shows
  the runtime page (to exercise more than this very simple use case)
- I will probably separate the loader modification in a separate bug, will open a RFC to
  discuss it and will use a workaround for now in our code so that we are not blocked

Overall I don't want to start adding too many features to this mocking solution, I would
rather wait until the tests help us understand what fits best our needs.

Differential Revision: https://phabricator.services.mozilla.com/D9801
2018-11-09 09:34:25 +00:00
Julian Descottes 4c95572500 Bug 1497917 - Add test helper to new aboutdebugging to mock require calls;r=ladybenko,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D10888
2018-11-09 09:30:09 +00:00
Daisuke Akatsuka ea00d5338a Bug 1497448: Update usb devices when the debugger client of usb was closed. r=jdescottes
Depends on D9889

Differential Revision: https://phabricator.services.mozilla.com/D9890
2018-11-09 02:23:14 +00:00
Belén Albeza c326d22861 Bug 1493695 - Extract renderField method to dedicated component. r=jdescottes,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D11059
2018-11-08 05:30:41 +00:00
Julian Descottes 20fc04c9ff Bug 1493698 - Add l10n localization helper for new about:debugging;r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D10704
2018-11-06 18:38:02 +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
Julian Descottes a42f450629 Bug 1490629 - Set about:debugging as install source for ADBextension;r=rpl,daisuke
Similar to what we do from WebIDE (where we pass "webide").
Let me know if the string is ok here or if you would prefer something else.

Differential Revision: https://phabricator.services.mozilla.com/D11166
2018-11-08 07:29:09 +00:00
Julian Descottes 02985432fb Bug 1504202 - Update aboutdebugging-new README.md;r=ladybenko,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D10714
2018-11-07 17:32:32 +00:00