Closed Bug 1703967 Opened 3 years ago Closed 3 years ago

Add test case for getFontPreviewData()

Categories

(DevTools :: Shared Components, enhancement)

enhancement

Tracking

(firefox89 fixed)

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: sebo, Assigned: sebo)

References

Details

Attachments

(1 file)

In bug 872078 support for multi-line font previews got added, though at the moment there is no test case checking the functionality of the underlying getFontPreviewData() method.

This bug is meant to create an automated test case for it next to https://searchfox.org/mozilla-central/source/devtools/server/tests/xpcshell/test_getRuleText.js.

The test case requires some system and web fonts to be loaded to generate a preview for them.

See also Julien's note in Phabricator.

Sebastian

I think it's going to be difficult to use xpcshell tests here, since the helper relies on document APIs.
Instead, let's add a browser mochitest. I will share a test skeleton.

See basic test at https://hg.mozilla.org/try/rev/19ddb21d62b48da5a281292c54c28f7c975b980d
Needs more asserts but should be enough to get started.

:sebo, are you interested in picking this up?

Flags: needinfo?(sebastianzartner)

Sure, I'll have a look at it. Thank you for providing the info and the basic test!

Sebastian

Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED
Flags: needinfo?(sebastianzartner)
Pushed by sebastianzartner@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/46f85b2a6a5f
Added test case for getFontPreviewData(). r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: