Closed Bug 1870419 Opened 10 months ago Closed 10 months ago

Fix google, distributions, and database tests in searchconfigs tests

Categories

(Firefox :: Search, task, P2)

task

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: mcheang, Assigned: mcheang)

References

Details

Attachments

(1 file)

No description provided.

The copyObject function in SearchEngineSelector was performing a shallow copy of
the objects from the config. Therefore, the config was being modified because
the copied engine had pointers to the inner object and array from the search
config.

To fix the issue, the copyObject function is now changed to deepCopyObject
function, where we are performing a deep copy of the nested object or array
rather than shallow copies. When we loop over and apply the variant engine
properties cumulatively, they should not modify the original search config.

Attachment #9369035 - Attachment description: Bug 1870419 - Fix searchconfigs/test_google.js for search-config-v2. r=Standard8! → Bug 1870419 - Fix google, distributions, and database tests in searchconfigs tests folder. r=Standard8!
Summary: Fix searchconfigs/test_google.js for search-config-v2 → Fix google, distributions, and database tests in searchconfigs tests
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d05d212e5390 Fix google, distributions, and database tests in searchconfigs tests folder. r=Standard8
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: