mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
a25701a3f7
find /files/mozilla/build/d/_tests/testing/mochitest/tests/ | egrep "\.(xhtml|html|xml|js)$" | grep -v SimpleTest | grep -vi mochikit | grep -v simpleThread | grep -v test_ipc_messagemanager_blob.html | grep -v "indexedDB/test" | xargs grep -l Components | xargs grep -L enablePrivilege | perl -pe 's#.*mochitest/tests/##' | xargs perl -p -i.bakkk -e 's/Components\.interfaces(\s|;|\.|\[)/SpecialPowers\.Ci$1/g, s/SpecialPowers\.wrap\(Components\)\.(.)(lasses|tils|nterfaces|esults)/SpecialPowers.C$1/g, s/(?<![\.a-zA-Z])Components/SpecialPowers\.Components/g, s/window\.Components/window\.SpecialPowers\.Components/g'
22 lines
686 B
HTML
22 lines
686 B
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<head>
|
|
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
|
</head>
|
|
<body onload="doTest()">
|
|
<input type=text>
|
|
<script>
|
|
function doTest() {
|
|
var d = document.querySelector("input");
|
|
d.value = "b";
|
|
d.focus();
|
|
var editor = SpecialPowers.wrap(d).QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement).editor;
|
|
var sel = editor.selection;
|
|
var t = editor.rootElement.firstChild;
|
|
sel.collapse(t, 1); // put the caret at the end of the textbox
|
|
document.documentElement.removeAttribute("class");
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|