test_bug535806.xhtml (1243B)
1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/css" href="chrome://global/skin"?> 3 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?> 4 <!-- 5 https://bugzilla.mozilla.org/show_bug.cgi?id=535806 6 --> 7 <window title="Mozilla Bug 535806" 8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> 10 11 <!-- test results are displayed in the html:body --> 12 <body xmlns="http://www.w3.org/1999/xhtml"> 13 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=535806" 14 target="_blank">Mozilla Bug 535806</a> 15 </body> 16 17 <iframe id="f"/> 18 19 <!-- test code goes here --> 20 <script type="application/javascript"> 21 <![CDATA[ 22 /** Test for Bug 535806 */ 23 SimpleTest.waitForExplicitFinish(); 24 25 window.addEventListener("load", function() { 26 $("f").setAttribute("src", "bug535806-html.html"); 27 }); 28 29 function htmlLoaded() { 30 $("f").setAttribute("src", "bug535806-xul.xhtml"); 31 } 32 33 function xulLoaded() { 34 var doc = $("f").contentDocument; 35 is(doc.defaultView.getComputedStyle(doc.getElementById("s")).color, 36 "rgb(0, 128, 0)"); 37 SimpleTest.finish(); 38 } 39 40 41 ]]> 42 </script> 43 </window>