This test was checking the HTTPinspector by directly calling a WebConsoleClient function
which is no longer used in console code.
MozReview-Commit-ID: LxjhhO2rB0W
--HG--
extra : rebase_source : 411c18a62ae97102907b35f5d5e26749b48047f5
When web-ext (the nodejs CLI tool which is often used to develop a WebExtension)
starts Firefox with the --start-debugger-server CLI parameter,
devtools/shims/devtools-startup.js creates a DebuggerServer instance in an
isolated separate module loader, marked invisible to the debugger so that
we can use it to debug the regular DebuggerServer instance (loaded internally
when the user is going to open one of the developer tools for the first time).
Right after this "debugger invisible" DebuggerServer instance is started,
web-ext connects to the debugger server and interacts with the RDP actors
(e.g. to list the addons actors, install the extensions temporarily, reload
the extensions etc.), and as a side-effect of connecting to the WebExtensions
RDP actor, the "devtools/server/child.js" module is going to be loaded,
and it will be loaded in the main process if the webextensions are not
configured to run in a separate extension child process
(on the contrary it would be loaded in a child process when the
the extensions are running in oop mode).
If the regular developer tools have been already opened by the user (e.g.
when --jsconsole has been passed to the Firefox command line, which
is what happens when web-ext is executed with the --bc command line option),
the DebuggerServer is initialized and the browser actors added to it,
on the contrary when the "devtools/server/child.js" module initializes
the DebuggerServer module for the first time, it doesn't add the browser actors
to it and so the DebuggerServer instance is going initialized but it will be
missing the createRootActor attribute (which is expected if the DebuggerServer
instance is initialized in a child process, but it is unexpected when the DebuggerServer
instance is the one that serves the main process).
MozReview-Commit-ID: GE51X14HfHJ
--HG--
extra : rebase_source : 65e3a0c02f8a419dc8588184dff56d3c07e430a9
In Bug 1404917, we introduced loading the
/devtools/client/netmonitor/test/shared-head.js
file in devtools/client/webconsole/new-console-output/test/mochitest/head.js.
But, the shared file is not declared in browser.ini,
which ends up making variabled from head.js inaccessible,
and some tests that relies on them to fail.
This was not picked up by TRY because the netmonitor tests
are ran before the console's one, which loads
devtools/client/netmonitor/test/shared-head.js .
MozReview-Commit-ID: 80OOUHwjnWL
--HG--
extra : rebase_source : 70a21db32ab3aee38946cc962bede9689a86045b
Once the test was migrated, it was failing because we did not show
error messages for invalid cd() calls.
There was a missing part in the evaluation result prepare message, which
this patch fixes. A stub and a mocha test were added to make sure we do
display those kind of messages.
MozReview-Commit-ID: FcTsP2pr3vD
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-609872-cd-iframe-child.html => devtools/client/webconsole/new-console-output/test/mochitest/test-cd-iframe-child.html
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-609872-cd-iframe-parent.html => devtools/client/webconsole/new-console-output/test/mochitest/test-cd-iframe-parent.html
extra : rebase_source : 8fc82b71875cebfed0e318d1eba8b5332dc650c7
Response content should only be fetched whenever it is strictly needed
as it is the response body. A possibly very large string.
So, netmonitor UI should only retrieve it when users select the Response Panel
or do any other action that require having access to it (like "Copy response"
context menu).
MozReview-Commit-ID: CtpJ8PKsCsm
--HG--
extra : rebase_source : 4540f641e511b2199436ad5c2edccda8aff37634
Response content should only be fetched whenever it is strictly needed
as it is the response body. A possibly very large string.
So, netmonitor UI should only retrieve it when users select the Response Panel
or do any other action that require having access to it (like "Copy response"
context menu).
MozReview-Commit-ID: CtpJ8PKsCsm
--HG--
extra : rebase_source : f3d7aea2b752377891bef6ea466e140e93fe8b8b
The test already exists with a different name (browser_webconsole_context_menu_copy_entire_message).
MozReview-Commit-ID: 9NmXosnAVAi
--HG--
extra : rebase_source : 2c690ac0c5e3685d3c05c11e5cb4524df6498a57
We take this as an opportunity to add a jsterm helper function to set its value and
wait for completion, and use it in a test where we did the same thing.
This also copies the openDebugger helper from the old frontend head.js .
The test still uses the old debugger, since it will be fixed in a specific bug
for all the console tests.
MozReview-Commit-ID: AKB3CBY8GPv
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_autocomplete_in_debugger_stackframe.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_autocomplete_in_debugger_stackframe.js
extra : rebase_source : d85b91f8385821975cb3b3f4338eac0dd1c121cf
This bug also renames the support file, and create a dedicated one for the child iframe.
An helper method is created to only wait for a single message with given text in it, as
well as returning an array of matched message in waitForMessages (we were returning the
result of setting the listener, which I doubt is useful for any test.
MozReview-Commit-ID: Gz7zqX825oR
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_autocomplete_crossdomain_iframe.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_autocomplete_crossdomain_iframe.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/test-bug-989025-iframe-parent.html => devtools/client/webconsole/new-console-output/test/mochitest/test-iframe-parent.html
extra : rebase_source : aeef146dbe78e375e259cba96c3ab96287cb076a
There are xpcshell tests to verify that the appropriate distrust flag is set
upon reaching an affected end entity certificate; this test checks that the
distrust flag prints a warning to console.
MozReview-Commit-ID: OMG246WOOT
--HG--
rename : devtools/client/webconsole/test/browser_webconsole_certificate_messages.js => devtools/client/webconsole/test/browser_console_certificate_imminent_distrust.js
extra : rebase_source : a5fed5457e7789e742ee461b988463b81cd2c214
The self-XSS protection was broken since the switch to an HTML document. We
went from using the XUL <notificationbox> tag to a simple div.
But notificationbox has method that a simple div has not, and when trying
to display the warning message, there was an error in terminal.
This patch uses the NotificationBox React component and create it when needed.
It also rename and enable the test that ensures that XSS is working.
MozReview-Commit-ID: BhxIqf7gzAG
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_autocomplete_and_selfxss.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_selfxss.js
extra : rebase_source : ca6af7ae77bc5a6d86581096eafcb7424f21d51c
extra : source : 42734fcb0276ee0e395cb4a35ce790644ea2efc8
This was making browser_webconsole_filters.js fail on verify mode, and
could potentially cause other issues in the future.
MozReview-Commit-ID: 9syLDYAjm6S
--HG--
extra : rebase_source : 67b4645834f0700c52da7355e4834f8da308515e
This allow us to have a faster first meaningful render for the user.
The other messages get rendered after ConsoleOutput mounting.
MozReview-Commit-ID: KIptXsLmTiA
--HG--
extra : rebase_source : da4ff5b1d1027f4c1b83fe6bbf7cf81963e34558
Previously, we were only waiting for NewConsoleOutputWrapper init function to
be done to consider the console loaded. From a user standpoint, it makes more
sense to see it loaded when it do render something to screen.
This patch only resolve the init function when the consoleOutput component is
mounted and painted.
MozReview-Commit-ID: 6tJ0s4HS0yw
--HG--
extra : rebase_source : 74eefa97537d2e1493f21ef7cc68cdbc4040a3cc
Move clear jsterm history to openNewTabAndConsole.
Switch openNewTabAndConsole to an async function (instead of using Task.async).
Switch openNewTabAndConsole consumers to async as well.
MozReview-Commit-ID: KgMXowGYIJ5
--HG--
extra : rebase_source : 1406adc1e0afca07f92118370b402e314cb51fc1
The test was very long and tested different bugs.
Splitting it make all the test case clearer.
MozReview-Commit-ID: 4z45RE3eJoC
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_autocomplete_keys.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_autocomplete_array_no_index.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_autocomplete_keys.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_autocomplete_escape_key.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_autocomplete_keys.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_autocomplete_inside_text.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_autocomplete_keys.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_autocomplete_nav_and_tab_key.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_autocomplete_keys.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_autocomplete_return_key.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_autocomplete_keys.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_autocomplete_return_key_no_selection.js
extra : rebase_source : c9c12ee909d843bf5f3b9c1312057c5552e23df8
The test ensures that packet are sent for falsy console.assert calls,
and that no packet are sent for truthy console.assert.calls, using a timeout.
Mochitest and support files are removed from the new frontend.
MozReview-Commit-ID: C9QpXfBySLo
--HG--
extra : rebase_source : 10101ebd0f300e6794b37db7f19c41c936683d7d
The %c marker is only valid for the first argument, so if we find ourselves
between two parameters with user-styled messages, it means we should respect
the original formatting.
MozReview-Commit-ID: 4GORZyvvxRN
--HG--
extra : rebase_source : 11adda5e3a18a7e52a02bdbcf1a18a5bfee6ee2c
We were getting the filter state after dispatching the action, which made
all the filters to have an enabled state. Getting the state before dispatching
fixes the issue.
This patch enhance the Service mock in order to have a better idea of what is going on
with prefs. This allow us to introduce some tests to make sure prefs are updated in
reaction to given actions.
MozReview-Commit-ID: Byay0TwF25I
--HG--
extra : rebase_source : fd9e022c872783e2c6baa6ee0be5bf98f7eced78