Bug 778695 - Fix 328829-2.xhtml intermittent orange by using reftest-wait. r=dholbert, a=test-only
authorNathan Froyd <froydnj@mozilla.com>
Sat, 27 Oct 2012 12:35:24 -0400
changeset 109805 6e69f0d9da9820ac193b19fe1e55edbf7d0e33ce
parent 109804 5dcf75a41554397d126ce6659c7eb05955bf59e0
child 109806 9f45e5464e3a6a22c34540c7b6320dad72f75a6e
push id1686
push userryanvm@gmail.com
push dateSun, 11 Nov 2012 21:33:28 +0000
treeherdermozilla-beta@9f45e5464e3a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert, test-only
bugs778695, 328829
milestone17.0
Bug 778695 - Fix 328829-2.xhtml intermittent orange by using reftest-wait. r=dholbert, a=test-only
layout/reftests/bugs/328829-2.xhtml
--- a/layout/reftests/bugs/328829-2.xhtml
+++ b/layout/reftests/bugs/328829-2.xhtml
@@ -1,29 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html lang="en" xml:lang="en"
+<html lang="en" xml:lang="en" class="reftest-wait"
       xmlns="http://www.w3.org/1999/xhtml"
       xmlns:svg="http://www.w3.org/2000/svg">
 <head>
 	<title>Testcase, bug 328829</title>
 	<style type="text/css">
 	html, body, svg { margin: 0; padding: 0; border: none; }
 	body > svg { display:block; } /* don't leave room for descenders! */
 	</style>
 	<script type="application/javascript">
 
 	function run() {
-		setTimeout("document.getElementById('fonted').style.fontSize = '24px'", 0);
+		document.getElementById('fonted').style.fontSize = '24px';
+		document.documentElement.removeAttribute('class');
 	}
 
+	document.addEventListener("MozReftestInvalidate", run, false);
 	</script>
 </head>
-<body onload="run()" id="fonted" style="font-size: 12px">
+<body id="fonted" style="font-size: 12px">
 
 <svg:svg width="100%" height="100%">
 	<svg:g>
 		<svg:foreignObject width="100%" height="100%">
 			<span>hello</span> <span>world</span>
 		</svg:foreignObject>
 	</svg:g>
 </svg:svg>