Bug 1128722 - part 2, tests.
☠☠ backed out by 7afbf9ebc89b ☠ ☠
authorMats Palmgren <mats@mozilla.com>
Fri, 20 Feb 2015 17:34:21 +0000
changeset 258783 f7eff607655a5ad0491fd4d4cd58d5dc20a405d3
parent 258782 801b3abc0de8aed546ae45a6e394975e66d29988
child 258784 a6640044a1093603aff8f4e272de2e82d47cc244
push id721
push userjlund@mozilla.com
push dateTue, 21 Apr 2015 23:03:33 +0000
treeherdermozilla-release@d27c9211ebb3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1128722
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1128722 - part 2, tests.
layout/base/tests/multi-range-user-select-ref.html
layout/base/tests/multi-range-user-select.html
layout/base/tests/test_reftests_with_caret.html
--- a/layout/base/tests/multi-range-user-select-ref.html
+++ b/layout/base/tests/multi-range-user-select-ref.html
@@ -102,16 +102,20 @@ function runTest() {
       sel.extend(e.firstChild, 152); // now eDirPrevious again
     } else if (test == "#prev7") {
       if (op == "AD") {
         setupSelectionPrev3();
         addChildRanges([[0,168,0,170]], e);
       } else {
         addChildRanges([[0,160,0,170]], e);
       }
+    } else if (test == "#prev8") {
+      if (op == "AD") {
+        addChildRanges([[0,150,0,155], [0,68,0,70]], e);
+      }
     }
   } else {
     if (test == "#next1") {
       if (op == "SL") {
         setupSelectionNext3();
         sel.extend(e.firstChild, 158);
       } else if (op == "SR") {
         setupSelectionNext3();
@@ -140,16 +144,20 @@ function runTest() {
       sel.extend(e.firstChild, 152);
     } else if (test == "#next7") {
       setupSelectionNext3();
       if (op == "AD") {
         addChildRanges([[0,168,0,170]], e);
       } else {
         sel.extend(e.firstChild, 170);
       }
+    } else if (test == "#next8") {
+      if (op == "AD") {
+        addChildRanges([[0,68,0,70], [0,150,0,155]], e);
+      }
     }
   }
   document.documentElement.removeAttribute("class");
 }
 
 SimpleTest.waitForFocus(function(){setTimeout(runTest,0)});
 
 </script>
--- a/layout/base/tests/multi-range-user-select.html
+++ b/layout/base/tests/multi-range-user-select.html
@@ -120,16 +120,31 @@ function runTest() {
     } else if (test == "#prev7") {
       if (action == accelDragSelect) {
         accelDragSelect(e, 460, 500, 125);
         checkRanges([[e.childNodes[1].firstChild,0,-1,2], [3,0,-1,4], [5,0,6,0], [6,8,6,10]], e);
       } else {
         action(e, 500, 125);
         checkRanges([[6,0,6,10]], e);
       }
+    } else if (test == "#prev8") {
+      if (action == accelDragSelect) {
+        sel.removeAllRanges();
+        var e = document.querySelector('#select');
+        synthesizeMouse(e, 200, 125, {type: "mousedown", accelKey: true});
+        synthesizeMouse(e, 200, 120, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 200, 100, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 200, 80, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 210, 60, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 200, 60, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 200, 60, {type: "mouseup", accelKey: true});
+        var x3t = e.childNodes[3].firstChild;
+        var x5 = e.childNodes[5];
+        checkRanges([[x3t,3,-1,4], [x5,0,x5.firstChild,5]], e);
+      }
     }
   } else {
     if (test == "#next1") {
       if (action == keyLeft) {
         keyLeft({shiftKey:true}, 2)
         checkRanges([[0,10,-1,2], [3,0,-1,4], [5,0,e.childNodes[5].firstChild,8]], e);
       } else if (action == keyRight) {
         keyRight({shiftKey:true}, 2)
@@ -180,16 +195,32 @@ function runTest() {
       } else {
         action(e, 500, 125);
         checkRangeCount(3, e);
         checkRange(0, [0,10,-1,2], e);
         checkRange(1, [3,0,-1,4], e);
         var r = sel.getRangeAt(2);
         checkRangePoints(r, [e.childNodes[5],0,e.childNodes[6],10], e);
       }
+    } else if (test == "#next8") {
+      if (action == accelDragSelect) {
+        sel.removeAllRanges();
+        var e = document.querySelector('#select');
+        synthesizeMouse(e, 200, 60, {type: "mousedown", accelKey: true});
+        synthesizeMouse(e, 180, 60, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 200, 80, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 200, 100, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 200, 120, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 190, 125, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 200, 125, {type: "mousemove", accelKey: true});
+        synthesizeMouse(e, 200, 125, {type: "mouseup", accelKey: true});
+        var x3t = e.childNodes[3].firstChild;
+        var x5 = e.childNodes[5];
+        checkRanges([[x3t,3,-1,4], [x5,0,x5.firstChild,5]], e);
+      }
     }
   }
   document.documentElement.removeAttribute("class");
 }
 
 SimpleTest.waitForFocus(function(){setTimeout(runTest,0)});
 
 </script>
