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

Return focus to the active tab's content area after dismissal of notifications and/or message boxes #15130

Closed
wants to merge 919 commits into from
Closed

Return focus to the active tab's content area after dismissal of notifications and/or message boxes #15130

wants to merge 919 commits into from

Conversation

dcrck
Copy link

@dcrck dcrck commented Aug 30, 2018

Submitter Checklist:

Test Plan:

  1. For notifications
    Open a new instance of Brave. Go to google.com and searched for something, e.g. "Brave". In my case, I got a notification asking me if I wanted Google to remember my location. I dismissed the notification. To test focus, hit the down arrow key, and the page should scroll through results when it didn't before.

  2. For text boxes
    Open the console with Opt+Cmd+I (on Mac). type `alert("hello");" into the console. Dismiss the popup, then try the same "down arrow key" test used above.

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

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

bsclifton and others added 30 commits July 9, 2018 16:12
Fix some error branches in tor controller logic.
This should address the failure reported in:
#14675 (comment)

fix #14630

Auditors: @diracdeltas

Test Plan: see #14630
This, and TorControl.destroy(), are worth making idempotent because
errors may happen synchronously _or_ asynchronously, so there are two
levels at which a caller might want to clean up.  For example,
authentication failure is reported as a 515 error from tor, _and_ the
tor daemon will close the control connection leading to an
asynchronous error.
There is no way to know exactly when this might happen, alas:
readables and writables don't necessarily emit their close events
promptly.
for some reason, the windows path has an extra `../` prefix compared to
mac so the favicon doesn't load. this works around the issue by removing
a `../` on windows.

Test Plan:
1. open new tab
2. hit `:g` in the urlbar
3. the search favicon should load on all platforms
…es-v2

Fix some more error branches, assert sanity, and automatically test it all.
This was always signing the RPM because the test was failing,
now we will test and if the signature exists then move on.

The error seen was:
tools/upload_to_rpm_repo: line 18: !rpm: command not found
Fix #14680

Test Plan:
1. open brave, turn on showing bookmarks toolbar and showing home button
   in about:preferences. bookmark some sites.
2. open tor tab and try to click on bookmarks before tor finishes
   loading. also try clicking on the home button and clicking the
   History > Home menu item.
3. these loads should be blocked until tor finishes initializing
Add shortcut for private tab with Tor and also update existing shortc…
Allow upload script to check if current signature exists.
Block tab.loadURL in tor tabs until tor is initialized
fix #14653

for some reason, renaming the searx favicon to something that doesn't have
'searx' in the filename makes it reappear

Test Plan:
1. make a packaged build
2. open brave
3. hit ':x' in urlbar. searx favicon should appear.
Fix mysterious searx favicon disappearing in builds
To do this, we separate step of killing the daemon and control channel
from the step of ceasing to watch for updates.  On errors, we want to
kill the daemon and control channel, but continue watching for updates
in case the daemon restarts.

Possible snag: we do not rate-limit failures if they are recursive.
Not currently an issue but we should take care of this in the future.
fix #14431

Auditors: @diracdeltas @bsclifton

Test Plan:
I:
	1. Open a tab _without_ Tor (private or nonprivate).
	2. Enter: https://nyttips4bmquxfzw.onion/
	3. Confirm that Brave blocks loading the URL.

II:
	1. Open a tab _without_ Tor (private or nonprivate).
	2. Enter: https://nyttips4bmquxfzw.onion:12345/
	3. Confirm that Brave blocks loading the URL.

III:
	1. Open a private tab with Tor.
	2. Enter: https://nyttips4bmquxfzw.onion/
	3. Confirm that the NYT SecureDrop page loads.
	4. Bookmark it.
	5. Open a tab _without_ Tor (private or nonprivate).
	6. Try to load the bookmark.
	7. Confirm that Brave blocks loading the bookmark.
Don't emit an 'error' event if we did pass them synchronously.

Establish an 'error' handler in filtering.js for asynchronous errors.
ryanml and others added 26 commits August 15, 2018 17:19
eth-wallet: 'enable brave payments' notice
This reverts commit 22f4cc8.

Revert "Merge pull request #15033 from ryanml/fix-15031"
This reverts commit 16a7383.

Revert "Merge pull request #15032 from ryanml/fix-15023"
This reverts commit ee4df6f.

Revert "Merge pull request #15034 from brave/static-nodes-dir"
This reverts commit cd37100.

Revert "Merge pull request #15029 from brave/geth-sanity-updates"
This reverts commit 84b416b.

Revert "Merge pull request #15022 from brave/deleteDidDetach"
This reverts commit c209fbd.

Revert "Merge pull request #15027 from Slava/eth-wallet-password"
This reverts commit c1d1fe9.

Revert "Merge pull request #14734 from Slava/feature/ethwallet"
This reverts commit 72820e8.
second fix for URL open in new tab
Don't consider openableByContextMenu if URL is falsey
Resolves #15067

Auditors:

Test Plan:
block chrome://brave URL loads
Allow `view-source` as openable by context menu
Resolves #15073

Auditors:

Test Plan:
fix typo in test description: deafult -> default
fix typo in js extension comment: occuring -> occurring
fixed tabs / spaces in messageBox / notificationItem files
@bsclifton
Copy link
Member

bsclifton commented Sep 21, 2018

Thanks for the patch, @rederekt 😄 I'm going to close this PR though, as we are in the middle of migrating from one code-base to another

You can check out our new repo here:
https://github.com/brave/brave-browser

and you can check out a developer channel release here:
https://brave.com/download-dev

@bsclifton bsclifton closed this Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.