-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into sam/remove-wireguard-dependency
* main: Unified feedback form for Privacy Pro (#922) bump privacy-dashboard to 5.1.1 (#955) Bump Tests/BrowserServicesKitTests/Resources/privacy-reference-tests from `afb4f61` to `6133e7d` (#962) Freemium PIR - Add Desktop RMF Attribute (#960) Fix address bar queries when doing math expressions (#952)
- Loading branch information
Showing
11 changed files
with
82 additions
and
5 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
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
2 changes: 1 addition & 1 deletion
2
Tests/BrowserServicesKitTests/Resources/privacy-reference-tests
Submodule privacy-reference-tests
updated
3 files
+18 −16 | .github/workflows/test.yml | |
+3 −2 | fingerprinting-protections/README.md | |
+6 −4 | fingerprinting-protections/init.js |
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 |
---|---|---|
|
@@ -336,4 +336,38 @@ final class StringExtensionTests: XCTestCase { | |
|
||
} | ||
|
||
func testWhenStringIsValidHost_thenValidHostIsTrue() { | ||
let validHostnames = [ | ||
"example.com", | ||
"subdomain.example.com", | ||
"my-host123", | ||
"localhost", | ||
"192.168.1.1", // Valid IP address | ||
"2001:0db8:85a3:0000:0000:8a2e:0370:7334" // Valid IPv6 address | ||
] | ||
|
||
for hostname in validHostnames { | ||
XCTAssertTrue(hostname.isValidHost, "\(hostname) should be a valid host") | ||
} | ||
} | ||
|
||
func testWhenStringIsInvalidHost_thenValidHostIsFalse() { | ||
let invalidHostnames = [ | ||
"invalid_hostname", // Invalid character | ||
"-example.com", // Starts with a hyphen | ||
"example-.com", // Ends with a hyphen | ||
"example..com", // Consecutive dots | ||
"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.com", // Too long | ||
"example.com.", // Ends with a dot | ||
"3 + 5 * (2 - 1)", // Mathematical expression | ||
"16385-12228.72", // Other mathetmatical expression | ||
"[email protected]", // Invalid character | ||
"2001:0db8:85a3:0000:0000:8a2e:0370:7334:1234" // Invalid IPv6 address | ||
] | ||
|
||
for hostname in invalidHostnames { | ||
XCTAssertFalse(hostname.isValidHost, "\(hostname) should NOT be a valid host") | ||
} | ||
} | ||
|
||
} |
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