Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / text / text-bbox-of-empty-after-change.html
blobcc9efa4bf0a63280e59ec824b844287b1c43d8ab
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <svg height="0" font-size="100"><text></text></svg>
5 <script>
6 test(function() {
7 var text = document.querySelector('text');
8 assert_equals(text.getBBox().width, 0, 'before adding text content');
9 text.textContent = 'MMMMM';
10 assert_greater_than(text.getBBox().width, 0, 'after adding text content');
11 text.textContent = '';
12 assert_equals(text.getBBox().width, 0, 'after clearing text content');
13 }, 'Bounding box of <text> changes to empty when text content is changed to empty.');
14 </script>