This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 973
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #14043 Test Plan: Success case: 1. start brave 2. immediately open a tor private tab 3. you should briefly see a loading message in the URLbar 4. once loading is finished, you should be able to type in the URLbar Fail case: 1. start an HTTP listener on port 9250 (so that Tor cannot bind to it. this causes Tor to not be able to connect). 2. start brave 3. open tor tab and wait for 20s 4. you should see an error message pop up 5. the button and link in the error message should work as expected
- Loading branch information
1 parent
7b654d4
commit 242b3ed
Showing
12 changed files
with
218 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
'use strict' | ||
|
||
const filtering = require('../../filtering') | ||
const appConstants = require('../../../js/constants/appConstants') | ||
|
||
const torReducer = (state, action) => { | ||
switch (action.actionType) { | ||
case appConstants.APP_SET_TOR_NEW_IDENTITY: | ||
filtering.setTorNewIdentity(action.url, action.tabId) | ||
break | ||
case appConstants.APP_ON_TOR_INIT_ERROR: | ||
state = state.setIn(['tor', 'initializationError'], action.message) | ||
break | ||
case appConstants.APP_ON_TOR_INIT_SUCCESS: | ||
state = state.setIn(['tor', 'initializationError'], false).setIn(['tor', 'percentInitialized'], null) | ||
break | ||
case appConstants.APP_ON_TOR_INIT_PERCENTAGE: | ||
state = state.setIn(['tor', 'percentInitialized'], action.percentage) | ||
break | ||
} | ||
return state | ||
} | ||
|
||
module.exports = torReducer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.