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

Issue 2835863003: MediaStreamDevicesControllerBrowserTest (Closed)

Created:
3 years, 8 months ago by raymes
Modified:
3 years, 7 months ago
Reviewers:
tommycli, Timothy Loh
CC:
chromium-reviews, chfremer+watch_chromium.org, jam, raymes+watch_chromium.org, feature-media-reviews_chromium.org, mlamouri+watch-permissions_chromium.org, phoglund+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Update MediaStreamDevicesControllerTest to test with kUsePermissionManagerForMediaRequests feature enabled This updates MediaStreamDevicesControllerTest to run tests with the kUsePermissionManagerForMediaRequests flag enabled (as well as without it) by using a paramaterized test. A few other changes that were needed to make the test work: 1) |prompt_delegate_| is not used for testing when the feature is enabled. Instead, |prompt_factory_| is used to check the assumptions about what prompts are shown. The functions on these 2 objects are slightly different, so functions in the test harness have been introduced to encapsulate them (SetPromptResponseType, TotalPromptRequestCount, WasPermissionShown, ResetPromptCounters). 2) MockPermissionPromptFactory was modified to make it possible to test whether a specific permission type had been displayed in a prompt. 3) RequestPermissions runs asynchronously. So a RunLoop is used to make execution of it synchronous for the test. 4) A small bug in PermissionRequestManager::DoAutoResponseForTesting was fixed where an assumption was made that the function would only be called for single permission requests (not grouped ones). BUG=596786 TBR=tommycli@chromium.org Review-Url: https://codereview.chromium.org/2835863003 Cr-Commit-Position: refs/heads/master@{#468891} Committed: https://chromium.googlesource.com/chromium/src/+/db97ef8df226e314878defd22582184a6b0f7ec9

Patch Set 1 #

Patch Set 2 : MediaStreamDevicesControllerBrowserTest #

Total comments: 2

Patch Set 3 : MediaStreamDevicesControllerBrowserTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+192 lines, -84 lines) Patch
M chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc View 1 2 26 chunks +137 lines, -52 lines 0 comments Download
M chrome/browser/permissions/permission_request_manager.cc View 2 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/permissions/permission_request_manager_browsertest.cc View 1 2 9 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/permissions/permissions_browsertest.cc View 1 chunk +7 lines, -7 lines 0 comments Download
M chrome/browser/plugins/flash_permission_browsertest.cc View 8 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/ui/permission_bubble/mock_permission_prompt.cc View 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/permission_bubble/mock_permission_prompt_factory.h View 3 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/permission_bubble/mock_permission_prompt_factory.cc View 3 chunks +10 lines, -2 lines 0 comments Download

Messages

Total messages: 24 (15 generated)
raymes
(Hopefully the last CL :)
3 years, 8 months ago (2017-04-26 00:27:18 UTC) #3
Timothy Loh
lgtm https://codereview.chromium.org/2835863003/diff/20001/chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc File chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc (right): https://codereview.chromium.org/2835863003/diff/20001/chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc#newcode897 chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc:897: ::testing::Range<int>(static_cast<int>(TestType::TEST_TYPE_START), Can you WithParamInterface<TestType> and use Values here ...
3 years, 7 months ago (2017-04-28 03:42:07 UTC) #4
raymes
https://codereview.chromium.org/2835863003/diff/20001/chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc File chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc (right): https://codereview.chromium.org/2835863003/diff/20001/chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc#newcode897 chrome/browser/media/webrtc/media_stream_devices_controller_browsertest.cc:897: ::testing::Range<int>(static_cast<int>(TestType::TEST_TYPE_START), On 2017/04/28 03:42:07, Timothy Loh wrote: > Can ...
3 years, 7 months ago (2017-05-03 04:12:54 UTC) #11
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/2835863003/40001
3 years, 7 months ago (2017-05-03 04:12:58 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/426035)
3 years, 7 months ago (2017-05-03 04:22:20 UTC) #14
raymes
TBR=tommycli@chromium.org for trivial changes in flash_permission_context.cc\h
3 years, 7 months ago (2017-05-03 04:24:18 UTC) #17
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/2835863003/40001
3 years, 7 months ago (2017-05-03 04:24:47 UTC) #19
raymes
On 2017/05/03 04:24:18, raymes wrote: > mailto:TBR=tommycli@chromium.org for trivial changes in flash_permission_context.cc\h *flash_permission_browsertest.cc rather
3 years, 7 months ago (2017-05-03 04:24:51 UTC) #20
commit-bot: I haz the power
3 years, 7 months ago (2017-05-03 04:30:33 UTC) #24
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/db97ef8df226e314878defd22582...

Powered by Google App Engine
This is Rietveld 408576698