test(honorific): assert the title gate through the real draw path
This commit is contained in:
@@ -195,4 +195,23 @@ internal sealed class HonorificService : IDisposable
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Test seam: the three status fields are private-set and IPC-driven, which a
|
||||
// headless /xlperf run can't reach (Honorific is usually absent in tests).
|
||||
// Callers MUST snapshot the prior values and restore them in CleanUp, and
|
||||
// MUST drive Set -> Draw -> Assert within ONE synchronous RunStep (never
|
||||
// Waiting between Set and Assert) — a between-frame OnReady/OnTitleChanged
|
||||
// would otherwise clobber this state and a CleanUp restore can't un-corrupt a
|
||||
// mid-flight assertion. (A FontsReady precondition gate returning Waiting
|
||||
// BEFORE the snapshot/Set is fine — nothing is mutated yet.)
|
||||
internal void TestOnly_SetState(
|
||||
bool isAvailable,
|
||||
(uint Major, uint Minor)? detectedApiVersion,
|
||||
HonorificTitleData? title
|
||||
)
|
||||
{
|
||||
IsAvailable = isAvailable;
|
||||
DetectedApiVersion = detectedApiVersion;
|
||||
CurrentTitle = title;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user