Since we may now have ObjectFronts in console messages as
well as in evaluation results, we need to make the webconsole
consume those fronts.
And because we have ObjectFronts, we can now avoid using the
DebuggerClient to release the actors, and simply call front.release.
This simplifies how we track created object, since we only need
to release "root" objects, which will also cause all the sub-fronts
to be released as well. Sadly, this was causing some test failures
in mochitests because some objects were released while the connection
was closed, so we now emit an event when all the actors are released,
which we track in tests to wait until everything is over.
As a side effect, we need to change how we handle stubs for
our tests, since fronts have cycical references and can't
be serialized directly. In order to handle that, we serialize
all front as a plain object with a `_grip` property, containing
the object grip. In the stub file, we don't expose the grips
directly, but Maps that contain those stubs "rehydrated": when
a _grip object is encountered, it's turned back into a front.
Differential Revision: https://phabricator.services.mozilla.com/D54509
Since __dirname returns an OS sensitive paths,
the require-hacker was not finding modules
because of mixed usage of slashes and anti-slashes.
This is fixed by forcing the path in getModule
to only use slashes.
Differential Revision: https://phabricator.services.mozilla.com/D55241
This allows us to not have to reach for the server
again from the client to get all the data we need
to render the table.
We still need to keep the old function to handle
connections to older servers. We'll use Bug 1597955
in Firefox 74 to clean the bits we don't need anymore.
A test is added to ensure the bug is fixed and we don't
regress; stubs are updated.
Differential Revision: https://phabricator.services.mozilla.com/D53962
The function is only used in tests, which is a bit concerning
as we should test the actual function being used (evaluateJSAsync).
Differential Revision: https://phabricator.services.mozilla.com/D52331
The tests are rewritten so we only have one test per
stub type. The stubs can be re-generated by passing
the --setenv WEBCONSOLE_STUBS_UPDATE=true arg when running
mach test.
We take this as an opportunity to not store the Messages
directly, but we generate them programmatically, which would
still reveal a bug as most of the test import messages.
Since we're doing that, some messages aren't localized, so
we need to add them to the L10N fixtures we have (which is
revamped a bit as getStr was getting too complex).
Differential Revision: https://phabricator.services.mozilla.com/D51596
The LongStringClient is removed and we replace its
usage with LongStringFront instead.
This require a few variable/function renaming, as
well as updating the mocks we use in node tests.
Switch usage to LongStringFront instead.
Differential Revision: https://phabricator.services.mozilla.com/D50579
The object-client.js file is now a proper protocol.js front,
but is still named after a client.
This is confusing, so we rename and move the file next to other
fronts, and update all consumers to the new terminology.
Differential Revision: https://phabricator.services.mozilla.com/D49878
There was a warning message displayed to indicate that
the stylesheets where parsed again for checking errors,
and that in order to see errors for CSS modified in
Javascript, the tab should be reloaded.
The jargon used there was confusing, and also this was
more a notice than an actual warning message.
In order to remove confusion, we don't emit this message
anymore, but add a title to the CSS filter button when
it's disabled. The sentence is reworded to be simpler
to understand.
Differential Revision: https://phabricator.services.mozilla.com/D44118
The onboarding UI is displayed on top of the Editor.
A dismiss button hides it forever (this is handled via
a pref that is set to false when clicking the button).
We take this as an opportunity to polish the Editor UI/wording
a bit.
Differential Revision: https://phabricator.services.mozilla.com/D43621
The onboarding UI is displayed on top of the Editor.
A dismiss button hides it forever (this is handled via
a pref that is set to false when clicking the button).
We take this as an opportunity to polish the Editor UI/wording
a bit.
Differential Revision: https://phabricator.services.mozilla.com/D43621
The DataProvider is what allows us to use the Netmonitor
components. The way it was created before was non optimal,
as it were inside an enhancer, and was then attached to
a proxy.
As we may now have multiple proxies, this could cause
some issue.
So we take this as an opportunity to create the DataProvider
in the WebConsoleWrapper (where live the actions we need for
the provider), and remove the now unused function on the
WebConsoleConnectionProxy.
Differential Revision: https://phabricator.services.mozilla.com/D41354
- mochitest folder is renamed browser.
- unit folder is rename xpcshell.
- all the file and folder for mocha are put in a node folder.
We take this as an opportunity to revist our stub-generating
mochitests.
Previously we had 2 tests for each kind of stubs, one for check,
the other one for updating.
It was not ideal when you wanted to update all the stubs at once
because you add either to mention every 5 files, or unskip the
update test files.
We now merge the update and the check files in a single test.
By default, the test that the stubs are up to date, and if you
pass the --setenv WEBCONSOLE_STUBS_UPDATE=true param, it will
update the stubs.
This allow us to move the function that actually generate the stub
in the test file, and have a helper file for multi-purpose functions.
Because these tests are failing on TRY, let's disabled them so we
can land the test re-organization (we'll re-enable them in Bug 1572667).
Differential Revision: https://phabricator.services.mozilla.com/D41344