Bug 1327902 - Test selecting over a user-select:none node next to an <input>. a=jcristau
authorMats Palmgren <mats@mozilla.com>
Sun, 08 Jan 2017 21:27:00 +0100
changeset 366295 205212edc09cff3ebfd8055b8bc677295115ff57
parent 366294 f0f0bb716505259fcf5038405994fb5a27cee905
child 366296 4244045e6f4d3b97eb1b90bc7a27d0982c39f190
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-beta@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjcristau
bugs1327902
milestone52.0a2
Bug 1327902 - Test selecting over a user-select:none node next to an <input>. a=jcristau
dom/base/test/test_user_select.html
--- a/dom/base/test/test_user_select.html
+++ b/dom/base/test/test_user_select.html
@@ -39,16 +39,19 @@ a { position:absolute; bottom: 0; right:
 <div class="non-selectable">x</div>
 <div class="non-selectable">x</div>
 bbbb</div>
 <div id="testG" style="white-space:pre">aaaa
 <div class="non-selectable">x</div>
 <div class="non-selectable">x</div>
 <div class="non-selectable">x</div>
 bbbb</div>
+<div id="testH" style="white-space:pre">aaaa
+<div class="non-selectable">x</div><input>
+bbbbbbb</div>
 
 <iframe id="testD" src="data:text/html,<body>aaaa<span style='-moz-user-select:none'>bbbb</span>cccc"></iframe>
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 function test()
 {
@@ -281,16 +284,26 @@ function test()
   clear();
   e = document.getElementById('testG');
   synthesizeMouse(e, 1, 1, {});
   synthesizeMouse(e, 400, 180, { shiftKey: true });
   checkText("aaaa bbbb", e); // XXX this doesn't seem right - bug 1247799
   checkRanges([[0,0,-1,1],[2,0,-1,3],[4,0,-1,5],[6,0,6,5]], e);
   doneTest(e);
 
+  clear();
+  e = document.getElementById('testH');
+  synthesizeMouse(e, 1, 1, {});
+  synthesizeMouse(e, 30, 90, { shiftKey: true });
+  synthesizeMouse(e, 50, 90, { shiftKey: true });
+  synthesizeMouse(e, 70, 90, { shiftKey: true });
+  checkText("aaaa bbb", e);
+  checkRanges([[0,0,-1,1],[-1,2,3,4]], e);
+
+  doneTest(e);
   // ======================================================
   // ==================== Script tests ====================
   // ======================================================
 
   clear();
   e = document.getElementById('testD');
   clear(e.contentWindow);
   sel = e.contentWindow.getSelection();