This adds a data-indent attribute to the message indent component
so we can target it in CSS.
MozReview-Commit-ID: DEUTHe42Pa0
--HG--
extra : rebase_source : 650e9148d26318855c985a5b6c7830338c50bc25
From console/net/main.js we are calling loadSheet from sdk/stylesheet/utils.
This API needs a real window object to work, but now that devtools are loaded
as a system addon, by default the global object is a sandbox wrapper.
Use the window object which points to the actual Window instead.
MozReview-Commit-ID: LxDNfDiOso3
--HG--
extra : rebase_source : b00465e7e0ef8145b341c495eb27e7f1e703d341
This also fixes a few tests that were failing due to changes
in how we now render arrays and objects in tiny mode.
MozReview-Commit-ID: 9JRjDQQ46FA
--HG--
extra : rebase_source : 7f482505647eedbe984f6e2c9efed8c26254fc07
This adds an `ownSymbols` and an `ownSymbolsLength` properties to the
grip `preview` property so we can retrieve them in the frontend.
This also refactors the newly introduced test for symbols and add a
function which test the content of the preview property in the grip.
The console test packet stubs files were updated to take this into account.
MozReview-Commit-ID: 7rPxFcS5uXE
--HG--
extra : rebase_source : dcd1189904b8f10ffb27df4c2290ac391a4f08ed
In the frontend we need to know if XUL buttons in the toolbar were
triggered by a touch event, so we're passing on the inputSource
in the command event.
MozReview-Commit-ID: DMvgZULk9hT
--HG--
extra : rebase_source : c455c8ec77e439bf02c1e3e8d34a36e1fb5e3bd0
The inspect command in extension was directly calling jsterm.inspectObject and doing so bypassed
the code we implemented for the command on the new frontend (i.e. no more variable view).
This patch modifies the jsterm inspectObject function so it can do the expected behavior,
and also reverts some changes made in the original inspect command bug, so we only deal with
the new frontend code in jsterm.inspectObject.
This implied changing an extension test that was waiting for the variable view to boot-up.
The test was modified to match the tests we already have for the inspect command on the new
console frontend.
MozReview-Commit-ID: 8fZV20Mck8r
--HG--
extra : rebase_source : 59870c4bae3664aebf448acee439b918190591dc
We don't retrieve the indent from the MessageContainer anymore, but from the lowest-level
component where we have access to the full message data, i.e. the messages types components (e.g.
ConsoleApi, EvaluationResult, … ).
MozReview-Commit-ID: JkaIcxnyt3W
--HG--
extra : rebase_source : 3ebe764cae33348d8d807936f5dcad3f23a0aa31
Some tests were failing after switching to ObjectInspector.
Here we remove the ones that are specific to the VariableView, and
fix the "store as global" one.
MozReview-Commit-ID: 4IhNp4MTC2k
--HG--
extra : rebase_source : 60286976e5fd6e7c68e022679effe5a43a5d3845
Because we need to check in an another property from the store for actors to release,
a little refactor of how we deal with actors to be released was needed.
So instead of tracking removed messages from the store, we directly track removed actors.
We can compute this list directly in the reducer, and it even allow us to simplify the enhancer a bit.
Some tests where added to make sure we do handle loaded properties in the store.
MozReview-Commit-ID: 72F2wl3UaLA
--HG--
extra : rebase_source : 974799ef52dd25e8b2d99eb98228190487cc91b2
The whitelisting function thisTestLeaksUncaughtRejectionsAndShouldBeFixed was replaced by expectUncaughtRejection, and existing calls did not take effect anymore.
MozReview-Commit-ID: 3uOxkgWYWEz
--HG--
extra : rebase_source : 6b27b77da78743880529adae7adf4ec2aa64dfea
extra : intermediate-source : 5809a30a0c4817509beb1078cf336d8367b8107a
extra : source : 6f0394b523a66dab444b8551deb8f3c6c81d8f31
This ensures that clicking on a message open the netmonitor panel, with the network
item clicked being selected in the netmonitor panel.
The loadDocument was edited to accept a URL instead of relying on the existence of
a TEST_PATH variable. Callsites where thus modified.
MozReview-Commit-ID: 3dbX1Myxirz
--HG--
rename : devtools/client/webconsole/test/test-network-request.html => devtools/client/webconsole/new-console-output/test/mochitest/test-network-request.html
extra : rebase_source : 06eac0cad3eba9961b61f1a2df2f2932c60dd2bc
Prior to this patch, we were retrieving the message data in the ConsoleOutput
render, for each message. This means that for each message addition, we were
retrieving the data for each message in the store.
This doesn't impact performance if there are not many messages in the store, but
if the store is "full", we might end up calling the function to get those messages
a lot. And since the messages are in an Immutable.OrderedMap, it can be very costly.
Moving the retrieval of the message data in ConsoleOutput allow us to only call this
function when a message is added or updated, which allow us to save some time on
the rendering path.
MozReview-Commit-ID: S4NSSW5Mvw
--HG--
extra : rebase_source : 5262b5b34bb86fec5c14b7056875b8f8b661262a
Changes to Promise tests designed to test .then(null) have been reverted, and the browser/extensions directory was excluded because the projects it contains have a separate process for accepting changes.
MozReview-Commit-ID: 1buqgX1EP4P
--HG--
extra : rebase_source : 3a9ea310d3e4a8642aabbc10636c04bfe2e77070
Add a test case to measure streaming time when the store already hit the log limit so
we can have data about pruning.
Switch to performance.mark and performance.measure for time measurement instead of the
custom timeit function we had.
This allow us to have precise data, and also those are written in the profile and then
shown in perf-html, so we can have a better overview of what's going on during the test.
MozReview-Commit-ID: 2nNmukxmUso
--HG--
extra : rebase_source : c8dca67060c2bf6a61e32c78e9fb35b24d7801a9
Add a test case to measure streaming time when the store already hit the log limit so
we can have data about pruning.
Switch to performance.mark and performance.measure for time measurement instead of the
custom timeit function we had.
This allow us to have precise data, and also those are written in the profile and then
shown in perf-html, so we can have a better overview of what's going on during the test.
MozReview-Commit-ID: 2nNmukxmUso
--HG--
extra : rebase_source : 298387e0f33ff226f6d096fd8786f29ddbd5a56f
In the process of adding those tests, I realized the cleanup was
not effective. There were some bugs for Immutable List (we can't
use delete in a withMutation callback), and in object/arrays (we
we're using Array.includes with another array as a parameter).
These were fixed, and the new tests are now passing.
MozReview-Commit-ID: NrKjLuu25
--HG--
extra : rebase_source : cdbdfdc7f5b2a1e3c71cb76cfcd42db5204332ff
In the console, we were assuming that eventTiming was the last
of the eight networkUpdate that happen for a given network request.
Unfortunately, we can't ensure the order in which those updates come,
so the test was intermitently failing when eventTiming was fired
before other updates.
To fix this, we don't look for a specific update, but rather check that
all of the 8 updates happened.
MozReview-Commit-ID: Iv0TIHoqkyv
--HG--
extra : rebase_source : 129a2edd1725e8eddc8ea20de3d38e1bc5f27f87
This moves network update messages to their own property on the store.
We take this as an opportunity to only dispatch the last network update,
i.e. `eventTimings` since it has all we need and saves us some time (there
are 8 network update per network messages, which can be costly).
MozReview-Commit-ID: 2AQN3IlgHg7
--HG--
extra : rebase_source : 465ed3a20c6c202fccf0af9f57f36dcd63db04e6
The idea is to allow tests to set their own logLimit without
having to use Services.setIntPref.
To do so, we also need to not retrieve the logLimit from Services
in the messages reducer. Since we already have the logLimit in the
store, we can retrieve it directly from the store by passing the
prefs state to the messages reducer.
We take this as an opportunity to revisit the createRootReducer function
to be future proof: if any new reducer is added, they should just work
as if we were using combineReducers.
With those changes, we can set a lower logLimit in some tests that used
to have a defined timeout since they were taking too much time.
MozReview-Commit-ID: 7j80XoKkJ1y
--HG--
extra : rebase_source : 23b86faa00d08a80f2cb21291c0df3b4c8113e73
The parent commit did some changes to the architecture of the store that
needed to be handled on the limit messages function.
We take advantage of this to rewrite the functions involved to be as efficient
as possible. To do that, we limit the work done by Immutable structures by doing
changes in them only once per added messages.
MozReview-Commit-ID: 6VzobhWzK40
--HG--
extra : rebase_source : 37a8159401763c07244f6495a28d64406f7bff0a
We used to do the filtering on the selector, which can be costly because
we're looping through all the messages of the store on each new message.
Moving the logic to the reducer allow us to be more thoughtful about which
messages to evaluate and when.
In order to make this change, we need to pass the filter state to the message
reducer. This is done by ditching the combineReducers helper function and do
the plumbing by ourselves, which isn't complex.
MozReview-Commit-ID: Lw37XgEFf7e
--HG--
extra : rebase_source : 290c315b91896765f3a249fbf75449cfa66a710f
Since the FilterButton component is now only a function that returns a React Element,
it looks like Enzyme can't do the comparison we were doing before.
Checking directly the resulting html, even if non-optimal, fixes the test.
MozReview-Commit-ID: 5fAk8WyYCaF
--HG--
extra : rebase_source : 9f15782b64657eb6a31eefcabbcf9775d706cc07
Since the FilterButton component is now only a function that returns a React Element,
it looks like Enzyme can't do the comparison we were doing before.
Checking directly the resulting html, even if non-optimal, fixes the test.
MozReview-Commit-ID: 5fAk8WyYCaF
--HG--
extra : rebase_source : bcf5950bbf2fb63c0a2ff1a99f578eea99379745
The whitelisting function thisTestLeaksUncaughtRejectionsAndShouldBeFixed was replaced by expectUncaughtRejection, and existing calls did not take effect anymore.
MozReview-Commit-ID: 3uOxkgWYWEz
--HG--
extra : rebase_source : 5a10a3ebbfe0ce2a801330041f95447c313a9a70
extra : source : 6f0394b523a66dab444b8551deb8f3c6c81d8f31
The whitelisting function thisTestLeaksUncaughtRejectionsAndShouldBeFixed was replaced by expectUncaughtRejection, and existing calls did not take effect anymore.
MozReview-Commit-ID: 3uOxkgWYWEz
--HG--
extra : rebase_source : 3a7720091180a770b32b595f8094c0d20170166d
Since the longString object has an actor property which can change from test to test,
replace it with its value in the existing packet.
MozReview-Commit-ID: CzxX203TdEU
--HG--
extra : rebase_source : df89c67ba760ab48b3e5e9e38378314e06dfc0fb
Edit the function that generates pageError stubs so it does use
the key we provide it.
Change the key in existing pageError stubs so we don't have to
modify the tests.
MozReview-Commit-ID: FBfpflNgXpv
--HG--
extra : rebase_source : 02c0249e9e1f098ad577e7b50e127c0600c1b5e4
Set the logLimit to the number of messages we add.
Bump up the number of messages to add to 4000.
Iterate 25 times instead of 10.
Compute the median to limit the impact of low/high spikes.
MozReview-Commit-ID: 1WoiYk5pF9v
--HG--
extra : rebase_source : 5e2459d04640f56de373a3e0e3805c13f382b7ea
Don't escape whitespace in console evaluation results. This preserves
the behavior of the old console, and in particular makes pprint() more
useful again.
MozReview-Commit-ID: CrWWXjtSBIw
--HG--
extra : rebase_source : aa238c1f28d6a7e33b376874b7b67ffae5eaf97e
The new Reps bundle from Bug 1357341 is all about functions now,
so we should remove all unnecessary `createFactory` calls
we used to do when creating Reps.
MozReview-Commit-ID: 4KvCThhwphv
--HG--
extra : rebase_source : ade723dbdb78752e5535f18b20370b6c46a54c48
Bug 1346326 points out that the console.count spec has changed to
void count(optional DOMString label = "default");
This patch implements the same behavior, but does not change the webidl,
on the theory that perhaps something relies on the current "any..."
type.
MozReview-Commit-ID: 9RQKAZ4AVtT
This rolls browser.tabs.animate, browser.fullscreen.animate, and
alerts.disableSlidingEffect into a single pref; if any of these are disabled,
we'll disable the new pref too (toolkit.cosmeticAnimations.enabled). Most
future animations will also be subject to this pref.
MozReview-Commit-ID: 77pLMtERDna
--HG--
extra : rebase_source : 8939e453c2277caa4a90123ae09bb542aaa421ed
The call to scrollToBottom could take a good amount of time if there were
already logged messages in the console. This might be related to the fact that
componentDidMount is called although there is some layout or paint work.
Delaying the first call to scrollToBottom in the component greatly reduced the
time spent in scrollToBottom.
MozReview-Commit-ID: F3cRYV4OFhm
--HG--
extra : rebase_source : 7be84aeadd33e5c57131b35da2dea5e7bc3611b0
Tests custom styles on both console.group and console.groupCollapsed messages.
Update the stubs to match what the server now returns.
MozReview-Commit-ID: KHhU8Ki0YUz
--HG--
extra : rebase_source : 6f3766f9bb49d677a8f90adc0e8db7c34fa9e8bb
Because we now enable custom styling on console.group, we can't rely solely on groupName
to output the group. We can have multiple pieces on which to apply different styles, like
for console.log, so we use the same properties to have the same behavior for custom styles.
MozReview-Commit-ID: 7IKl919Dg7a
--HG--
extra : rebase_source : 770af4e62eaa779cab75179ed9789c4b102cb4d6
The existing `SourceMapService` uses server-side source maps, which we are
replacing with client-side source maps. It will be removed later in bug
1349354, but for now mark it as deprecated so we don't use it with any other
tools.
MozReview-Commit-ID: ABmWGC5asZd
--HG--
extra : rebase_source : 52d4238f0d4316c77fb8f4b769f84babe4d7c446
Some devtools tests had been forced to run in e10s with just 1
content process in bug 1301340 and bug 1303113 because they were
failing.
Now there seems to have been enough e10s messaging fixes that these
tests work again. It seems safe to re-enable multi-content-processes
for them now.
MozReview-Commit-ID: ENfDdIXvIAI
--HG--
extra : rebase_source : 9f29d7f58088b3a99a3512b9f7e73525cb9a6e7e
I accidentally disabled the wrong test in an earlier push. This change
corrects that, enabling browser_console_netlogging.js and skipping
browser_webconsole_netlogging.js.
DevTools has to support debugging versioned scripts until Firefox itself drops the support. So we can't remove versioned scripts completely.
MozReview-Commit-ID: 1NksT3hfz1Z
--HG--
extra : rebase_source : 72d1cb34b84101e3e07b5459ee36987e6508f3a7
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;
MozReview-Commit-ID: AzhtdwJwVNg
--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
We set a listener for "pageError" but we don't remove it.
There is a `once: true` property passed as an option for addListener,
but this isn't a standard addEventListener call it does not do anything.
Reverting to remove the listener fix the issue.
MozReview-Commit-ID: CrpS1QY5jNo
--HG--
extra : rebase_source : 583b738ac344da6413b88aecf52debd24afe4e54
Move the stub generation to functions in head.js so we can use them in other places.
Fix the getCleanedPacket function for properties that can differ from one OS to another.
Enhance test speed by removing the use of temp files to get the packets, and also by
evaluating the command in a single tab, instead of opening a tab for each command.
MozReview-Commit-ID: 2HTA4SwyXDi
--HG--
extra : rebase_source : c7eed370908c113c56acc1a7fd0010bacf62507b
Remove code for additional toolbar which isn't shown for now.
Fix mocha test since it was failing.
MozReview-Commit-ID: p9Pg2Qyz3Q
--HG--
extra : rebase_source : 77aaf6209052fa7482d648e5f362378d822fd7d0
We were always opening the debugger when clicking on the location link,
which could be wrong since we can have CSS warnings, or logs coming from Scratchpad.
So we add the function to open in StyleEditor and Scratchpad, and copy some mochitests
that where testing the interaction with those links.
MozReview-Commit-ID: 73mQNfy199m
--HG--
rename : devtools/client/webconsole/test/browser_webconsole_bug_766001_JS_Console_in_Debugger.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_location_debugger_link.js
rename : devtools/client/webconsole/test/browser_webconsole_scratchpad_panel_link.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_location_scratchpad_link.js
rename : devtools/client/webconsole/test/browser_webconsole_bug_782653_CSS_links_in_Style_Editor.js => devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_location_styleeditor_link.js
rename : devtools/client/webconsole/test/test-bug-766001-console-log.js => devtools/client/webconsole/new-console-output/test/mochitest/test-location-debugger-link-console-log.js
rename : devtools/client/webconsole/test/test-bug-766001-js-errors.js => devtools/client/webconsole/new-console-output/test/mochitest/test-location-debugger-link-errors.js
rename : devtools/client/webconsole/test/test-bug-766001-js-console-links.html => devtools/client/webconsole/new-console-output/test/mochitest/test-location-debugger-link.html
rename : devtools/client/webconsole/test/test-bug-782653-css-errors-1.css => devtools/client/webconsole/new-console-output/test/mochitest/test-location-styleeditor-link-1.css
rename : devtools/client/webconsole/test/test-bug-782653-css-errors-2.css => devtools/client/webconsole/new-console-output/test/mochitest/test-location-styleeditor-link-2.css
rename : devtools/client/webconsole/test/test-bug-782653-css-errors.html => devtools/client/webconsole/new-console-output/test/mochitest/test-location-styleeditor-link.html
extra : rebase_source : a8494acb5e450f86fa9cddd34515265fc3494d17