Closed Bug 1327953 Opened 7 years ago Closed 7 years ago

Removing search engines from preferences disabled 'Restore defaults' button

Categories

(Firefox :: Search, defect, P1)

46 Branch
defect

Tracking

()

VERIFIED FIXED
Firefox 54
Tracking Status
firefox-esr45 --- unaffected
firefox51 --- wontfix
firefox52 --- verified
firefox53 --- verified
firefox54 --- verified

People

(Reporter: arni2033, Assigned: florian)

References

Details

(Keywords: regression)

Attachments

(1 file)

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open about:preferences#search in a clear profile
2. Select the last search engine
3. Click button "Remove" 3 times to delete selected search engine

AR:  Button "Restore Default Search Engines" is disabld
ER:  The button should be enabled, because 3 default search engines were deleted.

This is regression from bug 1122618. Regression range:
> https://hg.mozilla.org/integration/fx-team/pushloghtml?fromchange=861971c670e1fe27c8bf43833831d7ce17b46f00&tochange=503ebfe13cd2f079829f4a4c8b7e860b4989403f@ Jeremy Francispillai:
It seems that this is a regresion caused by your change. Please have a look.
No longer blocks: 1277113
Component: Untriaged → Search
I doubt we can get the regressing patch author to work on this, Florian can you take a look?
Flags: needinfo?(florian)
Priority: -- → P1
Summary: Search engine can't notice the change if I shoot them from the back (needs better summary) → Removing search engines from preferences disabled 'Restore defaults' button
Attached patch PatchSplinter Review
Attempting to access an index of an array right after removing it with .splice can't go well. Trivial fix, inspired from what moveEngine does a few lines above.
Attachment #8829920 - Flags: review?(standard8)
Assignee: nobody → florian
Status: NEW → ASSIGNED
Also note that adding a new search engine (eg. "youtube") doesn't enable the "Restore defaults" button.
(In reply to Paul Silaghi, QA [:pauly] from comment #4)
> Also note that adding a new search engine (eg. "youtube") doesn't enable the
> "Restore defaults" button.

The "Restore defaults" button is meant to unhide the default engines, it doesn't remove user-installed engines, so it's fine that adding an engine doesn't enable the button.
Flags: needinfo?(florian)
Comment on attachment 8829920 [details] [diff] [review]
Patch

Review of attachment 8829920 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Though it'd be nice to have this covered by a test.
Attachment #8829920 - Flags: review?(standard8) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/c79f0867b4ece170ec6a2a1832839d22278c45b2
Bug 1327953 - Fix enabling the 'Restore Default Search Engines' button when removing a default engine, r=Standard8.
https://hg.mozilla.org/mozilla-central/rev/c79f0867b4ec
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
(In reply to Mark Banner (:standard8) from comment #6)
> Though it'd be nice to have this covered by a test.

Yes, it would be nice to have better test coverage for the Search pane. I started looking at it, and then was annoyed by the excessive complexity of all this code. I filed bug 1335467.
OS: Unspecified → All
Hardware: Unspecified → All
Version: Trunk → 46 Branch
Comment on attachment 8829920 [details] [diff] [review]
Patch

Approval Request Comment
[Feature/Bug causing the regression]: bug 1122618
[User impact if declined]: No easy way to get a default engine back after removing it (reloading the preference UI will work as a workaround).
[Is this code covered by automated tests?]: Unfortunately, no. I filed bug 1335467 to improve this for the future.
[Has the fix been verified in Nightly?]: No
[Needs manual test from QE? If yes, steps to reproduce]: see initial bug description.
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: low risk
[Why is the change risky/not risky?]: very simple patch
[String changes made/needed]: none
Attachment #8829920 - Flags: approval-mozilla-beta?
Attachment #8829920 - Flags: approval-mozilla-aurora?
Flags: qe-verify+
Comment on attachment 8829920 [details] [diff] [review]
Patch

looks safe enough, let's get this in aurora53 and beta52
Attachment #8829920 - Flags: approval-mozilla-beta?
Attachment #8829920 - Flags: approval-mozilla-beta+
Attachment #8829920 - Flags: approval-mozilla-aurora?
Attachment #8829920 - Flags: approval-mozilla-aurora+
I have to reproduce this bug with Nightly 53.0a1 (2017-01-01) with instruction from comment 0 and Linux 32 Bit.

The Bug's fix is now verified on Latest Nightly 54.0a1 (2017-01-31)

Build ID:20170131110402
User Agent:Mozilla/5.0 (X11; Linux i686; rv:54.0) Gecko/20100101 Firefox/54.0 

[bugday-20170201]
Status: RESOLVED → VERIFIED
[testday-20170203]
The bug is resolved and hence verified. 
OS: windows 10.0
Browser: Firefox Beta 51.0
Verified fixed FX 52b3, 53.0a2 (2017-02-05) Win 7.
Flags: in-qa-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: