Bug 1943761 - Add class alignment to the mozsearch analysis file. r=asuth
[gecko.git] / dom / svg / test / test_text_update.html
blobd4677aaeacfca34f52616e794c3ac8779c281ec3
1 <!DOCTYPE html>
2 <title>Test for Bug 876831</title>
3 <script src="/tests/SimpleTest/SimpleTest.js"></script>
4 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
5 <body>
6 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=876831">Mozilla Bug 876831</a>
7 <p id="display"</p>
9 <!--
10 Test that the frame tree will be reflowed after a DOM mutation
11 and just before an SVG DOM method does its work.
12 -->
14 <svg>
15 <text>ab</text>
16 </svg>
18 <pre id="test">
19 <script class="testbody" type="application/javascript">
20 var text = document.querySelector("text");
22 var length = text.getComputedTextLength();
23 ok(length > 0, "text.getComputedTextLength() > 0");
25 text.firstChild.nodeValue += "cd";
26 ok(text.getComputedTextLength() > length, "text.getComputedTextLength() changes directly after DOM mutation");
28 text.firstChild.remove();
29 is(text.getComputedTextLength(), 0, "text.getComputedTextLength() == 0 after removing child");
30 </script>
31 </pre>