mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update web-platform-tests to revision 5e7cbed423a3040dc8ca50359dd033a46dba5cf4
This commit is contained in:
parent
fdc3a3ffc3
commit
629790db5d
53 changed files with 344 additions and 375 deletions
34
tests/wpt/web-platform-tests/css/css-ruby/ruby-position.html
Normal file
34
tests/wpt/web-platform-tests/css/css-ruby/ruby-position.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-ruby/#rubypos">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
|
||||
<p><ruby id="o1" style="ruby-position: over">base<rt>annotation</rt></ruby></p>
|
||||
<p><ruby id="o2" style="ruby-position: under">base<rt style="ruby-position: over">annotation</rt></ruby></p>
|
||||
|
||||
<p><ruby id="u1" style="ruby-position: under">base<rt>annotation</rt></ruby></p>
|
||||
<p><ruby id="u2">base<rt style="ruby-position: under">annotation</rt></ruby></p>
|
||||
|
||||
<script>
|
||||
test(() => {
|
||||
const o1 = document.querySelector('#o1');
|
||||
assert_true(o1.querySelector('rt').getBoundingClientRect().top <= o1.getBoundingClientRect().top);
|
||||
}, 'ruby-position:over on <ruby> works');
|
||||
|
||||
test(() => {
|
||||
const o2 = document.querySelector('#o2');
|
||||
assert_true(o2.querySelector('rt').getBoundingClientRect().top <= o2.getBoundingClientRect().top);
|
||||
}, 'ruby-position:over on <rt> works');
|
||||
|
||||
test(() => {
|
||||
const u1 = document.querySelector('#u1');
|
||||
assert_true(u1.querySelector('rt').getBoundingClientRect().bottom >= u1.getBoundingClientRect().bottom);
|
||||
}, 'ruby-position:under on <ruby> works');
|
||||
|
||||
test(() => {
|
||||
const u2 = document.querySelector('#u2');
|
||||
assert_true(u2.querySelector('rt').getBoundingClientRect().bottom >= u2.getBoundingClientRect().bottom);
|
||||
}, 'ruby-position:under on <rt> works');
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue