TextSuggestionControllerTest.ApplyingMisspellingTextSuggestionClearsMarker consistently fails on first run |
||
Issue description
1. Run all webkit_unit_tests
2. Observe TextSuggestionControllerTest.ApplyingMisspellingTextSuggestionClearsMarker in the retries.
Failing run output:
[ RUN ] TextSuggestionControllerTest.ApplyingMisspellingTextSuggestionClearsMarker
../../third_party/WebKit/Source/core/editing/suggestion/TextSuggestionControllerTest.cpp:191: Failure
Expected: 0u
Which is: 0
To be equal to: GetDocument().Markers().MarkersFor(text).size()
Which is: 1
../../third_party/WebKit/Source/core/editing/suggestion/TextSuggestionControllerTest.cpp:192: Failure
Expected: "misspelled"
Which is: 0x332405
To be equal to: text->textContent()
Which is: "mispelled"
[ FAILED ] TextSuggestionControllerTest.ApplyingMisspellingTextSuggestionClearsMarker (3 ms)
[3568/6925] TextSuggestionControllerTest.ApplyingMisspellingTextSuggestionClearsMarker (3 ms)
,
Oct 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9fb7968e47608645d87cf0db4e2a9c061d430759 commit 9fb7968e47608645d87cf0db4e2a9c061d430759 Author: Ryan Landay <rlanday@chromium.org> Date: Tue Oct 17 01:25:47 2017 Fix TextSuggestionControllerTest.ApplyingMis...ClearsMarker failing on first run The TextSuggestionControllerTest.ApplyingMisspellingTextSuggestionClearsMarker test case is currently failing on the first run when run with other tests in TextSuggestionControllerTest. This is because DocumentMarkerController keeps track of a counter for how many suggestion markers have been added so far, and I was assuming this counter was reset at the beginning of each test case and so would always be 1, but it's not. The fix is to check the counter value for the marker that was just added instead of assuming it's going to be 1. Bug: 774362 Change-Id: Ib34bd5d0f57f08557432a6686d00c5481cd1a9b3 Reviewed-on: https://chromium-review.googlesource.com/721074 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Ryan Landay <rlanday@chromium.org> Cr-Commit-Position: refs/heads/master@{#509206} [modify] https://crrev.com/9fb7968e47608645d87cf0db4e2a9c061d430759/third_party/WebKit/Source/core/editing/suggestion/TextSuggestionControllerTest.cpp
,
Oct 17 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by dcheng@chromium.org
, Oct 13 2017