Closed Bug 1746709 Opened 2 years ago Closed 2 years ago

Use `ChromeUtils.import` with one parameter in test_GMPInstallManager.js

Categories

(Toolkit :: Add-ons Manager, task, P5)

task

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: mathew.hodson, Assigned: mathew.hodson)

References

Details

Attachments

(1 file)

Passing a scope or null as the second argument to ChromeUtils.import(..., null) causes behaviour that we don't want now. As we look towards a new module system we need to prevent this behaviour.

In https://phabricator.services.mozilla.com/D127387, @robwu wrote:

There is another user of computeHash, at https://searchfox.org/mozilla-central/rev/1dab956095020c53aa66cbee8845eb1fa925b75c/toolkit/modules/tests/xpcshell/test_GMPInstallManager.js#537

The scope is also used to override the createXHR method. You could also get rid of that use by introducing a new method that takes the xhr parameter as input, to replace the XHR method:

Export new ProductAddonCheckerTestUtils for methods only used by
tests.

Assignee: nobody → mathew.hodson
Status: NEW → ASSIGNED
Priority: -- → P5
Severity: -- → N/A
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/8ea2d48172e1
Use `ChromeUtils.import` with one parameter in test_GMPInstallManager.js. r=robwu
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: