chromium/chrome/browser/extensions/api/identity/gaia_remote_consent_flow_browsertest.cc

// Copyright 2022 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/identity/gaia_remote_consent_flow.h"

#include "base/strings/strcat.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/signin/public/base/consent_level.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/signin/public/identity_manager/identity_test_utils.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "google_apis/gaia/core_account_id.h"
#include "google_apis/gaia/fake_gaia.h"
#include "google_apis/gaia/gaia_auth_test_util.h"
#include "google_apis/gaia/gaia_switches.h"
#include "google_apis/gaia/gaia_urls.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chromeos/ash/components/network/portal_detector/mock_network_portal_detector.h"
#endif  // BUILDFLAG(IS_CHROMEOS_ASH)

// TODO(rsult): Issues with creating a primary account on Lacros on test setup.
// Should be reworked asap to make it pass as this feature is available on
// Lacros as well.
#if !BUILDFLAG(IS_CHROMEOS_LACROS)
namespace extensions {

namespace {

constexpr char kTestEmail[] =;
constexpr char kGaiaId[] =;
constexpr char kFakeRefreshToken[] =;

constexpr char kTestAuthSIDCookie[] =;
constexpr char kTestAuthLSIDCookie[] =;

}  // namespace

class MockGaiaRemoteConsentFlowDelegate
    : public GaiaRemoteConsentFlow::Delegate {};

class GaiaRemoteConsentFlowParamBrowserTest : public InProcessBrowserTest {};

IN_PROC_BROWSER_TEST_F(GaiaRemoteConsentFlowParamBrowserTest,
                       SimulateInvalidConsent) {}

IN_PROC_BROWSER_TEST_F(GaiaRemoteConsentFlowParamBrowserTest, SimulateNoGrant) {}

IN_PROC_BROWSER_TEST_F(GaiaRemoteConsentFlowParamBrowserTest,
                       SimulateAccessGranted) {}

}  // namespace extensions
#endif  // !BUILDFLAG(IS_CHROMEOS_LACROS)