layout/base/tests/bug106855-1-ref.html
author Masayuki Nakano <masayuki@d-toybox.com>
Wed, 07 Dec 2011 14:13:06 +0900
changeset 83865 34b8fe0283576a3771e804b6d0c1d609eb1013c1
parent 75087 1188456710819d4606e74396be333ead9fe63261
child 83877 0c0b9724b1ada8550c34805926e57f41195250b4
permissions -rw-r--r--
Bug 700199 EventUtils.js should use synthesized events for sendKey(), sendChar() and sendString() rather than untrusted events r=ehsan+smaug+enndeakin+dolske

<!DOCTYPE HTML><html><head>
  <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
</head>
<body>
x<br>
<textarea id="t" rows="4">
A


</textarea><br>
y
<script>
  // Position the caret at the last line
  var sel = window.getSelection();
  sel.removeAllRanges();

  var area = document.getElementById('t');
  area.focus();

  sendKey('RIGHT');  // now after "A"
  sendKey('RIGHT');  // 
  sendKey('RIGHT');  // 
  sendKey('RIGHT');  // now at the last line
</script>

</body>
</html>