Closed Bug 1533719 Opened 1 year ago Closed 1 year ago

test_getTypeFromExtension_with_empty_Content_Type.js isn't running correctly - originalWindowsRegKeyFactory does not exist

Categories

(Firefox :: File Handling, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: standard8, Assigned: mak)

References

Details

Attachments

(1 file)

In enabling ESLint on uriloader in bug 1532941, we've picked up that in test_getTypeFromExtension_with_empty_Content_Type.js there is an undefined variable originalWindowsRegKeyFactory:

JavaScript error: c:/central/obj-x86_64-pc-mingw32/_tests/xpcshell/uriloader/exthandler/tests/unit/test_getTypeFromExtension_with_empty_Content_Type.js, line 132: ReferenceError: originalWindowsRegKeyFactory is not defined

This means that the mock factory which is registered, never gets created correctly.

Hence, this test isn't running correctly. I've tried fixing it, but then nsIWindowsRegKey.open throws a failure (NS_ERROR_FAILURE).

For now, we'll disable the line in ESLint.

bug 568691 broke this in a commit from bsmedberg that doesn't seem to have been reviewed: https://hg.mozilla.org/mozilla-central/rev/d88ae23ecbe7 .

Marco has volunteered to take a look. :-)

Flags: needinfo?(mak77)
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Flags: needinfo?(mak77)

The test was broken by a commit in bug 568691 and because the ".txt" extension
skips the code under test, we never noticed that.

Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/0339d18944be
test_getTypeFromExtension_with_empty_Content_Type.js is not testing what it is supposed to test. r=Felipe
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.