Commit Graph
587 Commits
Author SHA1 Message Date
Nicolas Chevobbe a1ed5fd5ba Bug 1490279 - Enable reverse search before running reverse search tests; r=bgrins.
This is needed for beta since, for now, we only enable
reverse search on Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D5525
2018-09-11 16:16:02 +00:00
Nicolas Chevobbe 9e51a2bab0 Bug 1024913 - Add tests for Reverse search; r=bgrins.
Depends on D3114

Differential Revision: https://phabricator.services.mozilla.com/D5153
2018-09-10 10:24:42 +00:00
Nicolas Chevobbe c9859e81c2 Bug 1489554 - Do not open the autocomplete popup if there's a letter right after the cursor; r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D5396
2018-09-10 10:17:12 +00:00
Margareta Eliza Balazs 932d871487 Backed out 5 changesets (bug 1024913) for causing perma damp failures. CLOSED TREE
Backed out changeset 1c18e0422ffa (bug 1024913)
Backed out changeset c4e5a7ff8e53 (bug 1024913)
Backed out changeset 7f269add6e54 (bug 1024913)
Backed out changeset ccd6afc2a739 (bug 1024913)
Backed out changeset 1613377c1b43 (bug 1024913)
2018-09-10 10:25:32 +03:00
Nicolas Chevobbe bb9db788f5 Bug 1024913 - Add tests for Reverse search; r=bgrins.
Depends on D3114

Differential Revision: https://phabricator.services.mozilla.com/D5153
2018-09-10 05:16:25 +00:00
Jan Odvarko a76c4ed5ff Bug 1487274 - Use nsIHttpChannel.isThirdPartyTrackingResource to identify trackers; r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D5018
2018-09-07 06:55:19 +00:00
Nicolas Chevobbe d3d6e2d9f3 Bug 1486768 - Fix mocha tests;r=Honza.
Some tests were failing because of change in the code:
- arrow icon don't have an expanded class anymore but use aria-expanded
- executionPoint property wasn't set on the ConsoleMessageType
- networkUpdateRequest action expects a second argument
- requestHeadersFromUploadStream is retrieved from requestPostData.uploadHeaders

Differential Revision: https://phabricator.services.mozilla.com/D4444
2018-08-30 10:42:43 +00:00
Nicolas Chevobbe a7431b9434 Bug 1484979 - Fix old-jsterm UI glitches; r=bgrins.
The completion node was wrongly positioned as soon as the input overflowed.
We fix this by setting the completionNode height in resizeInput,
like we do for the inputNode.

The inputNode takes the whole remaining vertical space
when starting the console. But when typing, the height
is computed and set according to what's in the input.
Which means the input wasn't taking the remaining space
anymore, which could be weird (e.g. if the user wants
to select some text by starting dragging below the actual
input, although the UI would indicate it is possible).

The autocompletionPopup was a bit off due to 2 things:
- in the function that was returning the chevronWidth, we
were subtracting the autocomplete popup padding. But the
autocomplete popup already handles that itself.
- in the function that was computing the character width,
we were using offsetWidth which returned a rounded value.
This means that the further the autocompletion was displayed
at, the more the popup would be off. We use getBoundingClientRect().width
instead which gives us a decimal value.

And we also make sure to not alter the scrolling position in the inputNode
when accepting an autocompletion result (a test is added).

Differential Revision: https://phabricator.services.mozilla.com/D4207
2018-08-29 05:41:52 +00:00
Nicolas Chevobbe 42abb83b75 Bug 1486446 - Remove Console Launchpad support; r=bgrins.
It's broken and unmaintained for a long time now,
the Console Team does not use it and has no plan doing so.

Differential Revision: https://phabricator.services.mozilla.com/D4348
2018-08-27 16:31:58 +00:00
Nicolas Chevobbe 8912f7cfae Bug 1485990 - Display 1-item-only autocomplete popup if autocompletion text can't be displayed; r=bgrins.
If the autocomplete only returns 1 item, we usually close the
popup and show the autocompletion text.
But in some cases the autocompletion text can't be shown (e.g.
there's some text after the cursor). So we end up showing
nothing for the user, which is not ideal.
In such case, this patch ensures we do show the popup so the
user can autocomplete and save some keystrokes.

Depends on D4061

