To make $0 autocompletion work, we need to pass the current
selectedNode actor from the frontend, so we can retrieve the
object reference later.
For $_, we need the webconsole actor reference to be able
to retrieve the last input result.
Since the list of parameters of JsPropertyProviders was
getting a bit long, we transform them in an object so it's
more legible on the consumer side.
Mochitests are added for both helpers to ensure this work
as expected.
Differential Revision: https://phabricator.services.mozilla.com/D11866
This patch removes the following functions:
* nsContentUtils::IsCustomElementsEnabled()
* CustomElementRegistry::IsCustomElementEnabled(JSContext* aCx, JSObject* aObject)
* CustomElementRegistry::IsCustomElementEnabled(nsIDocument* aDoc)
and all references of the pref.
Depends on D11183
Differential Revision: https://phabricator.services.mozilla.com/D11249
This patch removes the following functions:
* nsContentUtils::IsCustomElementsEnabled()
* CustomElementRegistry::IsCustomElementEnabled(JSContext* aCx, JSObject* aObject)
* CustomElementRegistry::IsCustomElementEnabled(nsIDocument* aDoc)
and all references of the pref.
Depends on D11183
Differential Revision: https://phabricator.services.mozilla.com/D11249
This patch moves all the logic we currently have
baked-in JsTerm to handle the autocompletion data:
- deciding to fetch from the server or the cache
- handling concurrent requests
- managing the cache.
This is now done through dedicated Redux actions and reducers.
In the JsTerm, where the autocompletePopup still lives, we
handle those data changes in componentWillReceiveProps.
Some tests were modified in order to pass with these changes.
Differential Revision: https://phabricator.services.mozilla.com/D11454
In some cases, the setTimeoutIfNeeded function can
be called before the store is initialized, which is
causing an exception when we try to dispatch the
messages.
With this patch, we check if the store is not ready,
and re-schedule a timeout so messages can be handled
properly when the store is ready.
Differential Revision: https://phabricator.services.mozilla.com/D11044
Now all targets are considered as remote, so isRemote attribute is misleading.
Remote means that we are going through the RDP protocol to debug the target
and we now always do. If some callsite wants to do something special for local tabs
it is better to read target.isLocalTab attribute.
MozReview-Commit-ID: IYlj0wO02PO
Differential Revision: https://phabricator.services.mozilla.com/D11009
This patches fixes a bug where hitting Cmd+F while
the filter input of the console was focused was
triggering codeMirror search addon, displaying the
search UI *in* JsTerm.
To prevent this, we add the ability for any consumer
of the Editor component to disable the search addon.
In the editor, in such case, we simply don't initialize
the event listeners that activate the search addon.
A test case is added to ensure we don't regress this.
Differential Revision: https://phabricator.services.mozilla.com/D11037
This patch makes use of the new renderStacktrace
prop in Reps to render Error objects stacktraces
using the shared Stacktrace component.
This way we are showing stacktraces in a consistent
way, and as a bonus, we support sourcemap in Error
object.
Depends on D9922
Differential Revision: https://phabricator.services.mozilla.com/D9923
This is an attempt to fix the intermittent on this test.
It looks like we were setting the listeners on some events
after the request message was received, which might have
made us missed some events.
We take this bug as an opportunity to do some cleanup
on the test.
Differential Revision: https://phabricator.services.mozilla.com/D9075
Fixes contrast issue of status code in webconsole by creating and importing StatusCode.css file into webconsole/index.html which contains the rules for styling the Status Code. Also imports the StatusCode.css file to netmonitor.css since status code styles are removed from RequestList.css.
Differential Revision: https://phabricator.services.mozilla.com/D9353
This changeset updates all the test that were wrongly using ok() and wanted to
use is() AND for which the assert is still passing without any modification
required.
Differential Revision: https://phabricator.services.mozilla.com/D8739
This patch adds localization for the WebReplay Jump icon, and uses
the same terminology as the one used in the context menu that triggers
the same action.
The Jump button was used in-place of the existing level icons (Error, Warning, …),
and was only displayed when the message was hovered. We now ensure the
level icon is always visible and that we only show the Jump icon when the
message is hovered.
Finally, the button was styled targeting the title attribute in CSS, which
seemed a little brittle. We now use a dedicated class which should
be safer and more future proof.
Differential Revision: https://phabricator.services.mozilla.com/D8533
Since we do now have the list of Javascript keywords, we
import it from webconsole autocomplete service and send
the keywords matching the current expression to the client.
Differential Revision: https://phabricator.services.mozilla.com/D8709
The log we currently receive are not really
actionable (we are using ok, so we don't know
what the received value actually is). Switching
to is should give us what the value is when the
test fails, which might help us fix the failure.
Differential Revision: https://phabricator.services.mozilla.com/D9270
The test is failing because the result of the last
evaluation is received before we expect it. Since we
had a 500ms delay between each promise resolution, it
might happen than the time it takes to execute the
command execedes this delay, making our expected message
order wrong.
Increasing the delay between each Promise resolution seems
to resolve the issue, although it makes the test a lot longer too.
This is why a new test was created to only cover the concurrent
await case.
Differential Revision: https://phabricator.services.mozilla.com/D8698
When sending a command to the server, a timestamp is
computed before evaluating the string, and is then
sent back to the client in the packet.
However, if top-level await, or somme :commands, the
evaluation takes more time, which means the timestamp
is now innacurate.
For those cases, we update the timestamp before sending
the packet to the client.
Differential Revision: https://phabricator.services.mozilla.com/D8734
This patch turns property access that would result in
Syntax error (e.g. `x.data-test`) into element access
(e.g. `x["data-test"]`) when accepting a completion
value in the console input.
In order to do that, we use Reflect to parse a custom
expression where we try to define the property the user
is going to accept. If this throws, this means we need to
modify the input into an element access.
A test is added to make sure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D8952
Before this patch, in developer console, enabling persist log, message displayed "Navigated to" ..something was not distinguishable from console.log messages. Now specific class for navigation marker is added.
Differential Revision: https://phabricator.services.mozilla.com/D7040
A function was missing in the serviceContainer stub,
and the console.trace with params test needed a
Provider wrapper to work with the latest changes made
to the ObjectInspector.
Differential Revision: https://phabricator.services.mozilla.com/D8861
This patch moves the parserService from the toolbox,
which isn't accessible in the case of the Browser Console,
to the console itself.
A lightweight test is added to ensure top-level await is
supported in the browser console.
Differential Revision: https://phabricator.services.mozilla.com/D8816
JsTerm's focus function was called in clearOutput, which
we call when navigating to a new page (if Persist Logs is
not checked).
This means that we were forcing the JsTerm to be focused
each time the user navigated while having the console open.
This behavior, can be annoying, or at worst, if you're
debugging a focus issue in your content page, completely maddening.
The fix is striaghtforward: do not call focus in clearOutput.
A test is added to make sure we don't regress this.
Differential Revision: https://phabricator.services.mozilla.com/D8701
I also made its argument mandatory, so that later in root spec we can use a non-nullable number.
MozReview-Commit-ID: BUPgI1ww1gC
Differential Revision: https://phabricator.services.mozilla.com/D8141
Instead of requiring all TargetFactory.forRemoteTab to compute isBrowsingContext flag,
we can compute it out of the actor's form as we know which types are browsing context
inherited or not.
MozReview-Commit-ID: H5zLo5nZSm6
Differential Revision: https://phabricator.services.mozilla.com/D7413