chromium/chrome/test/chromedriver/performance_logger_unittest.cc

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

#include "chrome/test/chromedriver/performance_logger.h"

#include <stddef.h>

#include <memory>
#include <utility>
#include <vector>

#include "base/compiler_specific.h"
#include "base/format_macros.h"
#include "base/json/json_reader.h"
#include "base/memory/raw_ptr.h"
#include "base/test/gmock_expected_support.h"
#include "base/time/time.h"
#include "base/types/expected_macros.h"
#include "base/values.h"
#include "chrome/test/chromedriver/chrome/devtools_client_impl.h"
#include "chrome/test/chromedriver/chrome/log.h"
#include "chrome/test/chromedriver/chrome/status.h"
#include "chrome/test/chromedriver/chrome/stub_devtools_client.h"
#include "chrome/test/chromedriver/session.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {

struct DevToolsCommand {};

class FakeDevToolsClient : public StubDevToolsClient {};

struct LogEntry {};

class FakeLog : public Log {};

void FakeLog::AddEntryTimestamped(const base::Time& timestamp,
                                  Level level,
                                  const std::string& source,
                                  const std::string& message) {}

bool FakeLog::Emptied() const {}

base::expected<base::Value::Dict, std::string> ParseDictionary(
    const std::string& json) {}

void ValidateLogEntry(const LogEntry* entry,
                      const std::string& expected_webview,
                      const std::string& expected_method,
                      const base::Value::Dict& expected_params) {}

void ValidateLogEntry(const LogEntry *entry,
                      const std::string& expected_webview,
                      const std::string& expected_method) {}

void ExpectCommand(FakeDevToolsClient* client, const std::string& method) {}

void ExpectEnableDomains(FakeDevToolsClient* client) {}

}  // namespace

TEST(PerformanceLogger, OneWebView) {}

TEST(PerformanceLogger, TwoWebViews) {}

TEST(PerformanceLogger, PerfLoggingPrefs) {}

namespace {

class FakeBrowserwideClient : public FakeDevToolsClient {};

}  // namespace

TEST(PerformanceLogger, TracingStartStop) {}

TEST(PerformanceLogger, RecordTraceEvents) {}

TEST(PerformanceLogger, ShouldRequestTraceEvents) {}

TEST(PerformanceLogger, WarnWhenTraceBufferFull) {}