servo/tests/content/test_caption.html
Andrew Hobden d4f4018e88 Add test.
2014-11-15 09:52:17 -08:00

24 lines
586 B
HTML

<html>
<head>
<script src="harness.js"></script>
</head>
<table id="t">
<caption id="tcaption">old caption</caption>
</table>
<script>
var t = document.getElementById("t");
var tcaption = document.getElementById("tcaption");
is(t.caption, tcaption);
is(t.caption.innerHTML, "old caption");
var newCaption = document.createElement("caption");
newCaption.innerHTML = "new caption";
t.caption = newCaption;
is(newCaption.parentNode, t);
is(t.caption, newCaption);
// Test for https://github.com/servo/servo/issues/3997
t.getBoundingClientRect();
</script>
</html>