Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
-
CI results over the last 21 days
- Manifest: dom/reporting/tests/mochitest.toml
<!DOCTYPE HTML>
<html>
<head>
<title>Test for parameters in deprecation reports</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<script>
add_task(async function test_mathvariant() {
await SpecialPowers.pushPrefEnv({
set: [["mathml.legacy_mathvariant_attribute.disabled", false]],
});
const id = "MathML_DeprecatedMathVariant";
const report = await new Promise(resolve => {
const observer = new ReportingObserver(reports => {
const found = reports.find(r => r.body.id == id);
if (found) {
observer.disconnect();
resolve(found);
}
}, { types: ["deprecation"] });
observer.observe();
mi.setAttribute("mathvariant", "fraktur");
mi.textContent = "A";
math.appendChild(mi);
document.body.appendChild(math);
getComputedStyle(mi).fontStyle;
});
ok(report.body.message.includes("fraktur"),
`The message includes the parameter: ${report.body.message}`);
ok(!report.body.message.includes("%S"),
"The message doesn't include an unreplaced placeholder");
});
</script>
</body>
</html>