gecko/js/xpconnect/tests/mochitest/file_bug650273.html
Bobby Holley c64d31c5e0 Bug 792036 - Fix up tests to avoid relying on the existence of window.Components (MANUAL). r=mccr8
These are the manual fixes that the ensuing auto-generation can't deal with. Some of them
just fix up formatting (such as Components.\nFoo, so that subsequent auto-generation can
work better).
2012-09-24 14:46:28 +02:00

32 lines
751 B
HTML

<!-- test by moz_bug_r_a4@yahoo.com -->
<body onload="a()">
<script>
var targetUrl = "http://example.com/";
var l;
function a() {
var o = {};
o.toString = function() {
l();
return "a";
};
var f = SpecialPowers.Components.lookupMethod(document, "title");
setTimeout(f, 0, o);
}
function l() {
var l = false;
onunload = function() {
l = true;
};
location = targetUrl;
do {
var r = new XMLHttpRequest();
r.open("GET", location.href, false);
r.overrideMimeType("text/plain");
try { r.send(null); }
catch (e) {}
} while (!l);
}
</script>