Index: LayoutTests/fast/events/key-events-in-editable-gridbox.html |
diff --git a/LayoutTests/fast/events/key-events-in-editable-gridbox.html b/LayoutTests/fast/events/key-events-in-editable-gridbox.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b6c45190127fbb08fd3e6293125201fb3bd57401 |
--- /dev/null |
+++ b/LayoutTests/fast/events/key-events-in-editable-gridbox.html |
@@ -0,0 +1,38 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
rune
2015/02/26 10:38:50
html, head, and body should be left out when not n
changseok
2015/02/26 11:28:54
Done.
|
+<script src="../../resources/js-test.js"></script> |
+<style> |
+ #target { |
+ display: grid; |
+ display: -webkit-grid; |
+ } |
+</style> |
+<script> |
+ var targetDiv; |
+ function test() |
+ { |
+ targetDiv = document.getElementById('target'); |
+ targetDiv.focus(); |
+ |
+ // Move cursor to the end of line. |
+ getSelection().modify('move', 'forward', 'lineboundary'); |
+ |
+ document.execCommand("insertText", false, "EST"); |
+ shouldBeEqualToString("targetDiv.innerText", "TEST"); |
+ |
+ document.execCommand("delete"); |
+ document.execCommand("delete"); |
+ document.execCommand("delete"); |
+ document.execCommand("delete"); |
+ shouldBeEmptyString("targetDiv.innerText"); |
+ |
+ document.execCommand("insertText", false, "TEST"); |
+ shouldBeEqualToString("targetDiv.innerText", "TEST"); |
+ } |
rune
2015/02/26 10:38:50
You shouldn't need to wait for an onload here? Cou
changseok
2015/02/26 11:28:54
You're right. Done.
|
+</script> |
+</head> |
+<body onload="test()"> |
+<div id="target" contentEditable>T</div> |
+</body> |
+</html> |