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

RESOLVED FIXED in Firefox 68

Status

()

enhancement
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: standard8, Assigned: mak)

Tracking

unspecified
Firefox 68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

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: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.