Editor::ReplaceSelection() Sets Smart Replace to False

Editor::ReplaceSelection() was modified so that |smart_replace| is
false. No callers currently existed that used the version of
ReplaceSelection() with |smart_replace| = true.

Smart Replace may add whitespace before and/or after an inserted
piece of text. The only current call to Editor::ReplaceSelection()
needs |smart_replace| to be false because no extra whitespace is
desired.

A comment was added in editor.h to explain that Smart Replace is not
used in Editor::ReplaceSelection().

A test was added, EditorTest.ReplaceSelection, which passes when
|smart_replace| = false and fails when |smart_replace| = true.

Bug: 717553
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I1424e200780cd32900dac5b6f824f8d50c3f8dd5
Reviewed-on: https://chromium-review.googlesource.com/1150448
Commit-Queue: Tessa Nijssen <tnijssen@google.com>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Sarah Chan <spqchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580940}
3 files changed