[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tonikitoo at webkit.org tonikitoo at webkit.org
Wed Dec 22 14:28:09 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 7005ec5b5ed548bb7399a64bbecd5abcfbbcfb16
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Oct 10 14:14:53 2010 +0000

    2010-10-10  Antonio Gomes  <agomes at rim.com>
    
            Reviewed by Andreas Kling.
    
            editing/selection/extend-after-mouse-selection.html should useLayoutTestController::setEditingBehavior
            https://bugs.webkit.org/show_bug.cgi?id=47468
    
            Changed editing/selection/extend-after-mouse-selection.html to use the LayoutTestController::setEditingBehavior
            machinary. It makes it possible to remove platform dependent test results by testing through all
            platform-specific codepath's we have.
    
            * editing/selection/extend-after-mouse-selection.html:
            * platform/editing/selection/extend-after-mouse-selection-expected.txt: Added.
            * platform/mac/editing/selection/extend-after-mouse-selection-expected.txt: Removed.
            * platform/win/editing/selection/extend-after-mouse-selection-expected.txt: Removed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69466 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 18e41b3..454f5eb 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-10  Antonio Gomes  <agomes at rim.com>
+
+        Reviewed by Andreas Kling.
+
+        editing/selection/extend-after-mouse-selection.html should use LayoutTestController::setEditingBehavior
+        https://bugs.webkit.org/show_bug.cgi?id=47468
+
+        Changed editing/selection/extend-after-mouse-selection.html to use the LayoutTestController::setEditingBehavior
+        machinary. It makes it possible to remove platform dependent test results by testing through all
+        platform-specific codepath's we have.
+
+        * editing/selection/extend-after-mouse-selection.html:
+        * platform/editing/selection/extend-after-mouse-selection-expected.txt: Added.
+        * platform/mac/editing/selection/extend-after-mouse-selection-expected.txt: Removed.
+        * platform/win/editing/selection/extend-after-mouse-selection-expected.txt: Removed.
+
 2010-10-09  Ryosuke Niwa  <rniwa at webkit.org>
 
         Unreviewed build fix.
diff --git a/LayoutTests/editing/selection/extend-after-mouse-selection-expected.txt b/LayoutTests/editing/selection/extend-after-mouse-selection-expected.txt
new file mode 100644
index 0000000..e7302d6
--- /dev/null
+++ b/LayoutTests/editing/selection/extend-after-mouse-selection-expected.txt
@@ -0,0 +1,17 @@
+a bc 
+d ef 
+ghi
+PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object Text](ef) focusOffset: 2 isCollapsed: false]
+PASS Selection is [anchorNode: [object Text](ef) anchorOffset: 2 focusNode: [object Text](a ) focusOffset: 1 isCollapsed: false]
+PASS Selection is [anchorNode: [object Text](ef) anchorOffset: 2 focusNode: [object Text](bc) focusOffset: 0 isCollapsed: false]
+PASS Selection is [anchorNode: [object Text]( ) anchorOffset: 1 focusNode: [object Text](bc) focusOffset: 0 isCollapsed: false]
+PASS Selection is [anchorNode: [object Text]( ) anchorOffset: 1 focusNode: [object Text](a ) focusOffset: 0 isCollapsed: false]
+PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object Text](ef) focusOffset: 2 isCollapsed: false]
+PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object Text](ef) focusOffset: 1 isCollapsed: false]
+PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object Text](ef) focusOffset: 2 isCollapsed: false]
+PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object Text]( ) focusOffset: 1 isCollapsed: false]
+PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object HTMLElement](null) focusOffset: 4 isCollapsed: false]
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/editing/selection/extend-after-mouse-selection.html b/LayoutTests/editing/selection/extend-after-mouse-selection.html
index 21390f4..e69ba84 100644
--- a/LayoutTests/editing/selection/extend-after-mouse-selection.html
+++ b/LayoutTests/editing/selection/extend-after-mouse-selection.html
@@ -13,10 +13,12 @@
 <script src="resources/js-test-selection-shared.js"></script>
 
 <script>
-// FIXME: Expose settings->editingBehavior() and use that here instead.
-var onMacPlatform = navigator.userAgent.search(/\bMac OS X\b/) != -1;
 
