Index: LayoutTests/fast/text-autosizing/text-removal.html |
diff --git a/LayoutTests/fast/text-autosizing/text-removal.html b/LayoutTests/fast/text-autosizing/text-removal.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2efd234a8332621afaf167729f126dbfa9bdfdeb |
--- /dev/null |
+++ b/LayoutTests/fast/text-autosizing/text-removal.html |
@@ -0,0 +1,32 @@ |
+<!DOCTYPE html> |
+<meta name="viewport" content="width=800"> |
+<script src="../../resources/js-test.js"></script> |
+<script src="resources/autosizingTest.js"></script> |
+<style> |
+ html { |
+ font-size: 16px; |
+ line-height: 16px; |
+ } |
+ body { |
+ width: 800px; |
+ margin: 0; |
+ overflow-y: hidden; |
+ } |
+</style> |
+<span id="span1"> |
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor |
+ incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis |
+ nostrud exercitation ullamco laboris nisiut aliquip ex ea commodo consequat. |
+</span> |
+<span id="span2"></span> |
+<script> |
+ var forceLayout1 = document.body.offsetTop; |
+ var span1 = document.getElementById('span1'); |
+ var span2 = document.getElementById('span2'); |
+ |
+ span1.removeChild(span1.firstChild); |
+ var forceLayout2 = document.body.offsetTop; |
+ |
+ shouldBeEqualToString("window.getComputedStyle(span1).lineHeight", "16px"); |
+ shouldBeEqualToString("window.getComputedStyle(span2).lineHeight", "16px"); |
+</script> |