Closed Bug 1527898 Opened 5 years ago Closed 5 years ago

disableSearchAddon does not disable "replaceAll" command

Categories

(DevTools :: Shared Components, defect)

defect
Not set
normal

Tracking

(firefox66 verified, firefox67 verified)

VERIFIED FIXED
Firefox 67
Tracking Status
firefox66 --- verified
firefox67 --- verified

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

Attachments

(3 files)

Attached image image.png

Steps to reproduce

  1. Open the console
  2. Hit Ctrl + Shift + R (or Shift + Cmd + Alt + F on OSX)

Expected results

On OSX, nothing, on other platforms, the page should refresh

Actual results

There's a UI on top of the console, to replace all occurrence of a given word.


This is because the CodeMirror bundle includes the search addon.
But since Bug 1505024, we have a disableSearchAddon config that should be honored, which is not the case here.

There will be a bigger plan in which we won't include the search addon in the bundle, but since it would be nice to uplift a fix for the console case, the bug provided for this patch will be a "hotfix".

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

The function was returning a Promise but was also
taking a callback for old-style test.
This patch turns the function into an async one,
remove the callback param and refactor tests that
relied on it.

This is an hotfix for the bug, which we want to uplift.
A better fix will happen in Bug 1527903.

Depends on D19963

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e5a0d37ff12c
Turn sourceditor `setup` test helper async; r=gl.
https://hg.mozilla.org/integration/autoland/rev/02169a9e2fda
Override find and replace commands when disableSearchAddon is true; r=gl.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67

Comment on attachment 9044234 [details]
Bug 1527898 - Override find and replace commands when disableSearchAddon is true; r=gl.

Beta/Release Uplift Approval Request

Feature/Bug causing the regression

Bug 983473

User impact if declined

On Ctrl+Shift+R on windows/Linux, there's a weird toolbar that appear on top of the console input.
It looks weird and it can be triggered easily as this is the shortcut to do a hard refresh.

Is this code covered by automated tests?

Yes

Has the fix been verified in Nightly?

Yes

Needs manual test from QE?

Yes

If yes, steps to reproduce

  1. Open the console
  2. Hit Ctrl + Shift + R (or Shift + Cmd + Alt + F on OSX)

Expected results:
On OSX, nothing, on other platforms, the page should refresh. No additional toolbar should be displayed.

List of other uplifts needed

None

Risk to taking this patch

Low

Why is the change risky/not risky? (and alternatives if risky)

devtools only, test covered, relatively small

String changes made/needed


This also need the other patch from this bug (test structure changes only)

Attachment #9044234 - Flags: approval-mozilla-beta?

Comment on attachment 9044234 [details]
Bug 1527898 - Override find and replace commands when disableSearchAddon is true; r=gl.

Avoid an unwanted toolbar, adds new tests.
OK for uplift for beta 10.

Attachment #9044234 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+

User Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:67.0) Gecko/20100101 Firefox/67.0
Build ID: 20190221215439

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:66.0) Gecko/20100101 Firefox/66.0
Build ID: 20190221160854

Verified as fixed on the latest Nightly build and on the latest Beta build (66b10).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: