Add diff viewer unit tests and fix some bugs.
Review Request #4255 — Created June 23, 2013 and submitted
Add diff viewer unit tests and fix some bugs. This introduces unit tests for different parts of the diff viewer. This right now covers hovering and selection (adding rows, removing, finalizing with a comment, and more). Some of the tests uncovered bugs. Particularly with removing rows from a selection when selecting up and then down. These were long-standing bugs that existed at least in 1.6. Those bugs have been fixed.
Unit tests pass. Verified the fixes manually.