Files
cdp_hub/internal/platform/browser/identity_test.go
T

20 lines
564 B
Go

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")
}
}