mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
67c7d5d5e2
--HG-- extra : rebase_source : a343610b06983d3328f3ddb2e7025193ab275094
46 lines
1.3 KiB
HTML
46 lines
1.3 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=332636
|
|
-->
|
|
<head>
|
|
<title>Test for Bug 332636</title>
|
|
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
|
</head>
|
|
<body>
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=332636">Mozilla Bug 332636</a>
|
|
<p id="display"></p>
|
|
<div id="content">
|
|
<div id="edit" contenteditable="true">a𐐀b</div>
|
|
<div id="edit2" contenteditable="true">a𐨏b</div>
|
|
</div>
|
|
<pre id="test">
|
|
<script type="application/javascript">
|
|
|
|
/** Test for Bug 332636 **/
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
addLoadEvent(runTest);
|
|
|
|
function test(edit) {
|
|
edit.focus();
|
|
var sel = window.getSelection();
|
|
sel.collapse(edit.childNodes[0], edit.textContent.length - 1);
|
|
synthesizeKey("VK_BACK_SPACE", {});
|
|
is(edit.textContent, "ab", "The backspace key should delete the UTF-16 surrogate pair correctly");
|
|
}
|
|
|
|
function runTest() {
|
|
test(document.getElementById("edit"));
|
|
test(document.getElementById("edit2"));
|
|
SimpleTest.finish();
|
|
}
|
|
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|