blob: 1c5744627357713dcbf4d0311a85c7bfa69095de [file] [log] [blame]
<html>
<head>
<script>
function test()
{
if (window.layoutTestController)
layoutTestController.dumpAsText();
var markup = document.getElementById("ruby").outerHTML;
if (markup == '<ruby id="ruby">base/<rp><span>left</span> rp/</rp><rt>text/</rt><rp>right <span>rp</span></rp></ruby>')
result = "TEST PASSED: Markup was correct";
else
result = "TEST FAILED: Markup was " + markup;
document.getElementById("result").firstChild.data = result;
}
</script>
</head>
<body onload="test()">
<p>The following is a test for parsing ruby &lt;rp&gt; and &lt;rt&gt; elements. According to HTML5 spec, end-tags for both are optional if followed by another &lt;rp&gt; or &lt;rt&gt;. However, they should NOT be auto-closed by other inline elements, such as &lt;span&gt;.</p>
<p id="result">TEST DID NOT RUN</p>
Before <ruby id="ruby">base/<rp><span>left</span> rp/<rt>text/<rp>right <span>rp</span></ruby> After
</body>
</html>