Skip to content

Commit

Permalink
[mathml] Use Ahem font in mathml/relations/css-styling/display-2.html
Browse files Browse the repository at this point in the history
That way we ensure that the font is the same in all platforms,
and we just need a generic -expected.txt file.

Change-Id: Ia5751e5de15c007619968f47f7015df49480d049
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3009216
Reviewed-by: Frédéric Wang <fwang@igalia.com>
Commit-Queue: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#899017}
  • Loading branch information
mrego authored and chromium-wpt-export-bot committed Jul 7, 2021
1 parent 008a4be commit 9a559f4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mathml/relations/css-styling/display-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/mathml/support/layout-comparison.js"></script>
<script src="/mathml/support/mathml-fragments.js"></script>
<script src="/mathml/support/fonts.js"></script>
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
mfrac {
padding: 0;
Expand Down Expand Up @@ -97,7 +99,7 @@
};

setup({ explicit_done: true });
window.addEventListener("load", runTests);
window.addEventListener("load", () => { loadAllFonts().then(runTests); });

function runTests() {

Expand All @@ -108,7 +110,7 @@
replace(/X/g, `<mspace style="display: inline-block; width: ${Xsize}px; height: ${Xsize}px; background: black"></mspace>`);
let reference = mathtest.
replace(/maction|math|mfrac|mmultiscripts|mover|mover|mpadded|mrow|mspace|msubsup|msub|msup|mtable|munderover|munder/g, "div");
document.body.insertAdjacentHTML("beforeend", `<div style="position: absolute;">\
document.body.insertAdjacentHTML("beforeend", `<div style="font: 20px/1 Ahem; position: absolute;">\
<div><span>${key}:</span>${mathtest}</div>\
<div><span>${key}:</span>${reference}</div>\
</div>`);
Expand Down

0 comments on commit 9a559f4

Please sign in to comment.