function verifyResult(event) {
let i = event.data.index;
let curFrame = document.getElementById("test" + i);
let mode = SpecialPowers.wrap(curFrame).contentDocument.compatMode;
is(mode, doctypes[i], doctypes[i + 1]);
if (i == doctypes.length - 2) {
window.removeEventListener("message", verifyResult);
SimpleTest.finish();
}
}
// //
// Insert a hidden iframe into the document, with the src
// containing the test doctype. The iframe's onload
// function is set to call the test's verification step.
//
function insert_iframe(index, doctype) { var elm = document.createElement("iframe");
elm.setAttribute("id", "test" + index);
elm.setAttribute("src", "data:text/html," + doctype + '');
elm.setAttribute("style", "display:none");
document.getElementsByTagName("body")[0].appendChild(elm);
}
// //
// Iterate over the tests
//
function doTest() {
for (var i = 0; i < doctypes.length; i += 2) {
insert_iframe(i, doctypes[i + 1]);
}
}
// //
// Run the compatbility mode tests.
//
SimpleTest.waitForExplicitFinish();
doTest();
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 ist noch experimentell.