Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
/* Any copyright is dedicated to the Public Domain.
"use strict";
const TEST_URI = URL_ROOT + "doc_browser_fontinspector.html";
// Verify that a styled input field element is showing proper font information
// in its font tab.
add_task(async function () {
const { inspector, view } = await openFontInspectorForURL(TEST_URI);
const viewDoc = view.document;
await selectNode(".input-field", inspector);
const fontEls = getUsedFontsEls(viewDoc);
Assert.equal(fontEls.length, 1, `Used fonts found for styled input element`);
Assert.equal(
fontEls[0].textContent,
"Ostrich Sans Medium",
`Proper font found: 'Ostrich Sans Medium' for styled input.`
);
});