Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Issue 2234123002: Fixed flaky CronetSampleTest#testLoadUrl test (Closed)

Created:
4 years, 4 months ago by kapishnikov
Modified:
4 years, 4 months ago
Reviewers:
xunjieli
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixed 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -10 lines) Patch
M components/cronet/android/sample/javatests/src/org/chromium/cronet_sample_apk/CronetSampleTest.java View 3 chunks +1 line, -10 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
kapishnikov
4 years, 4 months ago (2016-08-10 22:02:39 UTC) #2
xunjieli
LGTM! Awesome work. This is very smart :)
4 years, 4 months ago (2016-08-10 22:30:26 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2234123002/1
4 years, 4 months ago (2016-08-10 22:34:10 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-08-10 23:53:56 UTC) #6
commit-bot: I haz the power
4 years, 4 months ago (2016-08-10 23:56:27 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/a41926a9b613da8641639cb0b4f3a3e54dfe5f46
Cr-Commit-Position: refs/heads/master@{#411191}

Powered by Google App Engine
This is Rietveld 408576698