<!doctype html>
<title>text-align: match-parent on li</title>
<meta name="viewport" content="width=device-width">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<ul dir=rtl><li dir=ltr></li></ul>
<ul dir=ltr><li dir=rtl></li></ul>
<script>
  test(() => {
    const li = document.querySelector('li[dir=ltr]');
    assert_equals(getComputedStyle(li).textAlign, 'right');
  }, '<ul dir=rtl><li dir=ltr>');

  test(() => {
    const li = document.querySelector('li[dir=rtl]');
    assert_equals(getComputedStyle(li).textAlign, 'left');
  }, '<ul dir=ltr><li dir=rtl>');
</script>
