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

Issue 2876993003: Test PermissionRequestManager in GeolocationPermissionContext unit tests (Closed)

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

Description

Test PermissionRequestManager on Android in GeolocationPermissionContext unit tests This patch adds tests for the PermissionRequestManager on Android in the GeolocationPermissionContext unit tests via testing::WithParamInterface. The existing tests are refactored slightly to make this possible. In particular, the #ifs which switched between checking the PRM and the InfoBarService are replaced with checks on GetParam(), and as much as possible this logic is pulled into AcceptPrompt() and so on. BUG=671052, 606138 Review-Url: https://codereview.chromium.org/2876993003 Cr-Commit-Position: refs/heads/master@{#473491} Committed: https://chromium.googlesource.com/chromium/src/+/746d11013697cfc620b5a1dfcf76a745dfa5182d

Patch Set 1 #

Patch Set 2 : wipwip #

Patch Set 3 : it works?!?!?? #

Patch Set 4 : :d #

Total comments: 10

Patch Set 5 : address comments #

Patch Set 6 : disable too #

Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -328 lines) Patch
M chrome/browser/geolocation/geolocation_permission_context_unittest.cc View 1 2 3 4 5 41 chunks +269 lines, -328 lines 0 comments Download

Messages

Total messages: 29 (22 generated)
Timothy Loh
3 years, 7 months ago (2017-05-16 05:11:08 UTC) #16
raymes
Thanks! https://codereview.chromium.org/2876993003/diff/60001/chrome/browser/geolocation/geolocation_permission_context_unittest.cc File chrome/browser/geolocation/geolocation_permission_context_unittest.cc (left): https://codereview.chromium.org/2876993003/diff/60001/chrome/browser/geolocation/geolocation_permission_context_unittest.cc#oldcode531 chrome/browser/geolocation/geolocation_permission_context_unittest.cc:531: EXPECT_TRUE(closed_infobar_tracker_.Contains(infobar)); Is this now covered somewhere else? https://codereview.chromium.org/2876993003/diff/60001/chrome/browser/geolocation/geolocation_permission_context_unittest.cc ...
3 years, 7 months ago (2017-05-17 04:24:49 UTC) #17
Timothy Loh
Latest patch set also changes size_t GetNumberOfPrompts() to bool HasActivePrompt(), which is more accurate. https://codereview.chromium.org/2876993003/diff/60001/chrome/browser/geolocation/geolocation_permission_context_unittest.cc ...
3 years, 7 months ago (2017-05-19 01:43:02 UTC) #20
Timothy Loh
Latest patch set also disabled PRM when testing PQC so we won't need to immediately ...
3 years, 7 months ago (2017-05-19 05:46:52 UTC) #23
raymes
lgtm
3 years, 7 months ago (2017-05-21 23:35:36 UTC) #24
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/2876993003/100001
3 years, 7 months ago (2017-05-22 01:46:21 UTC) #26
commit-bot: I haz the power
3 years, 7 months ago (2017-05-22 02:24:20 UTC) #29
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/746d11013697cfc620b5a1dfcf76...

Powered by Google App Engine
This is Rietveld 408576698