Skip to content

Commit

Permalink
UX monitor: test BA and BAF to disable re-acquiring UX payloads
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbar committed Oct 22, 2024
1 parent a7c937d commit fefc887
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/burn/engine/engine.mc
Original file line number Diff line number Diff line change
Expand Up @@ -1314,5 +1314,5 @@ MessageId=706
Severity=Warning
SymbolicName=MSG_UX_PAYLOAD_MISSING
Language=English
UX payload deletion was detected. Payload Id '%1!ls!'. Payload Path '%2!ls!'. action '%3!ls!'.
UX payload deletion was detected, Id: '%1!ls!', path: '%2!ls!', action: %3!ls!.
.
5 changes: 5 additions & 0 deletions src/test/burn/TestBA/TestBA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,11 @@ protected override void OnUnregisterBegin(UnregisterBeginEventArgs args)
this.Log("OnUnregisterBegin, default: {0}, requested: {1}", args.RecommendedRegistrationType, args.RegistrationType);
}

protected override void OnUxPayloadDeleted(UxPayloadDeletedEventArgs args)
{
args.Action = BOOTSTRAPPER_UXPAYLOADDELETED_ACTION.None;
}

private void TestVariables()
{
// First make sure we can check and get standard variables of each type.
Expand Down
12 changes: 11 additions & 1 deletion src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@ class CPrereqBaf : public CBalBaseBAFunctions
return hr;
}

private:
virtual STDMETHODIMP OnUxPayloadDeleted(
__in_z LPCWSTR /*wzPayloadId*/,
__in_z LPCWSTR /*wzPayloadPath*/,
__in BOOTSTRAPPER_UXPAYLOADDELETED_ACTION /*recommendation*/,
__inout BOOTSTRAPPER_UXPAYLOADDELETED_ACTION* pAction
)
{
*pAction = BOOTSTRAPPER_UXPAYLOADDELETED_ACTION_NONE;

return S_OK;
}

public:
//
Expand Down

0 comments on commit fefc887

Please sign in to comment.