We weren't doing the right transform for cached messages, and thus
we weren't creating the ConsoleMessage with the correct properties.
This is now fixed and a mocha test is added to make sure we don't
regress on this.
MozReview-Commit-ID: ACOCPF06GK2
--HG--
extra : rebase_source : 029fe31b7343f4032ea48a8629bae8d8c0a87e62
It is totally valid to declare an empty style in styled console.log.
But we were appending a space after a string with empty style because
we were checking that the style wasn't falsy, and empty string is falsy.
We fix that by checking against undefined.
A test is added to make sure we don't regress that.
MozReview-Commit-ID: EOQ49Gt0Cr9
--HG--
extra : rebase_source : bf711afa76dd784d3cf1f973c47e4aa139d5bc5e
To fix this, we fallback to viewSource when we don't have access to the toolbox,
which is what was done in the old frontend.
MozReview-Commit-ID: JCcprTlViMi
--HG--
extra : rebase_source : ab13b539938a6572ebd9ceaedc23f954f4cb2be2
The mocha test are broken because we mock Services.pref,
and the assumptions we make in the mock are no longer valid.
Since we do have a fully functional replacement for Services
in devtools-modules, let's use it in our test.
Which means we need to introduce a mock for localStorage,
since it's what the devtools-modules Services uses, and helper
functions to replace what was in the Services mock.
MozReview-Commit-ID: KLHERfSa1Il
--HG--
extra : rebase_source : b1b5bc2d35624677fc241194ab1a49502cafe31d
This allow us to manage different sets of preferences for
the console and the browser console. The util object is
passed to the actions through a custom thunk middleware.
MozReview-Commit-ID: 6IQLBqX7KMN
--HG--
extra : rebase_source : 9dc60df24d0514c8bd0aac7655483eb3d026a16a
Note that this patch also replaces legacy VK_* with KEY_*, and replaces
synthesizeKey() for inputting some characters with sendString() because
it's better and clearer what it does and it sets shiftKey state properly.
MozReview-Commit-ID: De4enbjux3T
--HG--
extra : rebase_source : 2296b84bff8e22f01eeb48cd8614fac5db11136a
Along with removing the view source standalone windows and prefs this patch:
1) Re-structures several of the view source tests that were only testing the old
standalone windows to now test view source in tab.
2) Adds support viewSourceUtils.viewSource() to open a browser window when there
aren't any open (for browser toolbox view source).
3) Cleans up some of the API for viewSourceUtils and removes the old deprecated
ways of calling it.
MozReview-Commit-ID: DI6sgZwbCf
--HG--
extra : rebase_source : 64677186122f74ab95912d5f3f173cf37472458a
The test was doing a lot of things and was hard to follow.
Here we split it so we can have dedicated tests for each helpers.
MozReview-Commit-ID: 6YGR3aq6jYn
--HG--
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_document_no_xray.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_error_docs.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_error_outside_valid_range.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_helper_dollar.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_helper_dollar_dollar.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_helper_dollar_x.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_helper_help.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_helper_keys_values.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_helper_pprint.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_instance_of.js
rename : devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_jsterm.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_jsterm_null_undefined.js
extra : rebase_source : dafa772bcbc6b379fd6ec1137c07ba24e794fc71
Since we don't run babel on the mocha tests anymore, we don't need to have a dedicated
env config in babelrc.
Also, bump min node version in both netmonitor and webconsole since we require async/await
to be supported.
Remove the "devDependencies" from netmonitor as we don't really have any use of it.
MozReview-Commit-ID: Ep4u59TZHAf
--HG--
extra : rebase_source : f3b184c83b063fdf1758b2ed4ecf57dd1b16641d
There was a few things wrong with new-console-output/test/package.json:
- It had a dependency on the netmonitor folder, which means that we were
pulling all the dependencies from netmonitor's package.json, including
the launchpad, which we don't want. It was done so netmonitor's babelrc
would find the plugins it needed. This is now fixed by not using babel at all.
Removing babel allowed us to get rid of NODE_PATH hack which could have been
harmful. This was doable by modifying the require-hacker callback to rewrite
all mozilla-central require to absolute path.
- The complex `test` script command wasn't documented. We now use the "//"
key to add comments (we have to since we're in a json file), which is ignored
by npm.
- We were running some tests from the node_modules folder since our glob
wasn't restrictive. We now only target folders where we do have mocha tests.
- As a consequence, we were pulling dependencies that were needed for those
tests, but not for ours.
- The Enzyme configuration was done before declaring the require hook, which
again forced us to pull dependencies that we don't need.
MozReview-Commit-ID: K7NXersnis8
--HG--
extra : rebase_source : 617b67921dd3bddaadc04b0901ece63581b98097
It only has one use, has the same effect that "auto", and should have no effect
in <a> elements anyway (plus it's not overridden or used in that file at all
anyway), so we can remove its only use instead.
I can also change that use to "auto" if you want, but bug 760876 doesn't mention
-moz-user-input at all, so I think this is quite useless...
See the intent to unship for research on out of the tree usage:
https://groups.google.com/d/msg/mozilla.dev.platform/E6tfP__wkwg/YVW6nPX9CQAJ
MozReview-Commit-ID: 8EzQlzu9drE
The sandbox used in this test isn't immediately destroyed when the test finishes.
So use a unique file name to always refer to the expected sandbox/file in this debugger test.
MozReview-Commit-ID: FJYXPN0RQS2
--HG--
extra : rebase_source : 438ae8cf97bfef8bc11e86e7850b3d6d8e8f1ccc
The breakpoint is set in a function called every second.
We have to unregister it before test finishes, otherwise it gets randomly called during test shutdown.
MozReview-Commit-ID: IEHxnVjk1xW
--HG--
extra : rebase_source : be6cdad0d700e24f80c9e520be49ec5c9d02375b
We can now remove the extra `.browser-container` element around the frame. It
was only here as a way to invoke React's `innerHTML` for real content.
MozReview-Commit-ID: 1wnv7SJmjTd
--HG--
extra : rebase_source : 12435e53d069d23adc22de4b1ba0259912ad6027
Now that we have React 16 (which includes support for custom attributes instead
of a fixed whitelist), we can create the browser frame in the "usual" way, as
opposed to this `innerHTML` workaround.
MozReview-Commit-ID: GwZVNIqF1QC
--HG--
extra : rebase_source : eec7a2c54638420b1a7adc27f25e1f0237eaa30e