--- a/layout/base/tests/test_reftests_with_caret.html
+++ b/layout/base/tests/test_reftests_with_caret.html
@@ -190,16 +190,18 @@ if ((navigator.platform.indexOf("Mac") >
     [ 'multi-range-user-select.html#prev3SA' , 'multi-range-user-select-ref.html#prev3SA'  ] ,
     [ 'multi-range-user-select.html#prev4SA' , 'multi-range-user-select-ref.html#prev4SA'  ] ,
     [ 'multi-range-user-select.html#prev5SA' , 'multi-range-user-select-ref.html#prev5SA'  ] ,
     [ 'multi-range-user-select.html#prev6SA' , 'multi-range-user-select-ref.html#prev6SA'  ] ,
     [ 'multi-range-user-select.html#prev7SA' , 'multi-range-user-select-ref.html#prev7SA'  ] ,
     // eDirPrevious, Accel+drag-select (adding an additional range)
     [ 'multi-range-user-select.html#prev1AD' , 'multi-range-user-select-ref.html#prev1AD'  ] ,
     [ 'multi-range-user-select.html#prev7AD' , 'multi-range-user-select-ref.html#prev7AD'  ] ,
+    // eDirPrevious, Accel+drag-select (bug 1128722)
+    [ 'multi-range-user-select.html#prev8AD' , 'multi-range-user-select-ref.html#prev8AD'  ] ,
     // eDirPrevious, VK_RIGHT / LEFT
     [ 'multi-range-user-select.html#prev1SR' , 'multi-range-user-select-ref.html#prev1SR'  ] ,
     [ 'multi-range-user-select.html#prev1SL' , 'multi-range-user-select-ref.html#prev1SL'  ] ,
     // eDirNext, Shift+click
     [ 'multi-range-user-select.html#next1S_' , 'multi-range-user-select-ref.html#next1S_'  ] ,
     [ 'multi-range-user-select.html#next2S_' , 'multi-range-user-select-ref.html#next2S_'  ] ,
     [ 'multi-range-user-select.html#next3S_' , 'multi-range-user-select-ref.html#next3S_'  ] ,
     [ 'multi-range-user-select.html#next4S_' , 'multi-range-user-select-ref.html#next4S_'  ] ,
@@ -212,16 +214,18 @@ if ((navigator.platform.indexOf("Mac") >
     [ 'multi-range-user-select.html#next3SA' , 'multi-range-user-select-ref.html#next3SA'  ] ,
     [ 'multi-range-user-select.html#next4SA' , 'multi-range-user-select-ref.html#next4SA'  ] ,
     [ 'multi-range-user-select.html#next5SA' , 'multi-range-user-select-ref.html#next5SA'  ] ,
     [ 'multi-range-user-select.html#next6SA' , 'multi-range-user-select-ref.html#next6SA'  ] ,
     [ 'multi-range-user-select.html#next7SA' , 'multi-range-user-select-ref.html#next7SA'  ] ,
     // eDirNext, Accel+drag-select (adding an additional range)
     [ 'multi-range-user-select.html#next1AD' , 'multi-range-user-select-ref.html#next1AD'  ] ,
     [ 'multi-range-user-select.html#next7AD' , 'multi-range-user-select-ref.html#next7AD'  ] ,
+    // eDirNext, Accel+drag-select (bug 1128722)
+    [ 'multi-range-user-select.html#next8AD' , 'multi-range-user-select-ref.html#next8AD'  ] ,
     // eDirNext, VK_RIGHT / LEFT
     [ 'multi-range-user-select.html#next1SR' , 'multi-range-user-select-ref.html#next1SR'  ] ,
     [ 'multi-range-user-select.html#next1SL' , 'multi-range-user-select-ref.html#next1SL'  ] ,
     // eDirPrevious, Shift+click
     [ 'multi-range-script-select.html#prev1S_' , 'multi-range-script-select-ref.html#prev1S_'  ] ,
     [ 'multi-range-script-select.html#prev2S_' , 'multi-range-script-select-ref.html#prev2S_'  ] ,
     [ 'multi-range-script-select.html#prev3S_' , 'multi-range-script-select-ref.html#prev3S_'  ] ,
     [ 'multi-range-script-select.html#prev4S_' , 'multi-range-script-select-ref.html#prev4S_'  ] ,