#include "third_party/blink/renderer/platform/bindings/runtime_call_stats.h"
#include "base/test/simple_test_tick_clock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
namespace blink {
namespace {
RuntimeCallStats::CounterId test_counter_1_id = …;
RuntimeCallStats::CounterId test_counter_2_id = …;
}
class RuntimeCallStatsTest : public testing::Test { … };
TEST_F(RuntimeCallStatsTest, InitialCountShouldBeZero) { … }
TEST_F(RuntimeCallStatsTest, StatsCounterNameIsCorrect) { … }
TEST_F(RuntimeCallStatsTest, TestBindingsCountersForMethods) { … }
TEST_F(RuntimeCallStatsTest, TestBindingsCountersForReadOnlyAttributes) { … }
TEST_F(RuntimeCallStatsTest, TestBindingsCountersForAttributes) { … }
TEST_F(RuntimeCallStatsTest, CountIsUpdatedAfterLeave) { … }
TEST_F(RuntimeCallStatsTest, TimeIsUpdatedAfterLeave) { … }
TEST_F(RuntimeCallStatsTest, CountAndTimeAreUpdatedAfterMultipleExecutions) { … }
TEST_F(RuntimeCallStatsTest, NestedTimersTest) { … }
TEST_F(RuntimeCallStatsTest, RuntimeCallTimerScopeTest) { … }
static void RecursiveRCSTestHelper(int remaining_count,
RuntimeCallStatsTest& fixture,
RuntimeCallStats& stats) { … }
TEST_F(RuntimeCallStatsTest, RecursiveFunctionWithScopeTest) { … }
TEST_F(RuntimeCallStatsTest, ReuseTimer) { … }
TEST_F(RuntimeCallStatsTest, ResetCallStats) { … }
TEST_F(RuntimeCallStatsTest, TestEnterAndLeaveMacrosWithCallStatsDisabled) { … }
TEST_F(RuntimeCallStatsTest, TestEnterAndLeaveMacrosWithCallStatsEnabled) { … }
TEST_F(RuntimeCallStatsTest, TestScopeMacroWithCallStatsDisabled) { … }
TEST_F(RuntimeCallStatsTest, TestScopeMacroWithCallStatsEnabled) { … }
TEST_F(RuntimeCallStatsTest, TestScopeWithOptionalMacroWithCallStatsDisabled) { … }
TEST_F(RuntimeCallStatsTest, TestScopeWithOptionalMacroWithCallStatsEnabled) { … }
}