Bug 916004, preload datasource to see if it prevents intermittent orange, r=test-only-change

This commit is contained in:
Neil Deakin 2015-03-27 07:47:46 -04:00
Родитель 3bb7364380
Коммит 58e432260c
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -7,18 +7,26 @@
onload="boom();"> onload="boom();">
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<script type="text/javascript"> <script type="text/javascript">
<![CDATA[
SimpleTest.waitForExplicitFinish(); SimpleTest.waitForExplicitFinish();
function boom() function boom()
{ {
const RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].
getService(Components.interfaces.nsIRDFService);
var src = window.location.href.replace(/test_bug330010.xul/, "file_bug330010.rdf");
var ds = RDF.GetDataSourceBlocking(src);
var x = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "hbox"); var x = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "hbox");
generatedShape = document.getElementById("s").childNodes[3]; var generatedShape = document.getElementById("s").childNodes[3];
generatedShape.appendChild(x); generatedShape.appendChild(x);
document.documentElement.removeChild(document.getElementById("s")); document.documentElement.removeChild(document.getElementById("s"));
ok(true, "Didn't crash"); ok(true, "Didn't crash");
SimpleTest.finish(); SimpleTest.finish();
} }
]]>
</script> </script>
<html:div datasources="file_bug330010.rdf" ref="urn:root" flex="1" id="s"> <html:div datasources="file_bug330010.rdf" ref="urn:root" flex="1" id="s">