Differential Revision: https://phabricator.services.mozilla.com/D4335
2018-08-27 16:25:57 +00:00
Nicolas Chevobbe 8d0154a21f Bug 672733 - Make autocomplete search case insensitive; r=Honza.
This patch adds a smarter heuristic for autocompletion results:
if the input first letter is lowercased, then we'll filter
matching properties case insensitively. But if the user starts
with an uppercase, we assume they know the property they want
and thus respect the casing.
For example: `win` will return both `window` and `Window`, but
`Win` will return `Window` only.
Due to this behavior, we change the order of the autocomplete
results so lowercased property are displayed before the uppercased
one.
If we take are example again, it's likely that if a user type `win`,
they want `window`, but the alphabetical order would return `Window`
first which would annoy user.

Now, since we return results that does not match exactly the user
input, we need to modify the frontend.

Usually, we only show the autocompletion popup if there are
at least 2 matching items, since 1 matching item will still
be displayed using the autocompletion text. But now, since the
input might not match, we want to still display the popup if
there is one matching item, but starts differentely than what
the user entered.
For example, the user typed `window.addeve`, which matches
`addEventListener`. The completion text will make it looks like
it will be completed to `window.addeventListener`, which would
be undefined. So showing the popup with the actual matching
property might avoid some confusion for the user.

A test was added to make sure the frontend works as expected.
Some test cases were added in the server test to make sure
the actor returns expected results. Other tests needed some
adjustement because of the insensitive case matches and the
new order of results.

Differential Revision: https://phabricator.services.mozilla.com/D4061
2018-08-27 16:08:56 +00:00
Nicolas Chevobbe f40b1669b0 Bug 1486364 - Revert changes in Tree component and test; r=jdescottes.
In https://github.com/devtools-html/debugger.html/pull/6809 a check
was removed in the Tree component because seens as unnecessary, and
a test was modified to accomodate the change. Turns out the test was
needed in its original form, and was surfacing a bug.
This patch rolls back both the change in the Tree component _and_ in
the test.
The Tree modification will be backported to the Github repository.

Differential Revision: https://phabricator.services.mozilla.com/D4307
2018-08-27 07:30:02 +00:00
Nicolas Chevobbe 0b55e4a09a Bug 1485510 - Fix mochitests that don't work with CM jsterm enabled; r=bgrins.
Differential Revision: https://phabricator.services.mozilla.com/D4209
2018-08-27 07:56:03 +00:00
Nicolas Chevobbe 178e3ac6a8 Bug 1484682 - Ensure the sidebar can overflow; r=Honza.
The sidebar regressed at some point and wasn't showing
a scrollbar when it was needed. This patch fixes that
by making the sidebar overflow and adds a test to make
sure we don't regress.

Differential Revision: https://phabricator.services.mozilla.com/D3976
2018-08-23 09:46:02 +00:00
Jan Odvarko 063630ce07 Bug 1333994 - The network tab should flag resources on the tracking protection list; r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D3862
2018-08-23 07:36:08 +00:00
Brian Grinstead becddf3c2f Bug 1463669 - Enable syntax highlighting of input in the console output when possible;r=nchevobbe
When you enter JS into the console, we can now syntax highlight it in
the output when CodeMirror is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D3842
2018-08-23 00:09:24 +00:00
Noemi Erli ac6935bf69 Merge inbound to mozilla-central. a=merge 2018-08-22 19:28:33 +03:00
Nicolas Chevobbe 9248f9f013 Bug 1483880 - Always hide the autocompletion popup in acceptProposedCompletion; r=Honza.
When hitting enter, if there was no autocompletionText shown (because
the input was matching a proposed value), then the autocompletion
popup wasn't closed.
We now close it every time, and only check the completionText to
insert a possible string after the cursor.
A test case is added to make sure we don't regress this.

Differential Revision: https://phabricator.services.mozilla.com/D3763
2018-08-22 11:40:09 +00:00
Jan Odvarko 7267450673 Bug 1470815 - Make sure the Security panel is visible for HTTP requests in the Console panel; r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D3904
2018-08-22 11:14:45 +00:00
Nicolas Chevobbe edf76fe7da Bug 1479758 - Enable history navigation with Cmd/Ctrl ArrowUp/Down; r=bgrins.
Matches old-JsTerm behavior.

Depends on D2824

Differential Revision: https://phabricator.services.mozilla.com/D3196
2018-08-21 16:05:45 +00:00
Nicolas Chevobbe 3985378acc Bug 1484672 - Use node.click instead of synthesizeMouseAtCenter in browser_webconsole_object_inspector_scroll.js; r=davidwalsh
Differential Revision: https://phabricator.services.mozilla.com/D3774
2018-08-20 14:59:13 +00:00
Valentin Gosu 30d5eb211c Bug 1483445 - Change string from tracking protection to content blocking r=dragana!
Differential Revision: https://phabricator.services.mozilla.com/D3440
2018-08-20 08:43:08 +00:00
Noemi Erli 297e2d8ef6 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-22 12:54:34 +03:00
Mantaroh Yoshinaga a17a5b0450 Bug 1465644 - Part 2. Introduce the emphasized splitter style. r=nchevobbe 2018-08-22 16:07:53 +09:00
Nicolas Chevobbe 88c6294083 Bug 1479521 - Only run browser_jsterm_accessibility.js with old jsterm; r=Honza.
Depends on D2826

