New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 774362 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 774350



Sign in to add a comment

TextSuggestionControllerTest.ApplyingMisspellingTextSuggestionClearsMarker consistently fails on first run

Project Member Reported by dcheng@chromium.org, Oct 13 2017

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)
 

Comment 1 by dcheng@chromium.org, Oct 13 2017

Cc: yosin@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, 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

Status: Fixed (was: Assigned)

Sign in to add a comment