function initTest() {
// Allow all cookies, then do the actual test initialization
SpecialPowers.pushPrefEnv({ "set": [
// Some of this test relies on redirecting to data: URLs from http.
["network.allow_redirect_to_data", true],
]
}).then(initTestCallback);
}
function initTestCallback() {
window.addEventListener("message", function(e) {
gen.next(e.data);
});
gen = runTest();
gen.next();
}
function* runTest() { var loader = document.getElementById('loader'); var loaderWindow = loader.contentWindow;
loader.onload = function () { gen.next() };
res = JSON.parse(yield);
is(res.didFail, false, "shouldn't have failed for " + allowOrigin);
is(res.status, 200, "wrong status for " + allowOrigin);
is(res.statusText, "OK", "wrong status text for " + allowOrigin);
is(res.responseXML, "hello pass", "wrong responseXML in test for " + allowOrigin);
is(res.responseText, "hello pass\n", "wrong responseText in test for " + allowOrigin);
is(res.events.join(","), "opening,rs1,sending,loadstart,rs2,rs3,rs4,load,loadend", "wrong responseText in test for " + allowOrigin);
}
res = JSON.parse(yield);
is(res.didFail, true, "should have failed for " + allowOrigin);
is(res.responseText, "", "should have no text for " + allowOrigin);
is(res.status, 0, "should have no status for " + allowOrigin);
is(res.statusText, "", "wrong status text for " + allowOrigin);
is(res.responseXML, null, "should have no XML for " + allowOrigin);
is(res.events.join(","), "opening,rs1,sending,loadstart,rs4,error,loadend", "wrong events in test for " + allowOrigin);
is(res.progressEvents, 0, "wrong events in test for " + allowOrigin);
}
}
SimpleTest.finish();
}
addLoadEvent(initTest);
</script>
</pre>
</body>
</html>
Messung V0.5
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.