chromium/chrome/browser/launch_time_navigation_signal/launch_time_navigation_signal_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/test/metrics/histogram_tester.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/metrics/content/subprocess_metrics_provider.h"
#include "components/prefs/pref_service.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"

namespace {
const char url1[] =;
const char url2[] =;
const char url3[] =;

// Values for kRestoreOnStartup pref.
const int kRestoreLastSession =;
const int kRestoreUrls =;
const int kRestoreNtp =;

struct StartupPrefs {};

struct LaunchNavigationBrowserTestParam {};

void AppendUrlsToCmdLine(base::CommandLine* command_line,
                         net::EmbeddedTestServer* embedded_test_server,
                         const std::vector<std::string>& urls) {}

base::Value::List ListValueFromTestUrls(
    const std::vector<std::string>& test_urls,
    net::EmbeddedTestServer* embedded_test_server) {}

bool IsUserAgentLaunchNavTypeFeatureEnabled() {}
}  // namespace

class LaunchNavigationBrowserTest
    : public InProcessBrowserTest,
      public BrowserListObserver,
      public testing::WithParamInterface<LaunchNavigationBrowserTestParam> {};

class LaunchNavigationBrowserBasicTest : public LaunchNavigationBrowserTest {};

IN_PROC_BROWSER_TEST_P(LaunchNavigationBrowserBasicTest, CmdLineLaunch) {}

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

class LaunchNavigationBrowserRestartTest : public LaunchNavigationBrowserTest {};

IN_PROC_BROWSER_TEST_P(LaunchNavigationBrowserRestartTest,
                       PRE_CmdLineURLRestartTest) {}

// We attempt to restart the browser in this test body.
IN_PROC_BROWSER_TEST_P(LaunchNavigationBrowserRestartTest,
                       CmdLineURLRestartTest) {}

// Tests navigation type for pages when the browser is restarted with
// session.restore_on_startup pref set to restore last session on startup.
INSTANTIATE_TEST_SUITE_P();

// Tests navigation type for pages when the browser is restarted with
// session.restore_on_startup pref set to restore a list of urls specified by
// session.startup_urls on startup.
INSTANTIATE_TEST_SUITE_P();

// Tests navigation type for pages when the browser is restarted with
// session.restore_on_startup pref set to open NTP on startup.
INSTANTIATE_TEST_SUITE_P();

class LaunchNavigationBrowserWithIFrameTest
    : public LaunchNavigationBrowserTest {};

IN_PROC_BROWSER_TEST_P(LaunchNavigationBrowserWithIFrameTest,
                       CmdLineLaunchWithIFrame) {}

IN_PROC_BROWSER_TEST_P(LaunchNavigationBrowserWithIFrameTest,
                       CreateEmptyFrame) {}

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

class LaunchNavigationBrowserWithPopupTest
    : public LaunchNavigationBrowserTest {};

IN_PROC_BROWSER_TEST_P(LaunchNavigationBrowserWithPopupTest,
                       CmdLineLaunchWithIFrame) {}

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();