-function editingTest() {
+function editingTest(editingBehavior) {
+
+    if (window.layoutTestController)
+        layoutTestController.setEditingBehavior(editingBehavior);
+
     var startTarget = document.getElementById('start');
     var endTarget = document.getElementById('end');
 
@@ -33,30 +35,29 @@ function editingTest() {
 
     extendSelectionBackwardByCharacterCommand();
 
-
     // On Win/Linux the anchor is be fixed after the mouse-selection and never changes.
     // On Mac, the first character-granularity selection after a mouse-selection resets the anchor/focus.
-    if (onMacPlatform)
+    if (editingBehavior == "mac")
         assertSelectionAt(endTarget.firstChild, 2, startTarget.previousSibling, 1);
     else
         assertSelectionAt(startTarget.firstChild, 0, endTarget.firstChild, 1);
 
     extendSelectionForwardByCharacterCommand();
-    if (onMacPlatform)
+    if (editingBehavior == "mac")
         assertSelectionAt(endTarget.firstChild, 2, startTarget.firstChild, 0);
     else
         assertSelectionAt(startTarget.firstChild, 0, endTarget.firstChild, 2);
 
     extendSelectionForwardByLineBoundaryCommand();
 
-    if (onMacPlatform)
+    if (editingBehavior == "mac")
         assertSelectionAt(endTarget.nextSibling, 1, startTarget.firstChild, 0);
     else
         assertSelectionAt(startTarget.firstChild, 0, endTarget.nextSibling, 1);
 
     extendSelectionBackwardByLineBoundaryCommand();
 
-    if (onMacPlatform)
+    if (editingBehavior == "mac")
         assertSelectionAt(endTarget.nextSibling, 1, startTarget.previousSibling, 0);
     else
         assertSelectionAt(startTarget.firstChild, 0, document.getElementById('test'), 4);
@@ -74,7 +75,8 @@ function editingTest() {
 <div id="console"></div>
 
 <script>
-editingTest();
+editingTest("mac");
+editingTest("win");
 var successfullyParsed = true;
 </script>
 <script src="../../fast/js/resources/js-test-post.js"></script>
diff --git a/LayoutTests/platform/mac/editing/selection/extend-after-mouse-selection-expected.txt b/LayoutTests/platform/mac/editing/selection/extend-after-mouse-selection-expected.txt
deleted file mode 100644
index bd244e7..0000000
--- a/LayoutTests/platform/mac/editing/selection/extend-after-mouse-selection-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-a bc 
-d ef 
-ghi
-PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object Text](ef) focusOffset: 2 isCollapsed: false]
-PASS Selection is [anchorNode: [object Text](ef) anchorOffset: 2 focusNode: [object Text](a ) focusOffset: 1 isCollapsed: false]
-PASS Selection is [anchorNode: [object Text](ef) anchorOffset: 2 focusNode: [object Text](bc) focusOffset: 0 isCollapsed: false]
-PASS Selection is [anchorNode: [object Text]( ) anchorOffset: 1 focusNode: [object Text](bc) focusOffset: 0 isCollapsed: false]
-PASS Selection is [anchorNode: [object Text]( ) anchorOffset: 1 focusNode: [object Text](a ) focusOffset: 0 isCollapsed: false]
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/platform/win/editing/selection/extend-after-mouse-selection-expected.txt b/LayoutTests/platform/win/editing/selection/extend-after-mouse-selection-expected.txt
deleted file mode 100644
index fe5b169..0000000
--- a/LayoutTests/platform/win/editing/selection/extend-after-mouse-selection-expected.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-a bc 
-d ef 
-ghi
-PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object Text](ef) focusOffset: 2 isCollapsed: false]
-PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object Text](ef) focusOffset: 1 isCollapsed: false]
-PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object Text](ef) focusOffset: 2 isCollapsed: false]
-PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object Text]( ) focusOffset: 1 isCollapsed: false]
-PASS Selection is [anchorNode: [object Text](bc) anchorOffset: 0 focusNode: [object HTMLElement](null) focusOffset: 4 isCollapsed: false]
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list