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

Issue 1593313011: Adding unittests for media casting sink observation and route handling (Closed)

Created:
4 years, 11 months ago by Zhiqiang Zhang (Slow)
Modified:
4 years, 11 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, mcasas+watch_chromium.org, media-router+watch_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding unittests for media casting sink observation and route handling This patch adds a mock MediaRouteProvider for unittest needs, as well as unittests for sink observation and route handling. BUG=578835 Committed: https://crrev.com/d20c259e2aabe9fbed12b1991c02e04eb431f1a8 Cr-Commit-Position: refs/heads/master@{#371247}

Patch Set 1 : #

Patch Set 2 : fix compilation error #

Total comments: 68

Patch Set 3 : addressed comments of avayvod@ and mlamouri@ #

Patch Set 4 : Using robolectric reflection to create mock RouteInfo #

Total comments: 26

Patch Set 5 : addressed comments of avayvod@ #

Total comments: 16

Patch Set 6 : addressed avayvod@'s comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+636 lines, -86 lines) Patch
M chrome/android/BUILD.gn View 1 2 3 4 5 1 chunk +5 lines, -1 line 2 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java View 1 2 3 4 8 chunks +49 lines, -13 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/DiscoveryCallback.java View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A chrome/android/junit/src/org/chromium/chrome/browser/media/router/ChromeMediaRouterRouteTest.java View 1 2 3 4 5 1 chunk +154 lines, -0 lines 0 comments Download
A chrome/android/junit/src/org/chromium/chrome/browser/media/router/ChromeMediaRouterSinkObservationTest.java View 1 2 3 4 5 1 chunk +107 lines, -0 lines 0 comments Download
D chrome/android/junit/src/org/chromium/chrome/browser/media/router/ChromeMediaRouterTest.java View 1 chunk +0 lines, -71 lines 0 comments Download
A chrome/android/junit/src/org/chromium/chrome/browser/media/router/ChromeMediaRouterTestBase.java View 1 2 3 4 5 1 chunk +90 lines, -0 lines 0 comments Download
A chrome/android/junit/src/org/chromium/chrome/browser/media/router/cast/DiscoveryCallbackTest.java View 1 2 3 4 5 1 chunk +197 lines, -0 lines 0 comments Download
A chrome/android/junit/src/org/chromium/chrome/browser/media/router/cast/TestUtils.java View 1 2 3 4 5 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (6 generated)
Zhiqiang Zhang (Slow)
PTAL
4 years, 11 months ago (2016-01-18 16:40:11 UTC) #3
mlamouri (slow - plz ping)
some drive-by comments. I will let avayvod@ do the core of the review. https://codereview.chromium.org/1593313011/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java File ...
4 years, 11 months ago (2016-01-19 15:23:38 UTC) #5
whywhat
Initial round of comments The set of test cases looks good. https://codereview.chromium.org/1593313011/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java File chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java (right): ...
4 years, 11 months ago (2016-01-20 12:11:31 UTC) #6
Zhiqiang Zhang (Slow)
PTAL, see the notes and replies below. * Addressed comments of avayvod@ and mlamouri@ * ...
4 years, 11 months ago (2016-01-21 12:28:38 UTC) #7
whywhat
https://codereview.chromium.org/1593313011/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java File chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java (right): https://codereview.chromium.org/1593313011/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java#newcode362 chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java:362: // This method is only implemented in {@link MockMediaRouteProvider}. ...
4 years, 11 months ago (2016-01-21 12:34:16 UTC) #8
Zhiqiang Zhang (Slow)
PTAL. * Now use robolectric reflection to create mock RouteInfo (using the code of avayvod@'s ...
4 years, 11 months ago (2016-01-21 14:49:05 UTC) #9
whywhat
https://codereview.chromium.org/1593313011/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java File chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java (right): https://codereview.chromium.org/1593313011/diff/100001/chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java#newcode45 chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java:45: public List<MediaRouteProvider> getRouteProvidersForTest() { does it have to be ...
4 years, 11 months ago (2016-01-21 17:56:46 UTC) #10
Zhiqiang Zhang (Slow)
PTAL. Addressed avayvod@'s comments, with notes and replies. * Instead of mocking the provider behavior, ...
4 years, 11 months ago (2016-01-22 15:19:59 UTC) #11
whywhat
Looking much better now! Left some comments, mostly about removing more code. https://codereview.chromium.org/1593313011/diff/120001/chrome/android/junit/src/org/chromium/chrome/browser/media/router/ChromeMediaRouterRouteTest.java File chrome/android/junit/src/org/chromium/chrome/browser/media/router/ChromeMediaRouterRouteTest.java ...
4 years, 11 months ago (2016-01-25 11:50:11 UTC) #12
Zhiqiang Zhang (Slow)
PTAL. * addressed avayvod@'s comments. * moved tests for DiscoveryCallback into a separate class * ...
4 years, 11 months ago (2016-01-25 14:24:39 UTC) #13
whywhat
lgtm https://codereview.chromium.org/1593313011/diff/140001/chrome/android/BUILD.gn File chrome/android/BUILD.gn (right): https://codereview.chromium.org/1593313011/diff/140001/chrome/android/BUILD.gn#newcode273 chrome/android/BUILD.gn:273: "junit/src/org/chromium/chrome/browser/media/router/ChromeMediaRouterSinkObservationTest.java", Don't you need the corresponding GYP change? ...
4 years, 11 months ago (2016-01-25 14:34:34 UTC) #14
Zhiqiang Zhang (Slow)
+miguelg@ for BUILD.gn, with the following replies to avayvod@ https://codereview.chromium.org/1593313011/diff/140001/chrome/android/BUILD.gn File chrome/android/BUILD.gn (right): https://codereview.chromium.org/1593313011/diff/140001/chrome/android/BUILD.gn#newcode273 chrome/android/BUILD.gn:273: ...
4 years, 11 months ago (2016-01-25 14:49:59 UTC) #16
Miguel Garcia
chrome/android/BUILD.gn lgtm
4 years, 11 months ago (2016-01-25 15:12:04 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1593313011/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1593313011/140001
4 years, 11 months ago (2016-01-25 15:38:39 UTC) #19
commit-bot: I haz the power
Committed patchset #6 (id:140001)
4 years, 11 months ago (2016-01-25 15:43:37 UTC) #20
commit-bot: I haz the power
4 years, 11 months ago (2016-01-25 15:45:02 UTC) #22
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/d20c259e2aabe9fbed12b1991c02e04eb431f1a8
Cr-Commit-Position: refs/heads/master@{#371247}

Powered by Google App Engine
This is Rietveld 408576698