-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/7.148.0' into bunn/aichat/browsing-menu
# Conflicts: # Core/PixelEvent.swift
- Loading branch information
Showing
59 changed files
with
1,484 additions
and
960 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,72 @@ | ||
# local-storage.yaml | ||
appId: com.duckduckgo.mobile.ios | ||
tags: | ||
- release | ||
|
||
--- | ||
|
||
# Set up | ||
- runFlow: | ||
file: ../shared/setup.yaml | ||
|
||
# Load Site | ||
- assertVisible: | ||
id: "searchEntry" | ||
- tapOn: | ||
id: "searchEntry" | ||
- inputText: "https://privacy-test-pages.site/features/local-storage.html" | ||
- pressKey: Enter | ||
|
||
# Add a cookie | ||
- assertVisible: "Storage Counter: undefined" | ||
- assertVisible: "Cookie Counter:" | ||
- assertNotVisible: "Cookie Counter: 1" | ||
- assertNotVisible: "Storage Counter: 1" | ||
- assertVisible: "Manual Increment" | ||
- tapOn: "Manual Increment" | ||
- tapOn: "Manual Increment" | ||
- assertVisible: "Cookie Counter: 2" | ||
- assertVisible: "Storage Counter: 2" | ||
|
||
# Fireproofing | ||
- tapOn: "Browsing menu" | ||
- tapOn: "Fireproof This Site" | ||
- tapOn: "Fireproof" | ||
|
||
# Fire button | ||
- tapOn: "Close Tabs and Clear Data" | ||
- tapOn: "Close Tabs and Clear Data" | ||
|
||
- assertNotVisible: "https://privacy-test-pages.site/features/local-storage.html" | ||
|
||
# Load Site | ||
- assertVisible: | ||
id: "searchEntry" | ||
- tapOn: | ||
id: "searchEntry" | ||
|
||
- inputText: "https://privacy-test-pages.site/features/local-storage.html" | ||
- pressKey: Enter | ||
- assertVisible: "Storage Counter: 2" | ||
- assertVisible: "Cookie Counter: 2" | ||
|
||
# Remove Fireproofing | ||
- tapOn: "Browsing menu" | ||
- tapOn: "Remove Fireproofing" | ||
|
||
# Fire button | ||
- tapOn: "Close Tabs and Clear Data" | ||
- tapOn: "Close Tabs and Clear Data" | ||
|
||
- assertNotVisible: "https://privacy-test-pages.site/features/local-storage.html" | ||
|
||
# Load Site | ||
- assertVisible: | ||
id: "searchEntry" | ||
- tapOn: | ||
id: "searchEntry" | ||
|
||
- inputText: "https://privacy-test-pages.site/features/local-storage.html" | ||
- pressKey: Enter | ||
- assertVisible: "Storage Counter: undefined" | ||
- assertVisible: "Cookie Counter:" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
MARKETING_VERSION = 7.147.0 | ||
MARKETING_VERSION = 7.148.0 |
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 was deleted.
Oops, something went wrong.
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,57 @@ | ||
// | ||
// DataStoreIDManager.swift | ||
// DuckDuckGo | ||
// | ||
// Copyright © 2024 DuckDuckGo. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
|
||
import WebKit | ||
import Persistence | ||
|
||
/// Supports an existing ID set in previous versions of the app, but moving forward does not allocate an ID. We have gone back to using the default | ||
/// peristence for the webview storage so that we can fireproof types that don't have an API for accessing their data. (e.g. localStorage) | ||
public protocol DataStoreIDManaging { | ||
|
||
var currentID: UUID? { get } | ||
|
||
func invalidateCurrentID() | ||
} | ||
|
||
public class DataStoreIDManager: DataStoreIDManaging { | ||
|
||
enum Constants: String { | ||
case currentWebContainerID = "com.duckduckgo.ios.webcontainer.id" | ||
} | ||
|
||
public static let shared = DataStoreIDManager() | ||
|
||
private let store: KeyValueStoring | ||
init(store: KeyValueStoring = UserDefaults.app) { | ||
self.store = store | ||
} | ||
|
||
public var currentID: UUID? { | ||
guard let uuidString = store.object(forKey: Constants.currentWebContainerID.rawValue) as? String else { | ||
return nil | ||
} | ||
return UUID(uuidString: uuidString) | ||
} | ||
|
||
public func invalidateCurrentID() { | ||
store.removeObject(forKey: Constants.currentWebContainerID.rawValue) | ||
} | ||
|
||
} |
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.