Bug 738192 follow-up. Make layout/reftests/svg/dynamic-text-04.svg use MozReftestInvalitade instead of setTimeout to avoid random orange. r=me.

This commit is contained in:
Jonathan Watt 2012-06-24 15:17:19 +01:00
parent 4b8d2583b0
commit 39ecce06f3

View File

@ -1,16 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" onload="setTimeout('go()', 0);">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
class="reftest-wait">
<title>Testcase for dynamic changes of rotate attributes</title>
<!-- based on http://www.w3.org/TR/SVG/images/text/tspan05.svg -->
<script type="text/javascript">
function go() {
document.getElementById("parent").setAttribute("rotate", "5,15,25,35,45,55");
document.getElementById("child1").setAttribute("rotate", "-10,-20,-30,-40");
document.getElementById("child2").setAttribute("rotate", "70,60,50,40,30,20,10");
document.getElementById("child5").setAttribute("rotate", "-10");
}
document.addEventListener("MozReftestInvalidate", go, false);
// in case we're not gecko
setTimeout(go, 3000);
function go() {
document.getElementById("parent").setAttribute("rotate", "5,15,25,35,45,55");
document.getElementById("child1").setAttribute("rotate", "-10,-20,-30,-40");
document.getElementById("child2").setAttribute("rotate", "70,60,50,40,30,20,10");
document.getElementById("child5").setAttribute("rotate", "-10");
document.documentElement.removeAttribute("class");
}
</script>
<text id="parent" font-size="32" x="40" y="40">
Not

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB