chromium/chrome/test/data/webui/optimization_guide_internals/optimization_guide_internals_browsertest.cc

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

#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/optimization_guide/browser_test_util.h"
#include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h"
#include "chrome/browser/optimization_guide/optimization_guide_keyed_service.h"
#include "chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/web_ui_mocha_browser_test.h"
#include "components/optimization_guide/core/model_util.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "components/optimization_guide/core/optimization_guide_logger.h"
#include "components/optimization_guide/core/optimization_guide_switches.h"
#include "components/optimization_guide/optimization_guide_internals/webui/url_constants.h"
#include "content/public/test/browser_test.h"

class OptimizationGuideInternalsBrowserTest : public WebUIMochaBrowserTest {};

class OptimizationGuideInternalsLoggerBrowserTest
    : public OptimizationGuideInternalsBrowserTest {};

IN_PROC_BROWSER_TEST_F(OptimizationGuideInternalsLoggerBrowserTest,
                       DebugLogEnabledOnInternalsPage) {}

class OptimizationGuideInternalsLogMessageBrowserTest
    : public OptimizationGuideInternalsBrowserTest {};

// Verifies log message is added when internals page is open.
IN_PROC_BROWSER_TEST_F(OptimizationGuideInternalsLogMessageBrowserTest,
                       InternalsPageOpen) {}

class OptimizationGuideInternalsModelsPageBrowserTest
    : public OptimizationGuideInternalsBrowserTest {};

// Verifies downloaded models are added when #models page is open.
IN_PROC_BROWSER_TEST_F(OptimizationGuideInternalsModelsPageBrowserTest,
                       InternalsModelsPageOpen) {}