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

Issue 2924563002: Make RTCPeerConnectionHandlerTest use the webrtc signaling thread. (Closed)

Created:
3 years, 6 months ago by hbos_chromium
Modified:
3 years, 6 months ago
Reviewers:
Guido Urdaneta
CC:
chromium-reviews, posciak+watch_chromium.org, mlamouri+watch-content_chromium.org, jam, darin-cc_chromium.org, feature-media-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make RTCPeerConnectionHandlerTest use the webrtc signaling thread. The MockPeerConnectionDependecyFactory creates a new thread to act as the webrtc signaling thread, but the RTCPeerConnectionHandlerTest overrode its signaling_thread() helper method to yield the current thread. This meant that different components used different threads as their webrtc signaling thread in RTCPeerConnectionHandlerTest. This causes problems if you introduce code that relies on the main and and the webrtc signaling thread being different threads or if you DCHECK which thread you belong to depending on which component you ask for the webrtc signaling thread. Code updated to use the same thread as the webrtc signaling thread in all cases. base::RunLoop().RunUntilIdle() has been replaced by a helper method RunMessageLoopsUntilIdle() which makes sure both webrtc and main thread message loops has a chance to execute. BUG=705901 Review-Url: https://codereview.chromium.org/2924563002 Cr-Commit-Position: refs/heads/master@{#476987} Committed: https://chromium.googlesource.com/chromium/src/+/7e5d04b9bd8981b6cabd916203aa32423f41d493

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -36 lines) Patch
M content/renderer/media/rtc_peer_connection_handler.h View 1 chunk +1 line, -2 lines 0 comments Download
M content/renderer/media/rtc_peer_connection_handler_unittest.cc View 26 chunks +50 lines, -34 lines 0 comments Download

Messages

Total messages: 11 (7 generated)
hbos_chromium
PTAL guidou
3 years, 6 months ago (2017-06-05 13:31:10 UTC) #4
Guido Urdaneta
lgtm
3 years, 6 months ago (2017-06-05 13:45:18 UTC) #5
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/2924563002/1
3 years, 6 months ago (2017-06-05 13:47:34 UTC) #8
commit-bot: I haz the power
3 years, 6 months ago (2017-06-05 15:25:11 UTC) #11
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/7e5d04b9bd8981b6cabd916203aa...

Powered by Google App Engine
This is Rietveld 408576698