mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-08-17 23:57:12 +02:00
feat: add Chromium Browser with new v2 architecture (#530)
* feat: add Chromium Browser implementation with new architecture * refactor: replace Walk with ReadDir+Stat for profile discovery * refactor: remove queries override, use extractors for Yandex passwords * refactor: remove dataSource wrapper, use []sourcePath directly * fix: address Copilot review feedback on chromium_new.go * fix: always call key retriever regardless of Local State existence
This commit is contained in:
@@ -75,3 +75,37 @@ func TestExtractExtensions_MissingSettingsPath(t *testing.T) {
|
||||
_, err := extractExtensions(path)
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
func TestExtractOperaExtensions(t *testing.T) {
|
||||
path := createTestJSON(t, "Secure Preferences", `{
|
||||
"extensions": {
|
||||
"opsettings": {
|
||||
"opera-ext-1": {
|
||||
"location": 1,
|
||||
"manifest": {
|
||||
"name": "Opera Ad Blocker",
|
||||
"description": "Blocks ads in Opera",
|
||||
"version": "2.0.0"
|
||||
},
|
||||
"state": 1
|
||||
},
|
||||
"system-ext": {
|
||||
"location": 5,
|
||||
"manifest": {"name": "System", "version": "1.0"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`)
|
||||
|
||||
// extractOperaExtensions should find extensions under opsettings
|
||||
got, err := extractOperaExtensions(path)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, got, 1) // system extension skipped
|
||||
assert.Equal(t, "Opera Ad Blocker", got[0].Name)
|
||||
assert.Equal(t, "2.0.0", got[0].Version)
|
||||
assert.True(t, got[0].Enabled)
|
||||
|
||||
// Standard extractExtensions should fail on the same file (no "extensions.settings")
|
||||
_, err = extractExtensions(path)
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user