Bug 1337466: Adjust click position in test_bug549170.html to more reliably target editable area of textfield, rather than its border. r=mats draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 09 Feb 2017 22:14:24 -0800
changeset 481617 73bc24f721e089ad7ce064dce5aa3ade2d3a4546
parent 481616 e5fbb4e42df979dc3412e3eb6f574bfc7d9e0749
child 545248 a23f964a20cbb11bc4502f9fba436d69f5f70b4f
push id44876
push userdholbert@mozilla.com
push dateFri, 10 Feb 2017 06:14:51 +0000
reviewersmats
bugs1337466, 549170
milestone54.0a1
Bug 1337466: Adjust click position in test_bug549170.html to more reliably target editable area of textfield, rather than its border. r=mats MozReview-Commit-ID: 4lHdTcCToOU
layout/forms/test/test_bug549170.html
--- a/layout/forms/test/test_bug549170.html
+++ b/layout/forms/test/test_bug549170.html
@@ -42,23 +42,23 @@ function mouseHandler(aEvent)
   is(SpecialPowers.wrap(aEvent).originalTarget.nodeName, "DIV", "An inner div should be the target of the event");
   ok(SpecialPowers.wrap(aEvent).originalTarget.classList.contains("anonymous-div"), "the target div should be the editor div");
 }
 
 function checkMouseEvents(element)
 {
   gNumberOfMouseEventsCatched = 0;
 
-  synthesizeMouse(element, 5, 5, {type: "mousedown", button: 0});
-  synthesizeMouse(element, 5, 5, {type: "mouseup",   button: 0});
-  synthesizeMouse(element, 5, 5, {type: "mousedown", button: 1});
+  synthesizeMouse(element, 7, 7, {type: "mousedown", button: 0});
+  synthesizeMouse(element, 7, 7, {type: "mouseup",   button: 0});
+  synthesizeMouse(element, 7, 7, {type: "mousedown", button: 1});
   // NOTE: this event is going to copy the buffer on linux, this should not be a problem
-  synthesizeMouse(element, 5, 5, {type: "mouseup",   button: 1});
-  synthesizeMouse(element, 5, 5, {type: "mousedown", button: 2});
-  synthesizeMouse(element, 5, 5, {type: "mouseup",   button: 2});
+  synthesizeMouse(element, 7, 7, {type: "mouseup",   button: 1});
+  synthesizeMouse(element, 7, 7, {type: "mousedown", button: 2});
+  synthesizeMouse(element, 7, 7, {type: "mouseup",   button: 2});
 
   is(gNumberOfMouseEventsCatched, 6, "Some mouse events have not been catched");
 }
 
 function runTests()
 {
   checkMouseEvents(document.getElementById('i'));
   checkMouseEvents(document.getElementById('t'));