Differential Revision: https://phabricator.services.mozilla.com/D2827
2018-08-13 10:07:00 +00:00
Nicolas Chevobbe c3788fa499 Bug 1479521 - Update tests to match the new jsterm behavior; r=Honza.
Some test were relying on the existence of the complete function
and were using it in order to do integration test.
We modify those and instead trigger real user interaction for
making those assertions.
Additional test cases are added to the test files they fit in
so we have a broader coverage of user interaction in regard
to autocompletion.

Depends on D2825

Differential Revision: https://phabricator.services.mozilla.com/D2826
2018-08-13 08:37:09 +00:00
Nicolas Chevobbe 3e488d6584 Bug 1479521 - Remove browser_jsterm_no_autocompletion_on_defined_variables.js; r=Honza.
The test wasn't doing what it was supposed to do (there was definitely
an autocomplete text displayed, we were not waiting properly for it.).
Also, the original issue with this was that that an unwanted token was
entered instead of the one the user wanted (user generated). Maybe at
that time the autocomplete did not contained user defined variables,
but now we do, and we are testing that in other tests.

Depends on D2824

Differential Revision: https://phabricator.services.mozilla.com/D2825
2018-08-13 08:39:16 +00:00
Noemi Erli a96af2f0dd Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-10 00:35:58 +03:00
Nicolas Chevobbe 41712cd901 Bug 1481833 - Fix expanding getter returning longString; r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D2949
2018-08-09 15:01:45 +00:00
Nicolas Chevobbe eca91f248c Bug 1481480 - Add a test for the object_expanded telemetry probe; r=miker.
Differential Revision: https://phabricator.services.mozilla.com/D2862
2018-08-09 08:55:26 +00:00
Jonathan Kingston d50c555bf6 Bug 1362034 - Tests for addTab() to provide the correct triggering principal. r=ckerschb r?=gijs
Summary: Depends on D2046

Reviewers: ckerschb!, Gijs!

Tags: #secure-revision

Bug #: 1362034

Differential Revision: https://phabricator.services.mozilla.com/D2047
2018-07-06 21:16:29 +01:00
dvarga 86b7ee6d9f Backed out 2 changesets (bug 1362034) for failure at browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js on a CLOSED TREE
Backed out changeset 1c3329958b8a (bug 1362034)
Backed out changeset f68b1b76af36 (bug 1362034)
2018-08-08 22:11:56 +03:00
Jonathan Kingston 92858e3e21 Bug 1362034 - Tests for addTab() to provide the correct triggering principal. r=ckerschb,Gijs
Summary: Depends on D2046

Reviewers: ckerschb, Gijs

Reviewed By: ckerschb, Gijs

Bug #: 1362034

Differential Revision: https://phabricator.services.mozilla.com/D2047
2018-08-08 20:05:30 +03:00
Mantaroh Yoshinaga f7950dd4d5 Bug 1477088 - Part 2. Use 'synthesizeMoustAtCenter' instead of 'sendMouseEvent' and check the active input element focus before opening door hanger menu. r=nchevobbe
The patch of part 1 changed the behavior of clicking the meatball button.
So this patch will fix the related test.

