Now what we show a warning message on pages with invalid/no doctype,
a lot of tests were failing because of it.
This patch only adds doctype on all webconsole test pages.
Differential Revision: https://phabricator.services.mozilla.com/D132793
This will allow user to actually inspect the properties of an error object,
which isn't possible at the moment.
This is because we apply a custom format on error, to only print the error
message and the stacktrace, as that's probably what the user is looking for.
But in some cases, it might still be valuable to be able to check the object
properties.
In order to do that, we add a new "customFormat" prop in Reps and ObjectInspector,
which need to be explicitely set if the consumers do want the custom format.
In the console, it will always be the case, except when the object is
in a console.dir call.
This will also open the door to have a way to switch between the custom format
and the regular view in the future.
Jest tests are modified to take this new prop into account, and the existing
console.dir mochitest is modified to add a specific case about error objects.
Differential Revision: https://phabricator.services.mozilla.com/D70392
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
- 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