зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1623387 [wpt PR 22323] - [mathml] Test width and display=block on <math>, a=testonly
Automatic update from web-platform-tests [mathml] Test width and display=block on <math> (#22323) -- wpt-commits: c903e42d305bea2c615fe11b4281af507706ce32 wpt-pr: 22323
This commit is contained in:
Родитель
5de426acfa
Коммит
46d25f12ff
|
@ -31,7 +31,7 @@
|
||||||
1,
|
1,
|
||||||
"math must be centered.");
|
"math must be centered.");
|
||||||
assert_approx_equals(after_block.left, content.left, 1,
|
assert_approx_equals(after_block.left, content.left, 1,
|
||||||
"content before must be left aligned");
|
"content after must be left aligned");
|
||||||
assert_less_than_equal(before_block.bottom, mspace_block.top,
|
assert_less_than_equal(before_block.bottom, mspace_block.top,
|
||||||
"new line before math");
|
"new line before math");
|
||||||
assert_less_than_equal(mspace_block.bottom, after_block.top,
|
assert_less_than_equal(mspace_block.bottom, after_block.top,
|
||||||
|
@ -56,6 +56,25 @@
|
||||||
assert_less_than_equal(mspace_inline.right, after_inline.left,
|
assert_less_than_equal(mspace_inline.right, after_inline.left,
|
||||||
"content after must be on the right of math");
|
"content after must be on the right of math");
|
||||||
}, `Test inline math ${transform}`);
|
}, `Test inline math ${transform}`);
|
||||||
|
|
||||||
|
var before_block_and_specified_width = getBox("before_block_and_specified_width");
|
||||||
|
var mspace_width = getBox("mspace_width");
|
||||||
|
var after_block_and_specified_width = getBox("after_block_and_specified_width");
|
||||||
|
test(function() {
|
||||||
|
assert_true(MathMLFeatureDetection.has_mspace());
|
||||||
|
assert_approx_equals(before_block_and_specified_width.left, content.left, 1,
|
||||||
|
"content before must be left aligned");
|
||||||
|
assert_approx_equals((mspace_width.left + mspace_width.right) / 2,
|
||||||
|
(content.left + content.right) / 2,
|
||||||
|
1,
|
||||||
|
"math must be centered.");
|
||||||
|
assert_approx_equals(after_block_and_specified_width.left, content.left, 1,
|
||||||
|
"content after must be left aligned");
|
||||||
|
assert_less_than_equal(before_block_and_specified_width.bottom, mspace_width.top,
|
||||||
|
"new line before math");
|
||||||
|
assert_less_than_equal(mspace_width.bottom, after_block_and_specified_width.top,
|
||||||
|
"new line after math");
|
||||||
|
}, `Test width on display=block math ${transform}`);
|
||||||
}
|
}
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
@ -86,6 +105,10 @@
|
||||||
<span id="before_inline" class="square"></span>
|
<span id="before_inline" class="square"></span>
|
||||||
<math display="inline"><mspace id="mspace_inline" width="50px" height="50px"/></math>
|
<math display="inline"><mspace id="mspace_inline" width="50px" height="50px"/></math>
|
||||||
<span id="after_inline" class="square"></span>
|
<span id="after_inline" class="square"></span>
|
||||||
|
<br/>
|
||||||
|
<span id="before_block_and_specified_width" class="square"></span>
|
||||||
|
<math display="block" style="width:100px"><mspace id="mspace_width" width="50px" height="50px"/></math>
|
||||||
|
<span id="after_block_and_specified_width" class="square"></span>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче