chromium/third_party/blink/renderer/core/timing/profiler_group_test.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/timing/profiler_group.h"

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/script_function.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_profiler_init_options.h"
#include "third_party/blink/renderer/core/timing/profiler.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"

namespace blink {

namespace {

static constexpr int kLargeProfilerCount =;
static constexpr int kMaxConcurrentProfilerCount =;

}  // namespace

class ProfilerGroupTest : public testing::Test {};

TEST_F(ProfilerGroupTest, StopProfiler) {}

// Tests that attached profilers are stopped on ProfilerGroup deallocation.
TEST_F(ProfilerGroupTest, StopProfilerOnGroupDeallocate) {}

TEST_F(ProfilerGroupTest, CreateProfiler) {}

TEST_F(ProfilerGroupTest, ClampedSamplingIntervalZero) {}

TEST_F(ProfilerGroupTest, ClampedSamplingIntervalNext) {}

TEST_F(ProfilerGroupTest,
       V8ProfileLimitThrowsExceptionWhenMaxConcurrentReached) {}

TEST_F(ProfilerGroupTest, NegativeSamplingInterval) {}

TEST_F(ProfilerGroupTest, OverflowSamplingInterval) {}

TEST_F(ProfilerGroupTest, Bug1119865) {}

/*
 *  LEAK TESTS - SHOULD RUN LAST
 */

// Tests that a leaked profiler doesn't crash the isolate on heap teardown.
// These should run last
TEST_F(ProfilerGroupTest, LeakProfiler) {}

// Tests that a leaked profiler doesn't crash when disposed alongside its
// context.
TEST_F(ProfilerGroupTest, LeakProfilerWithContext) {}

// Tests that a ProfilerGroup doesn't crash if the ProfilerGroup is destroyed
// before a Profiler::Dispose is ran.
TEST_F(ProfilerGroupTest, Bug1297283) {}

}  // namespace blink