   expect(rightmostScreenPosition.column).toBe(maxLineLength)
   expect(longestScreenRows.has(rightmostScreenPosition.row)).toBe(true)
 
-verifyScreenLineIds = (random, displayLayer, screenLinesById) ->
-  for screenLine in displayLayer.getScreenLines(0, getRandomScreenRowCount(random, displayLayer))
+verifyScreenLineIds = (displayLayer, screenLinesById) ->
+  for screenLine in displayLayer.getScreenLines(0, getComputedScreenLineCount(displayLayer))
     if screenLinesById.has(screenLine.id)
       expect(screenLinesById.get(screenLine.id)).toEqual(screenLine)
     else


  expect(containingTags).toEqual([])

verifyPositionTranslations = (random, displayLayer) ->
  lineScreenStart = Point.ZERO
  lineBufferStart = Point.ZERO

  rowCount = getRandomScreenRowCount(random, displayLayer)
  for screenLine in displayLayer.buildSpatialScreenLines(0, Infinity, rowCount)
    tokenScreenStart = lineScreenStart
    tokenBufferStart = lineBufferStart

          freshDisplayLayer.setTextDecorationLayer(displayLayer.getTextDecorationLayer())
          freshDisplayLayer.getScreenLines()

          verifyTokenConsistency(displayLayer)
          verifyText(displayLayer, freshDisplayLayer)
          verifyPositionTranslations(displayLayer)
          verifyRightmostScreenPosition(freshDisplayLayer)
          verifyScreenLineIds(displayLayer, screenLinesById)

performRandomChange = (random, displayLayer) ->
  text = buildRandomLines(random, 4)
