/*
We want to check that bidi is detected correctly. So, we have a reference
document where ltr is set explicitely with <bdo> element. Then, we compare
it with test document.
In mozilla, once bidi has been detected in a document, document always
consider it's in bidi mode. So, if one fragment enables bidi correctly, and
we create or update a fragment in the same document, that operation may not
enable bidi by itself, but it will not be detected. So, we need to have new
document for each test.
So, instead of many diferent reftests, this mochitest implements a
reftest-like. It creates reference text fragments in reference iframe, test
text fragments in test iframe, and compare the documents. Then, it reloads
test iframe. Reference iframe does not need to be reloaded between tests.
It's ok (and maybe, desired) to keep bidi always enabled in that document.
*/
var page = `<!DOCTYPEhtml>
<html><meta charset='UTF-8'><body><p id="content"></p></body></html>`; var refFrame = document.getElementById("iframe-ref") var testFrame = document.getElementById("iframe-test");
refFrame.addEventListener("load", function() {
testFrame.addEventListener("load", async function() {
let {done} = tests.next();
if (!done) {
ok(compareSnapshots(await snapshotWindow(testFrame.contentWindow),
await snapshotWindow(refFrame.contentWindow), true)[0], "bidi is not detected correctly");
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.