(t *testing.T)
| 249 | } |
| 250 | |
| 251 | func TestRetrieversFromKeys(t *testing.T) { |
| 252 | r := retrieversFromKeys(masterkey.MasterKeys{V10: []byte("k10"), V20: []byte("k20")}) |
| 253 | |
| 254 | if r.V10 == nil || r.V20 == nil { |
| 255 | t.Fatal("V10 and V20 retrievers should be set from non-empty keys") |
| 256 | } |
| 257 | if r.V11 != nil { |
| 258 | t.Error("V11 retriever should be nil when the key is absent") |
| 259 | } |
| 260 | if got, _ := r.V10.RetrieveKey(masterkey.Hints{}); string(got) != "k10" { |
| 261 | t.Errorf("V10 key = %q, want k10", got) |
| 262 | } |
| 263 | if got, _ := r.V20.RetrieveKey(masterkey.Hints{}); string(got) != "k20" { |
| 264 | t.Errorf("V20 key = %q, want k20", got) |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | // makeUserData writes a minimal Chromium profile tree: a Preferences marker plus History (a real |
| 269 | // extraction source, so the profile resolves) under each named profile dir. |
nothing calls this directly
no test coverage detected