Chromium Code Reviews
DescriptionFixed flaky CronetSampleTest#testLoadUrl test
The test was occasionally failing because of the race condition. There
are two scenarios how the test can be executed:
1. The URL can be retrieved before addTextChangedListener() is called.
As the result onTextChanged() listener will never be called by the
system. To address it, we call textWatcher.onTextChanged() explicitly
at the end of the test.
2. The second scenario is when the URL is retrieved after the
done.block() is reached. In that case the system calls
onTextChanged() method. The problem is that the argument passed to
the method is of type android.text.SpannableStringBuilder(). This
object cannot be compared with the String directly. Instead,
SpannableStringBuilder() must be converted to String and then
compared.
BUG=635021
Committed: https://crrev.com/a41926a9b613da8641639cb0b4f3a3e54dfe5f46
Cr-Commit-Position: refs/heads/master@{#411191}
Patch Set 1 #
Messages
Total messages: 8 (3 generated)
|
|||||||||||||||||||