blob: cc9efa4bf0a63280e59ec824b844287b1c43d8ab [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<svg height="0" font-size="100"><text></text></svg>
<script>
test(function() {
var text = document.querySelector('text');
assert_equals(text.getBBox().width, 0, 'before adding text content');
text.textContent = 'MMMMM';
assert_greater_than(text.getBBox().width, 0, 'after adding text content');
text.textContent = '';
assert_equals(text.getBBox().width, 0, 'after clearing text content');
}, 'Bounding box of <text> changes to empty when text content is changed to empty.');
</script>