           linesNode.dispatchEvent(buildMouseEvent('mousedown', clientCoordinatesForScreenPosition([4, 8]), {target}))
           expect(editor.isFoldedAtBufferRow 4).toBe false
 
-    clientCoordinatesForScreenPosition = (screenPosition) ->
-      positionOffset = editor.pixelPositionForScreenPosition(screenPosition)
-      scrollViewClientRect = node.querySelector('.scroll-view').getBoundingClientRect()
-      clientX = scrollViewClientRect.left + positionOffset.left - editor.getScrollLeft()
-      clientY = scrollViewClientRect.top + positionOffset.top - editor.getScrollTop()
-      {clientX, clientY}
 
   describe "focus handling", ->
     inputNode = null

      Object.defineProperty(event, 'target', get: -> properties.target)
      Object.defineProperty(event, 'srcObject', get: -> properties.target)
    event

      expect(inputNode.offsetTop).toBe 0
      expect(inputNode.offsetLeft).toBe 0

  describe "mouse interactions on the scrollView", ->
    linesNode = null

    beforeEach ->
