diff options
Diffstat (limited to 'tests/wpt/web-platform-tests/mathml/support/box-comparison.js')
-rw-r--r-- | tests/wpt/web-platform-tests/mathml/support/box-comparison.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/wpt/web-platform-tests/mathml/support/box-comparison.js b/tests/wpt/web-platform-tests/mathml/support/box-comparison.js index b1e91cdd99a..77d145b3632 100644 --- a/tests/wpt/web-platform-tests/mathml/support/box-comparison.js +++ b/tests/wpt/web-platform-tests/mathml/support/box-comparison.js @@ -15,14 +15,16 @@ function measureSpaceAround(id) { return spaceBetween(childBox, parentBox); } -function compareSpaceWithAndWithoutStyle(tag, style, parentStyle) { +function compareSpaceWithAndWithoutStyle(tag, style, parentStyle, direction) { if (!FragmentHelper.isValidChildOfMrow(tag) || FragmentHelper.isEmpty(tag)) throw `Invalid argument: ${tag}`; + if (!direction) + direction = "ltr"; document.body.insertAdjacentHTML("beforeend", `<div>\ -<math><mrow>${MathMLFragments[tag]}</mrow></math>\ -<math><mrow>${MathMLFragments[tag]}</mrow></math>\ +<math><mrow dir="${direction}">${MathMLFragments[tag]}</mrow></math>\ +<math><mrow dir="${direction}">${MathMLFragments[tag]}</mrow></math>\ </div>`); var div = document.body.lastElementChild; |