Skip to content

Commit

Permalink
Fix more crashes due to Brave-Core unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T committed Jan 9, 2025
1 parent 9edd81a commit 7155b71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions ios/brave-ios/Tests/ClientTests/TabManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

import BraveCore
import Preferences
import Shared
import Storage
Expand Down Expand Up @@ -121,7 +120,7 @@ open class MockTabManagerDelegate: TabManagerDelegate {
private let testWindowId = UUID()

override class func setUp() {
BraveCoreMain.initializeResourceBundleForTesting()
Preferences.UserScript.translate.value = false
}

override func setUp() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import BraveCore
import CryptoKit
import Preferences
import SnapKit
import WebKit
import XCTest
Expand Down Expand Up @@ -35,6 +36,10 @@ final class ScriptExecutionTests: XCTestCase {
let localFrameElement: Bool
}

override class func setUp() {
Preferences.UserScript.translate.value = false
}

@MainActor func testSiteStateListenerScript() async throws {
// Given
let viewController = MockScriptsViewController()
Expand Down

0 comments on commit 7155b71

Please sign in to comment.