feat: inspect windows browser process identity
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package browser
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"chub/internal/domain"
|
||||
)
|
||||
|
||||
func TestExecutableMatchesKind(t *testing.T) {
|
||||
if !executableMatchesKind(`C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe`, domain.BrowserChrome) {
|
||||
t.Fatal("Chrome executable was not recognized")
|
||||
}
|
||||
if !executableMatchesKind(`C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe`, domain.BrowserEdge) {
|
||||
t.Fatal("Edge executable was not recognized")
|
||||
}
|
||||
if executableMatchesKind("other.exe", domain.BrowserChrome) {
|
||||
t.Fatal("unrelated executable was recognized")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user