"use strict"; // TODO: iframes, contenteditable/designMode // Everything is done in functions in this test harness, so we have to declare // all the variables before use to make sure they can be reused. var selection; var testDiv, paras, detachedDiv, detachedPara1, detachedPara2, foreignDoc, foreignPara1, foreignPara2, xmlDoc, xmlElement, detachedXmlElement, detachedTextNode, foreignTextNode, detachedForeignTextNode, xmlTextNode, detachedXmlTextNode, processingInstruction, detachedProcessingInstruction, comment, detachedComment, foreignComment, detachedForeignComment, xmlComment, detachedXmlComment, docfrag, foreignDocfrag, xmlDocfrag, doctype, foreignDoctype, xmlDoctype; var testRanges, testPoints, testNodes; function setupRangeTests() { selection = getSelection(); testDiv = document.querySelector("#test"); if (testDiv) { testDiv.parentNode.removeChild(testDiv); } testDiv = document.createElement("div"); testDiv.id = "test"; document.body.insertBefore(testDiv, document.body.firstChild); // Test some diacritics, to make sure browsers are using code units here // and not something like grapheme clusters. testDiv.innerHTML = "

Äb̈c̈d̈ëf̈g̈ḧ\n" + "

Qrstuvwx" + "