#include "components/subresource_filter/core/common/scoped_timers.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/time/time.h"
#include "components/subresource_filter/core/common/time_measurements.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
class MockExportFunctor { … };
template <typename TimerFactory>
void ExpectFunctorIsCalledOnceOnDestruction() { … }
template <typename TimerFactory>
void ExpectStoredLambdaIsInvokedOnceOnDestruction() { … }
template <typename TimerFactory>
void ExpectInlineLambdaIsInvokedOnceOnDestruction() { … }
template <typename TimerFactory>
void ExpectWellBehavedStartIf(bool condition) { … }
template <typename TimerFactory>
void ExpectWellBehavedMoveContructor() { … }
template <typename TimerFactory>
void ExpectWellBehavedMoveAssignment() { … }
}
namespace subresource_filter {
TEST(ScopedTimersTest, CallsFunctor) { … }
TEST(ScopedTimersTest, CallsStoredLambdaFunctor) { … }
TEST(ScopedTimersTest, CallsInlineLambdaFunctor) { … }
TEST(ScopedTimersTest, StartIf) { … }
TEST(ScopedTimersTest, MoveConstructTimer) { … }
TEST(ScopedTimersTest, MoveAssignTimer) { … }
TEST(ScopedTimersTest, ScopedUmaHistogramMacros) { … }
TEST(ScopedTimersTest, UmaHistogramMicroTimesFromExportFunctor) { … }
}