Added more editing layout tests.
* layout-tests/editing/deleting/delete-tab-001-expected.txt: Added.
* layout-tests/editing/deleting/delete-tab-001.html: Added.
* layout-tests/editing/deleting/delete-tab-002-expected.txt: Added.
* layout-tests/editing/deleting/delete-tab-002.html: Added.
* layout-tests/editing/deleting/delete-tab-003-expected.txt: Added.
* layout-tests/editing/deleting/delete-tab-003.html: Added.
* layout-tests/editing/deleting/delete-tab-004-expected.txt: Added.
* layout-tests/editing/deleting/delete-tab-004.html: Added.
* layout-tests/editing/editing.js: Fixed a little bug in one of the "delayed" commands.
* layout-tests/editing/inserting/insert-tab-001-expected.txt: Added.
* layout-tests/editing/inserting/insert-tab-001.html: Added.
* layout-tests/editing/inserting/insert-tab-002-expected.txt: Added.
* layout-tests/editing/inserting/insert-tab-002.html: Added.
* layout-tests/editing/inserting/insert-tab-003-expected.txt: Added.
* layout-tests/editing/inserting/insert-tab-003.html: Added.
* layout-tests/editing/inserting/insert-tab-004-expected.txt: Added.
* layout-tests/editing/inserting/insert-tab-004.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7418
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderInline {SPAN} at (0,0) size 56x28
+ RenderText {TEXT} at (14,14) size 56x28
+ text run at (14,14) width 56: " foo"
+ RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start: position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
+upstream: position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
+downstream: position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ typeCharacterCommand('\t');
+ typeCharacterCommand('\t');
+ for (i = 0; i < 4; i++)
+ deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderInline {SPAN} at (0,0) size 56x28
+ RenderText {TEXT} at (14,14) size 56x28
+ text run at (14,14) width 56: "foo "
+selection is CARET:
+start: position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream: position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 3; i++)
+ moveSelectionForwardByCharacterCommand();
+ typeCharacterCommand('\t');
+ typeCharacterCommand('\t');
+ for (i = 0; i < 4; i++)
+ deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderInline {SPAN} at (0,0) size 56x28
+ RenderText {TEXT} at (14,14) size 56x28
+ text run at (14,14) width 56: "fo o"
+ RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start: position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream: position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 2; i++)
+ moveSelectionForwardByCharacterCommand();
+ typeCharacterCommand('\t');
+ typeCharacterCommand('\t');
+ for (i = 0; i < 4; i++)
+ deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x84 [border: (2px solid #FF0000)]
+ RenderInline {SPAN} at (0,0) size 56x56
+ RenderBR {BR} at (14,14) size 0x28
+ RenderText {TEXT} at (14,42) size 56x28
+ text run at (14,42) width 56: " foo"
+ RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start: position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
+upstream: position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
+downstream: position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ insertNewlineCommand();
+ typeCharacterCommand('\t');
+ typeCharacterCommand('\t');
+ for (i = 0; i < 4; i++)
+ deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
}
function typeCharacterCommand(c) {
if (commandDelay > 0) {
- window.setTimeout(execTypeCharacterCommand, commandCount * commandDelay);
+ window.setTimeout(execTypeCharacterCommand, commandCount * commandDelay, c);
commandCount++;
}
else {
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderInline {SPAN} at (0,0) size 56x28
+ RenderText {TEXT} at (14,14) size 56x28
+ text run at (14,14) width 56: " foo"
+ RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start: position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
+upstream: position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
+downstream: position 4 of child 1 {TEXT} of child 1 {SPAN} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ typeCharacterCommand('\t');
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderInline {SPAN} at (0,0) size 56x28
+ RenderText {TEXT} at (14,14) size 56x28
+ text run at (14,14) width 56: "foo "
+selection is CARET:
+start: position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream: position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 7 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 3; i++)
+ moveSelectionForwardByCharacterCommand();
+ typeCharacterCommand('\t');
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
+ RenderInline {SPAN} at (0,0) size 56x28
+ RenderText {TEXT} at (14,14) size 56x28
+ text run at (14,14) width 56: "fo o"
+ RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start: position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+upstream: position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
+downstream: position 6 of child 1 {TEXT} of child 2 {SPAN} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 2; i++)
+ moveSelectionForwardByCharacterCommand();
+ typeCharacterCommand('\t');
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderBlock {DIV} at (0,0) size 784x84 [border: (2px solid #FF0000)]
+ RenderInline {SPAN} at (0,0) size 56x56
+ RenderBR {BR} at (14,14) size 0x28
+ RenderText {TEXT} at (14,42) size 56x28
+ text run at (14,42) width 56: " foo"
+ RenderText {TEXT} at (0,0) size 0x0
+selection is CARET:
+start: position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
+upstream: position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
+downstream: position 4 of child 2 {TEXT} of child 1 {SPAN} of root {DIV}
--- /dev/null
+<html>
+<head>
+
+<style>
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+ font-size: 24px;
+}
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ insertNewlineCommand();
+ typeCharacterCommand('\t');
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body>
+<div contenteditable id="root" class="editing">
+<span id="test">foo</span>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
+2004-08-31 Ken Kocienda <kocienda@apple.com>
+
+ Reviewed by me
+
+ Added more editing layout tests.
+
+ * layout-tests/editing/deleting/delete-tab-001-expected.txt: Added.
+ * layout-tests/editing/deleting/delete-tab-001.html: Added.
+ * layout-tests/editing/deleting/delete-tab-002-expected.txt: Added.
+ * layout-tests/editing/deleting/delete-tab-002.html: Added.
+ * layout-tests/editing/deleting/delete-tab-003-expected.txt: Added.
+ * layout-tests/editing/deleting/delete-tab-003.html: Added.
+ * layout-tests/editing/deleting/delete-tab-004-expected.txt: Added.
+ * layout-tests/editing/deleting/delete-tab-004.html: Added.
+ * layout-tests/editing/editing.js: Fixed a little bug in one of the "delayed" commands.
+ * layout-tests/editing/inserting/insert-tab-001-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-tab-001.html: Added.
+ * layout-tests/editing/inserting/insert-tab-002-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-tab-002.html: Added.
+ * layout-tests/editing/inserting/insert-tab-003-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-tab-003.html: Added.
+ * layout-tests/editing/inserting/insert-tab-004-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-tab-004.html: Added.
+
2004-08-31 Ken Kocienda <kocienda@apple.com>
Reviewed by John