Differential Revision: https://phabricator.services.mozilla.com/D2585
2018-08-08 08:16:16 +09:00
Nicolas Chevobbe 7ebd39a559 Bug 1477860 - Add a test case for error object copy/paste; r=jdescottes.
A fix was made in Reps (see https://github.com/devtools-html/debugger.html/pull/6687)
in order to make error objects much more usable when copy/pasted.
Since node isn't the best to test copy/pasting behavior, we add a
test case in an existing mochitest for this.

Differential Revision: https://phabricator.services.mozilla.com/D2779
2018-08-07 05:03:40 +00:00
Nicolas Chevobbe aad31b6bcc Bug 1478556 - Add a test for jump_to_definition telemetry event log; r=miker.
Differential Revision: https://phabricator.services.mozilla.com/D2712
2018-08-03 13:35:00 +00:00
Nicolas Chevobbe a30df1875c Bug 1475391 - Add mapping for CORS error types to MDN pages; r=bgrins.
Differential Revision: https://phabricator.services.mozilla.com/D2557
2018-08-03 06:40:36 +00:00
Nicolas Chevobbe 8e6ce9d12e Bug 1457478 - Do not call Services.console.logStringMessage in clearMessagesCache; r=bgrins.
This was causing an empty message to appear in the
browser console when clicking the clear button.
This specific call was introduced 5 years ago without
much explanation, and since the error console is now
gone, I think it's safe to remove the call.

A test is added to make sure we do not print any extra
messages when clearing the browser console.

Differential Revision: https://phabricator.services.mozilla.com/D2551
2018-07-31 14:16:42 +00:00
Nicolas Chevobbe 62160387c9 Bug 1136299 - Add a test for the new in-line input in the console;r=bgrins.
The input expansion tests are removed since the new test now cover the input
growing/shrinking.

MozReview-Commit-ID: 4RIQar4ytX
2018-07-18 11:21:41 +02:00
Nicolas Chevobbe 60b985e144 Bug 1470922 - Fix tests failing with the new Jsterm; r=bgrins.
MozReview-Commit-ID: EaOSFmWa1tZ
2018-07-25 10:58:01 +02:00
Nicolas Chevobbe d03119ed10 Bug 1470922 - Make sure jsterm tests run in both old and new jsterm; r=bgrins.
Since codeMirror jsterm is becoming the default, we explicitely
set the pref to false before each jsterm test so they run with
the 2 version of the component.

MozReview-Commit-ID: 2qxIcRlIS9M
2018-07-24 14:41:50 +02:00
Kris Maglione e97c582e3f Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL
2018-05-21 16:58:23 -07:00
Narcis Beleuzu 749f83cc65 Backed out 2 changesets (bug 1463016, bug 1463291) for geckoview failures
Backed out changeset fcfb99baa0f0 (bug 1463291)
Backed out changeset 0d69b4fb1ed4 (bug 1463016)
2018-07-29 03:55:23 +03:00
Kris Maglione 6dcf46ad68 Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL
2018-05-21 16:58:23 -07:00
Coroiu Cristina 57563390eb Backed out 3 changesets (bug 1470922) for devtools failures at devtools/client/debugger/test/mochitest/browser_dbg_split-console-keypress.js
Backed out changeset 57b9025b5573 (bug 1470922)
Backed out changeset c30835ae0523 (bug 1470922)
Backed out changeset bb2a99260093 (bug 1470922)
2018-07-27 19:31:43 +03:00
Nicolas Chevobbe a396aa8a65 Bug 1470922 - Make sure jsterm tests run in both old and new jsterm; r=bgrins.
Since codeMirror jsterm is becoming the default, we explicitely
set the pref to false before each jsterm test so they run with
the 2 version of the component.

MozReview-Commit-ID: 2qxIcRlIS9M
2018-07-24 14:41:50 +02:00
Nicolas Chevobbe 07af9817cb Bug 1476605 - Fix Error rep failure when stacktrace is a longString; r=sole.
The actual fix for this issue will come in a future
reps bundle when https://github.com/devtools-html/debugger.html/pull/6705
gets merged.
But, I do want this change to be uplifted to release, and it should be
easier to only apply this simple change than the whole next release
which would contain unrelated code changes.
Also, this patch introduces a test to make sure we don't ever regress
this.

MozReview-Commit-ID: 3QPrx3TLln0
2018-07-26 15:18:08 +02:00
Nicolas Chevobbe e6d7e7ebde Bug 1478410 - Fix split console close in codeMirror jsterm; r=bgrins.
This patch removes the <kbd>Esc</kbd> handler from codeMirror
to put it on the jsterm-container. This prevent the interference
from codeMirror when we don't need to handle the event (i.e. it
should bubbles up to the toolbox where the split console state
is managed).
The webconsole_split test is run with both old and
new jsterm.

MozReview-Commit-ID: BaLyj4wSdmv
2018-07-25 18:26:27 +02:00
Nicolas Chevobbe 2cf605c402 Bug 1463095 - Instrument inspection of filter changes in the Web Console with event telemetry; r=jdescottes.
This introduces an event-telemetry middleware that we'll
be able to re-use for other events.
A test is added to make sure we do log those events as intended.
The telemetry mock for mocha test is modified to include
recordEvent so the test still run.

MozReview-Commit-ID: 1SHnVIRGdDz
2018-07-24 09:55:36 +02:00
Boris Zbarsky 3af9dccacb Bug 1476145 part 4. Stop using getInterface(nsIDOMWindowUtils) in devtools. r=bgrins 2018-07-24 19:47:41 -04:00