#include "base/files/scoped_temp_dir.h"
#include "base/functional/callback_helpers.h"
#include "base/path_service.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_proto_loader.h"
#include "base/token.h"
#include "base/values.h"
#include "build/build_config.h"
#include "content/browser/tracing/background_tracing_config_impl.h"
#include "content/browser/tracing/background_tracing_manager_impl.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/common/content_client.h"
#include "content/public/test/browser_task_environment.h"
#include "net/base/network_change_notifier.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/zlib/google/compression_utils.h"
namespace content {
namespace {
const char kDummyTrace[] = …;
class MockNetworkChangeNotifier : public net::NetworkChangeNotifier { … };
class TestBackgroundTracingHelper
: public BackgroundTracingManager::EnabledStateTestObserver { … };
perfetto::protos::gen::ChromeFieldTracingConfig ParseFieldTracingConfigFromText(
const std::string& proto_text) { … }
class MockBrowserClient : public content::ContentBrowserClient { … };
}
class BackgroundTracingManagerTest : public testing::Test { … };
TEST_F(BackgroundTracingManagerTest, HasTraceToUpload) { … }
TEST_F(BackgroundTracingManagerTest, GetTraceToUpload) { … }
TEST_F(BackgroundTracingManagerTest, SavedCountPreventsStart) { … }
TEST_F(BackgroundTracingManagerTest, SavedCountAfterClean) { … }
TEST_F(BackgroundTracingManagerTest, SavedCountAfterDelete) { … }
TEST_F(BackgroundTracingManagerTest, UploadScenarioQuotaExceeded) { … }
TEST_F(BackgroundTracingManagerTest, UploadScenarioQuotaReset) { … }
TEST(BackgroundTracingManagerPersistentTest, DeleteTracesInDateRange) { … }
}