chromium/chrome/browser/extensions/api/tab_capture/tab_capture_performance_test_base.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 "chrome/browser/extensions/api/tab_capture/tab_capture_performance_test_base.h"

#include <stdint.h>

#include <cmath>
#include <string_view>

#include "base/base64.h"
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/time.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/tracing.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/common/content_features.h"
#include "content/public/test/browser_test_utils.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/test_extension_registry_observer.h"
#include "extensions/common/extension.h"
#include "extensions/common/switches.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "sandbox/policy/features.h"
#include "third_party/zlib/google/compression_utils.h"
#include "ui/gl/gl_switches.h"

namespace {
constexpr std::string_view kFullPerformanceRunSwitch =;
}  // namespace

TabCapturePerformanceTestBase::TabCapturePerformanceTestBase() = default;

TabCapturePerformanceTestBase::~TabCapturePerformanceTestBase() = default;

void TabCapturePerformanceTestBase::SetUp() {}

void TabCapturePerformanceTestBase::SetUpOnMainThread() {}

void TabCapturePerformanceTestBase::SetUpCommandLine(
    base::CommandLine* command_line) {}

void TabCapturePerformanceTestBase::LoadExtension(
    const base::FilePath& unpacked_dir) {}

void TabCapturePerformanceTestBase::NavigateToTestPage(
    const std::string& test_page_html_content) {}

base::Value TabCapturePerformanceTestBase::SendMessageToExtension(
    const std::string& json) {}

TabCapturePerformanceTestBase::TraceAnalyzerUniquePtr
TabCapturePerformanceTestBase::TraceAndObserve(
    const std::string& category_patterns,
    const std::vector<std::string_view>& event_names,
    int required_event_count) {}

// static
base::FilePath TabCapturePerformanceTestBase::GetApiTestDataDir() {}

// static
std::string TabCapturePerformanceTestBase::MakeBase64EncodedGZippedString(
    const std::string& input) {}

// static
void TabCapturePerformanceTestBase::ContinueBrowserFor(
    base::TimeDelta duration) {}

// static
void TabCapturePerformanceTestBase::QueryTraceEvents(
    trace_analyzer::TraceAnalyzer* analyzer,
    std::string_view event_name,
    trace_analyzer::TraceEventVector* events) {}

std::unique_ptr<net::test_server::HttpResponse>
TabCapturePerformanceTestBase::HandleRequest(
    const net::test_server::HttpRequest& request) {}

// static
constexpr base::TimeDelta
    TabCapturePerformanceTestBase::kFullRunObservationPeriod;

// static
constexpr base::TimeDelta
    TabCapturePerformanceTestBase::kQuickRunObservationPeriod;

// static
constexpr base::TimeDelta
    TabCapturePerformanceTestBase::kSendMessageRetryPeriod;

// static
const char TabCapturePerformanceTestBase::kTestWebPageHostname[] =;

// static
const char TabCapturePerformanceTestBase::kTestWebPagePath[] =;

// static
const char TabCapturePerformanceTestBase::kExtensionId[] =;