Explicitly set editingBehavior in some tests.
authorcsaavedra@igalia.com <csaavedra@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Mar 2013 00:33:25 +0000 (00:33 +0000)
committercsaavedra@igalia.com <csaavedra@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Mar 2013 00:33:25 +0000 (00:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=113383

Reviewed by Ryosuke Niwa.

These tests make assumptions on how word selection works.
Actually, word selection will work differently depending on the
editingBehavior in place, see bug 110487, so the only way to
ensure the following tests will do word selection as expected is
to use Mac editing behavior.

* editing/deleting/delete-by-word-001.html: Call setEditingBehavior("mac").
* editing/deleting/list-item-1.html: ditto.
* editing/deleting/non-smart-delete.html: ditto.
* editing/deleting/smart-delete-002.html: ditto.
* editing/deleting/smart-delete-across-editable-boundaries.html: ditto.
* editing/execCommand/hilitecolor.html: ditto.
* editing/execCommand/remove-formatting-2.html: ditto.
* editing/inserting/4960120-2.html: ditto.
* editing/inserting/insert-paragraph-02.html: ditto. ditto.
* editing/inserting/insert-paragraph-03.html: ditto.
* editing/inserting/insert-paragraph-04.html: ditto.
* editing/inserting/paragraph-outside-nested-divs.html: ditto.
* editing/inserting/paragraph-separator-01.html: ditto.
* editing/inserting/paragraph-separator-02.html: ditto.
* editing/inserting/paragraph-separator-03.html: ditto.
* editing/pasteboard/4242293-1.html: ditto.
* editing/pasteboard/4806874.html: ditto.
* editing/pasteboard/5006779.html: ditto.
* editing/pasteboard/8145-2.html: ditto.
* editing/pasteboard/bad-placeholder.html: ditto.
* editing/pasteboard/copy-text-with-backgroundcolor.html: ditto.
* editing/pasteboard/drag-drop-modifies-page.html: ditto.
* editing/pasteboard/get-data-text-plain-drop.html: ditto.
* editing/pasteboard/insert-div-text-into-text.html: ditto.
* editing/pasteboard/merge-end-3.html: ditto.
* editing/pasteboard/merge-end-5.html: ditto.
* editing/pasteboard/merge-end-borders.html: ditto.
* editing/pasteboard/paste-blockquote-3.html: ditto.
* editing/pasteboard/paste-list-004.html: ditto.
* editing/pasteboard/pasting-object.html: ditto.
* editing/selection/4932260-2.html: ditto.
* editing/selection/extend-by-word-002.html: ditto.
* editing/selection/extend-forward-by-word-over-non-editable.html: ditto.
* editing/selection/transformed-selection-rects.html: ditto.
* editing/style/5046875-1.html: ditto.
* editing/style/5046875-2.html: ditto.
* editing/style/fore-color-by-name.html: ditto.
* editing/style/relative-font-size-change-002.html: ditto.
* editing/style/relative-font-size-change-003.html: ditto.
* editing/style/relative-font-size-change-004.html: ditto.
* editing/style/style-boundary-005.html: ditto.
* editing/text-iterator/first-letter-word-boundary.html: ditto.
* editing/undo/undo-combined-delete-boundary.html: ditto.
* editing/undo/undo-combined-delete.html: ditto.
* editing/undo/undo-delete-boundary.html: ditto.
* editing/undo/undo-delete.html: ditto.
* editing/undo/undo-forward-delete-boundary.html: ditto.
* editing/undo/undo-forward-delete.html: ditto.
* fast/dom/34176.html: ditto.
* platform/chromium-win/editing/deleting/non-smart-delete-expected.txt: Updated.
* platform/efl/editing/deleting/non-smart-delete-expected.txt: Updated.
* platform/gtk/editing/deleting/non-smart-delete-expected.txt: Updated.
* platform/qt/editing/deleting/non-smart-delete-expected.txt: Updated.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147036 268f45cc-cd09-0410-ab3c-d52691b4dbfc

54 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-by-word-001.html
LayoutTests/editing/deleting/list-item-1.html
LayoutTests/editing/deleting/non-smart-delete.html
LayoutTests/editing/deleting/smart-delete-002.html
LayoutTests/editing/deleting/smart-delete-across-editable-boundaries.html
LayoutTests/editing/execCommand/hilitecolor.html
LayoutTests/editing/execCommand/remove-formatting-2.html
LayoutTests/editing/inserting/4960120-2.html
LayoutTests/editing/inserting/insert-paragraph-02.html
LayoutTests/editing/inserting/insert-paragraph-03.html
LayoutTests/editing/inserting/insert-paragraph-04.html
LayoutTests/editing/inserting/paragraph-outside-nested-divs.html
LayoutTests/editing/inserting/paragraph-separator-01.html
LayoutTests/editing/inserting/paragraph-separator-02.html
LayoutTests/editing/inserting/paragraph-separator-03.html
LayoutTests/editing/pasteboard/4242293-1.html
LayoutTests/editing/pasteboard/4806874.html
LayoutTests/editing/pasteboard/5006779.html
LayoutTests/editing/pasteboard/8145-2.html
LayoutTests/editing/pasteboard/bad-placeholder.html
LayoutTests/editing/pasteboard/copy-text-with-backgroundcolor.html
LayoutTests/editing/pasteboard/drag-drop-modifies-page.html
LayoutTests/editing/pasteboard/get-data-text-plain-drop.html
LayoutTests/editing/pasteboard/insert-div-text-into-text.html
LayoutTests/editing/pasteboard/merge-end-3.html
LayoutTests/editing/pasteboard/merge-end-5.html
LayoutTests/editing/pasteboard/merge-end-borders.html
LayoutTests/editing/pasteboard/paste-blockquote-3.html
LayoutTests/editing/pasteboard/paste-list-004.html
LayoutTests/editing/pasteboard/pasting-object.html
LayoutTests/editing/selection/4932260-2.html
LayoutTests/editing/selection/extend-by-word-002.html
LayoutTests/editing/selection/extend-forward-by-word-over-non-editable.html
LayoutTests/editing/selection/transformed-selection-rects.html
LayoutTests/editing/style/5046875-1.html
LayoutTests/editing/style/5046875-2.html
LayoutTests/editing/style/fore-color-by-name.html
LayoutTests/editing/style/relative-font-size-change-002.html
LayoutTests/editing/style/relative-font-size-change-003.html
LayoutTests/editing/style/relative-font-size-change-004.html
LayoutTests/editing/style/style-boundary-005.html
LayoutTests/editing/text-iterator/first-letter-word-boundary.html
LayoutTests/editing/undo/undo-combined-delete-boundary.html
LayoutTests/editing/undo/undo-combined-delete.html
LayoutTests/editing/undo/undo-delete-boundary.html
LayoutTests/editing/undo/undo-delete.html
LayoutTests/editing/undo/undo-forward-delete-boundary.html
LayoutTests/editing/undo/undo-forward-delete.html
LayoutTests/fast/dom/34176.html
LayoutTests/platform/chromium-win/editing/deleting/non-smart-delete-expected.txt
LayoutTests/platform/efl/editing/deleting/non-smart-delete-expected.txt
LayoutTests/platform/gtk/editing/deleting/non-smart-delete-expected.txt
LayoutTests/platform/qt/editing/deleting/non-smart-delete-expected.txt

index 0eeb10a..c8b9ddf 100644 (file)
@@ -1,5 +1,72 @@
 2013-03-27  Claudio Saavedra  <csaavedra@igalia.com>
 
+        Explicitly set editingBehavior in some tests.
+        https://bugs.webkit.org/show_bug.cgi?id=113383
+
+        Reviewed by Ryosuke Niwa.
+
+        These tests make assumptions on how word selection works.
+        Actually, word selection will work differently depending on the
+        editingBehavior in place, see bug 110487, so the only way to
+        ensure the following tests will do word selection as expected is
+        to use Mac editing behavior.
+
+        * editing/deleting/delete-by-word-001.html: Call setEditingBehavior("mac").
+        * editing/deleting/list-item-1.html: ditto.
+        * editing/deleting/non-smart-delete.html: ditto.
+        * editing/deleting/smart-delete-002.html: ditto.
+        * editing/deleting/smart-delete-across-editable-boundaries.html: ditto.
+        * editing/execCommand/hilitecolor.html: ditto.
+        * editing/execCommand/remove-formatting-2.html: ditto.
+        * editing/inserting/4960120-2.html: ditto.
+        * editing/inserting/insert-paragraph-02.html: ditto. ditto.
+        * editing/inserting/insert-paragraph-03.html: ditto.
+        * editing/inserting/insert-paragraph-04.html: ditto.
+        * editing/inserting/paragraph-outside-nested-divs.html: ditto.
+        * editing/inserting/paragraph-separator-01.html: ditto.
+        * editing/inserting/paragraph-separator-02.html: ditto.
+        * editing/inserting/paragraph-separator-03.html: ditto.
+        * editing/pasteboard/4242293-1.html: ditto.
+        * editing/pasteboard/4806874.html: ditto.
+        * editing/pasteboard/5006779.html: ditto.
+        * editing/pasteboard/8145-2.html: ditto.
+        * editing/pasteboard/bad-placeholder.html: ditto.
+        * editing/pasteboard/copy-text-with-backgroundcolor.html: ditto.
+        * editing/pasteboard/drag-drop-modifies-page.html: ditto.
+        * editing/pasteboard/get-data-text-plain-drop.html: ditto.
+        * editing/pasteboard/insert-div-text-into-text.html: ditto.
+        * editing/pasteboard/merge-end-3.html: ditto.
+        * editing/pasteboard/merge-end-5.html: ditto.
+        * editing/pasteboard/merge-end-borders.html: ditto.
+        * editing/pasteboard/paste-blockquote-3.html: ditto.
+        * editing/pasteboard/paste-list-004.html: ditto.
+        * editing/pasteboard/pasting-object.html: ditto.
+        * editing/selection/4932260-2.html: ditto.
+        * editing/selection/extend-by-word-002.html: ditto.
+        * editing/selection/extend-forward-by-word-over-non-editable.html: ditto.
+        * editing/selection/transformed-selection-rects.html: ditto.
+        * editing/style/5046875-1.html: ditto.
+        * editing/style/5046875-2.html: ditto.
+        * editing/style/fore-color-by-name.html: ditto.
+        * editing/style/relative-font-size-change-002.html: ditto.
+        * editing/style/relative-font-size-change-003.html: ditto.
+        * editing/style/relative-font-size-change-004.html: ditto.
+        * editing/style/style-boundary-005.html: ditto.
+        * editing/text-iterator/first-letter-word-boundary.html: ditto.
+        * editing/undo/undo-combined-delete-boundary.html: ditto.
+        * editing/undo/undo-combined-delete.html: ditto.
+        * editing/undo/undo-delete-boundary.html: ditto.
+        * editing/undo/undo-delete.html: ditto.
+        * editing/undo/undo-forward-delete-boundary.html: ditto.
+        * editing/undo/undo-forward-delete.html: ditto.
+        * fast/dom/34176.html: ditto.
+        * platform/chromium-win/editing/deleting/non-smart-delete-expected.txt: Updated.
+        * platform/efl/editing/deleting/non-smart-delete-expected.txt: Updated.
+        * platform/gtk/editing/deleting/non-smart-delete-expected.txt: Updated.
+        * platform/qt/editing/deleting/non-smart-delete-expected.txt: Updated.
+
+2013-03-27  Claudio Saavedra  <csaavedra@igalia.com>
+
         Rename Editing tests whose expectations are Mac specific
         https://bugs.webkit.org/show_bug.cgi?id=113414
 
index 5e23b59..4813d53 100644 (file)
@@ -41,6 +41,9 @@ one two cha cha three four cha cha cha
 </div>
 <script>
 
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
+
 function sendDeleteWordKey()
 {
     var deleteWordModifiers;
index 6c9f2cf..8c22832 100644 (file)
@@ -7,6 +7,8 @@ if (window.testRunner)
 <div id="div" contentEditable="true"><ul><ul><li>foo</li></ul><li><br></li></ul></div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var div = document.getElementById("div");
 var sel = window.getSelection();
 
index a8ad58b..5584df5 100644 (file)
@@ -19,7 +19,8 @@
 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
 
 <script>
-
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 function editingTest() {
     extendSelectionForwardByWordCommand();
     deleteCommand();
index be23f2c..9430ee2 100644 (file)
@@ -21,6 +21,8 @@
 <script>
 
 function editingTest() {
+    if (window.internals)
+        internals.settings.setEditingBehavior('mac');
     moveSelectionForwardByWordCommand();
     moveSelectionForwardByCharacterCommand();
     doubleClickAtSelectionStart();
index 934c6ca..8d237e4 100644 (file)
@@ -4,6 +4,8 @@
 <script src="../../resources/dump-as-markup.js"></script>
 <div contenteditable="true" id="div">foo<span contenteditable="false"> bar</span></div>
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var div = document.getElementById("div");
 var sel = window.getSelection();
 sel.setPosition(div, 0);
index 570cfe1..401bf09 100644 (file)
@@ -1,6 +1,8 @@
 <script src="../../resources/dump-as-markup.js"></script>
 <div id="test" contenteditable="true">The second word, and only the second word of this sentence should have a red background color.</div>
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 if (window.testRunner)
      testRunner.dumpEditingCallbacks();
 
index d76480b..0f32ab8 100644 (file)
@@ -8,6 +8,9 @@
 if (window.testRunner)
     testRunner.dumpEditingCallbacks();
 
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
+
 var sel = window.getSelection();
 var div = document.getElementById("div");
 
index a0e9c98..c2a3db1 100644 (file)
@@ -2,6 +2,8 @@
 <div id="div" contenteditable="true">foo<div>bar</div></div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var div = document.getElementById("div");
 var sel = window.getSelection();
 
index 812666f..e666f13 100644 (file)
@@ -6,6 +6,8 @@ if (window.testRunner)
 <div contenteditable="true" id="div"><table border="1"><tr><td>foo</td></tr></table>bar</div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var sel = window.getSelection();
 var div = document.getElementById("div");
 sel.setPosition(div, 0);
index 20e6be7..a8fbc88 100644 (file)
@@ -6,6 +6,8 @@ if (window.testRunner)
 <div contenteditable="true" id="div">foo<hr>bar</div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 var sel = window.getSelection();
 var div = document.getElementById("div");
 sel.setPosition(div, 0);
index 0441e3d..04eeb4e 100644 (file)
@@ -6,6 +6,8 @@ if (window.testRunner)
 <div contenteditable="true" id="div">foo<hr>bar</div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var sel = window.getSelection();
 var div = document.getElementById("div");
 sel.setPosition(div, 0);
index 194cf03..8239a94 100644 (file)
@@ -7,7 +7,8 @@
 <script>
     if (window.testRunner)
         window.testRunner.dumpAsText();
-
+    if (window.internals)
+        internals.settings.setEditingBehavior("mac");
     function fail(msg) {
         document.getElementById("results").innerText = "FAIL";
         throw msg;
index f60b6a8..3f9765f 100644 (file)
@@ -7,6 +7,8 @@ if (window.testRunner)
 
 <script type="text/javascript" src="../editing.js"></script>
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 var e = document.getElementById("test");
 var s = window.getSelection();
 
index 3458478..3d0fd63 100644 (file)
@@ -7,6 +7,8 @@ if (window.testRunner)
 
 <script type="text/javascript" src="../editing.js"></script>
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 var e = document.getElementById("test");
 var s = window.getSelection();
 
index 4c9d76d..e99ba51 100644 (file)
@@ -9,6 +9,8 @@ bar</pre></div>
 
 <script type="text/javascript" src="../editing.js"></script>
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 var e = document.getElementById("test");
 var s = window.getSelection();
 
index 7a5bc8e..76520ef 100644 (file)
@@ -4,6 +4,8 @@
 <script>
 if (window.testRunner)
      testRunner.dumpEditingCallbacks();
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 
 var sel = window.getSelection();
 var e = document.getElementById("copy");
index e5bc534..07f45a6 100644 (file)
@@ -2,6 +2,8 @@
 <div id="div" contenteditable="true">Hello: </div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 var div = document.getElementById("div");
 var sel = window.getSelection();
 
index d706991..2ba36aa 100644 (file)
@@ -16,6 +16,9 @@ blockquote {
 </div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
+
 var sel = window.getSelection();
 var div = document.getElementById("div");
 sel.setPosition(div, 0);
index 6699ad9..ba8e05d 100644 (file)
@@ -6,6 +6,8 @@ if (window.testRunner)
 <div id="test" style="border: 1px solid black;" contenteditable="true"></div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var s = window.getSelection();
 var p = document.getElementById("test");
 p.innerHTML = "foo<br>bar<br>baz";
index a40e8c2..77e4cf2 100644 (file)
@@ -7,6 +7,8 @@ if (window.testRunner)
 <div id="test" contenteditable="true">First<br class='webkit-block-placeholder'>Second paragraph.</div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 var s = window.getSelection();
 var e = document.getElementById("test");
 
index 7d2cda0..ab0dfb5 100644 (file)
@@ -21,6 +21,8 @@
 <script src="../../resources/dump-as-markup.js"></script>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 if (window.testRunner)
      testRunner.dumpAsText();
 
index 47c7115..c933b19 100644 (file)
@@ -6,7 +6,9 @@ function editingTest() {
   
     if (!window.testRunner)
         return;
-        
+    if (window.internals)
+        internals.settings.setEditingBehavior("mac");
+
     extendSelectionForwardByWordCommand();
     
     window.testRunner.waitUntilDone();
index 70dde09..fed38c9 100644 (file)
@@ -26,6 +26,8 @@ var handleDrag = function(e) {
 }
     
 function runTest() {
+    if (window.internals)
+        internals.settings.setEditingBehavior('mac');
     var console = document.getElementById('console');
     var editDiv = document.getElementById('test');
     editDiv.addEventListener('drop', handleDrop, false);
index 8b6e3cb..cef29bc 100644 (file)
@@ -7,6 +7,8 @@
 
 if (window.testRunner)
     testRunner.dumpEditingCallbacks();
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 
 Markup.description('This tests inserting a text wrapped in a div inside a text node.');
 
index 503c1dc..3e69df4 100644 (file)
@@ -7,6 +7,8 @@
 <script>
 if (window.testRunner)
     testRunner.dumpEditingCallbacks();
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 
 Markup.description("The last paragraph of the incoming fragment should be in the same paragraph as 'three'.");
 
index 0ab1133..e192029 100644 (file)
@@ -7,6 +7,8 @@
 <script>
 if (window.testRunner)
     testRunner.dumpEditingCallbacks();
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 
 Markup.description('Pasting a paragraph or less into a selection that spans multiple blocks should insert content into the block containing the start of the selection.');
 
index 2890e24..a776978 100644 (file)
@@ -8,6 +8,8 @@ if (window.testRunner)
 
 <script type="text/javascript" src="../editing.js"></script>
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var s = window.getSelection();
 var e = document.getElementById("test");
 
index e0e575b..a787f1c 100644 (file)
@@ -14,6 +14,8 @@ blockquote {
 <div id="div" contenteditable="true">This should not be blockquoted. This should not be blockquoted.</div>
 <script src="../../resources/dump-as-markup.js"></script>
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 
 Markup.description("This tests pasting a blockquote into the middle of a paragraph.");
 
index 8828e74..e109602 100644 (file)
@@ -65,6 +65,8 @@ function editingTest()
     }
 }
 
+if (window.internals)
+      internals.settings.setEditingBehavior("mac");
 runDumpAsTextEditingTest(false);
 document.getElementById("results").innerText = "PASS";
 </script>
index aa13b16..11b6d9f 100644 (file)
@@ -8,6 +8,8 @@ if (window.testRunner)
 </body>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var s = window.getSelection();
 s.setPosition(document.getElementById("test"), 0);
 
index 508774a..e92a0f7 100644 (file)
@@ -4,6 +4,8 @@
 <script>
 if (window.testRunner)
     window.testRunner.dumpEditingCallbacks();
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var sel = window.getSelection();
 var div = document.getElementById("div");
 sel.setPosition(div, 0);
index 0e2c239..4452d35 100644 (file)
@@ -61,6 +61,8 @@ function editingTest() {
 -->
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 runEditingTest();
 </script>
 
index 00bdb48..8f25148 100644 (file)
@@ -37,6 +37,8 @@ function extendForwardByWord(container, bidiName) {
     log("FAIL for " + bidiName + ", selection is \"" + getSelection() + "\" but should be \"" + noneditableChild.textContent + "\"");
 }
 
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 extendForwardByWord(document.getElementById("ltrTextContainer"), "LTR");
 extendForwardByWord(document.getElementById("rtlTextContainer"), "RTL");
 extendForwardByWord(document.getElementById("ltrMultiTextContainer"), "LTR-multi");
index 12c5e14..95090a3 100644 (file)
@@ -16,6 +16,8 @@
   </style>
 <script src="../editing.js" language="JavaScript" type="text/JavaScript" ></script>
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 function editingTest() {
     if (window.testRunner)
         window.testRunner.dumpSelectionRect();
index 1607b79..a1c8d51 100644 (file)
@@ -2,6 +2,8 @@
 <div id="div" contenteditable="true">foo<div>bar<br>baz</div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var div = document.getElementById("div");
 var sel = window.getSelection();
 
index 1e1a0b6..4d28be3 100644 (file)
@@ -2,6 +2,8 @@
 <div id="div" contenteditable="true" style="text-align:center;">foo<br>bar<div>baz</div></div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 var div = document.getElementById("div");
 var sel = window.getSelection();
 
index 4c47278..08c4b25 100644 (file)
@@ -5,6 +5,8 @@
 <body>
 <div id="test" contenteditable>hello world</div>
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 
 window.getSelection().setPosition(test, 0);
 window.getSelection().modify('move', 'forward', 'word');
index dcd8dd4..7e6c06e 100644 (file)
@@ -17,6 +17,8 @@
 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 
 function editingTest() {
     extendSelectionForwardByWordCommand();
index a58da61..170ad3d 100644 (file)
@@ -17,6 +17,8 @@
 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 
 function editingTest() {
     moveSelectionForwardByLineCommand();
index a4ba9b5..6b5a3a1 100644 (file)
@@ -17,6 +17,8 @@
 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 
 function editingTest() {
     moveSelectionForwardByLineCommand();
index c3c6c6f..845fee1 100644 (file)
@@ -18,6 +18,8 @@
 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
 
 function editingTest() {
     moveSelectionForwardByLineCommand();
index ef408bf..501f540 100644 (file)
@@ -18,6 +18,8 @@ This test also demonstrates a bug that word position is incorrectly reported.</p
 
 if (window.testRunner)
     testRunner.dumpAsText();
+if (window.internals)
+  internals.settings.setEditingBehavior("mac");
 
 function runTest(actor, expectedOffset) {
     window.getSelection().setPosition(test.firstChild, 4);
index d8bb23d..1f48f1e 100644 (file)
@@ -33,6 +33,8 @@ function editingTest() {
 </div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 runEditingTest();
 </script>
 
index 1ae8013..6123625 100644 (file)
@@ -33,6 +33,8 @@ function editingTest() {
 </div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 runEditingTest();
 </script>
 
index b0a9fcf..7701577 100644 (file)
@@ -31,6 +31,8 @@ function editingTest() {
 </div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 runEditingTest();
 </script>
 
index e2dbf7d..1e78d2e 100644 (file)
@@ -31,6 +31,8 @@ function editingTest() {
 </div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 runEditingTest();
 </script>
 
index 46b5aa0..945c636 100644 (file)
@@ -31,6 +31,8 @@ function editingTest() {
 </div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 runEditingTest();
 </script>
 
index d126cd8..20d937f 100644 (file)
@@ -31,6 +31,8 @@ function editingTest() {
 </div>
 
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior("mac");
 runEditingTest();
 </script>
 
index 0419bba..543b613 100644 (file)
@@ -58,7 +58,10 @@ The visual order should be TextRun3 TextRun1 TextRun2, not TextRun3 TextRun2 Tex
 <ul id="console" dir=ltr></ul>
 
 <script> 
+
+    if (window.internals)
+        internals.settings.setEditingBehavior("mac");
+
     function log(str)
     {
         var li = document.createElement("li");
index d6b7dd3..5c1ab4f 100644 (file)
@@ -4,6 +4,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
index c9549df..0a4186c 100644 (file)
@@ -4,6 +4,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
index c7fd167..3284754 100644 (file)
@@ -4,6 +4,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
index 607ee4a..2e22b23 100644 (file)
@@ -4,6 +4,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600