Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

handle an array of permission types #10896

Merged
merged 4 commits into from
Sep 20, 2017
Merged

handle an array of permission types #10896

merged 4 commits into from
Sep 20, 2017

Conversation

bridiver
Copy link
Collaborator

fix #10864
requires muon 4.3.19+

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.

Test Plan:

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@codecov-io
Copy link

codecov-io commented Sep 11, 2017

Codecov Report

Merging #10896 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master   #10896      +/-   ##
==========================================
- Coverage   54.14%    54.1%   -0.04%     
==========================================
  Files         248      248              
  Lines       21751    21765      +14     
  Branches     3383     3388       +5     
==========================================
- Hits        11777    11776       -1     
- Misses       9974     9989      +15
Flag Coverage Δ
#unittest 54.1% <0%> (-0.04%) ⬇️
Impacted Files Coverage Δ
app/renderer/components/main/notificationItem.js 30.13% <0%> (ø) ⬆️
app/filtering.js 17.98% <0%> (-0.6%) ⬇️

app/filtering.js Outdated
// Always allow fullscreen if setting is ON
const alwaysAllowFullscreen = module.exports.alwaysAllowFullscreen() === fullscreenOption.ALWAYS_ALLOW
if (permission === 'fullscreen' && alwaysAllowFullscreen) {
response.push(true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if permission === 'fullscreen', and both origin.startsWith('chrome-extension://' + config.torrentExtensionId) and alwaysAllowFullscreen are true, wouldn't you be calling response.push(true) twice in this loop (since the conditional is if, not else if)? response[i] = ... instead of response.push(...) seems clearer

@diracdeltas
Copy link
Member

some of the permissions tests are failing but could be intermittent https://travis-ci.org/brave/browser-laptop/jobs/274266563

This addresses review feedback for #10864
@bbondy
Copy link
Member

bbondy commented Sep 13, 2017

@diracdeltas I pushed a follow up commit to address the feedback of making sure we push at most once per permission type.
cb4c6d3

@bbondy
Copy link
Member

bbondy commented Sep 13, 2017

Sister PR for 4.3.x
#10929

Already covered by this test:
```
1) notificationBar permissions can accept permission request
persistently:
     Promise was rejected with the following reason: timeout
```

Fix #10957
Copy link
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still no notification for me going to https://browserleaks.com/geo. Running Muon 4.4.15. Am I missing something?

@bbondy
Copy link
Member

bbondy commented Sep 19, 2017

mentioned via slack DM but this is already reviewed and accepted in 4.3, it's just waiting for new builds so we can merge it to 4.4.

bbondy added a commit that referenced this pull request Sep 20, 2017
handle an array of permission types
bbondy added a commit that referenced this pull request Sep 20, 2017
handle an array of permission types
@bbondy bbondy deleted the issue-10864 branch October 23, 2017 14:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Brave not asking for permissions when loading geolocations
6 participants