2022-10-04 14:17:36 +10:00
|
|
|
using System;
|
2022-09-21 10:45:17 +10:00
|
|
|
using System.Reflection;
|
|
|
|
|
using CefSharp.Internals;
|
|
|
|
|
using Xunit.Sdk;
|
|
|
|
|
|
|
|
|
|
namespace CefSharp.Test
|
|
|
|
|
{
|
|
|
|
|
internal class BrowserRefCountDebuggingAttribute : BeforeAfterTestAttribute
|
|
|
|
|
{
|
2022-10-04 14:17:36 +10:00
|
|
|
private Type type;
|
|
|
|
|
internal BrowserRefCountDebuggingAttribute(Type type)
|
|
|
|
|
{
|
|
|
|
|
this.type = type;
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-21 10:45:17 +10:00
|
|
|
public override void Before(MethodInfo methodUnderTest)
|
|
|
|
|
{
|
2022-10-04 14:17:36 +10:00
|
|
|
((BrowserRefCounter)BrowserRefCounter.Instance).AppendLineToLog($"{type} - TestMethod {methodUnderTest.DeclaringType} {methodUnderTest.Name}");
|
2022-09-21 10:45:17 +10:00
|
|
|
|
|
|
|
|
base.Before(methodUnderTest);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|