chromium/chrome/browser/ui/passwords/password_generation_popup_controller_impl_unittest.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/ui/passwords/password_generation_popup_controller_impl.h"

#include <memory>
#include <string>

#include "base/i18n/rtl.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/passwords/password_generation_popup_controller.h"
#include "chrome/browser/ui/passwords/password_generation_popup_view.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/autofill/core/browser/ui/suggestion_hiding_reason.h"
#include "components/autofill/core/common/password_generation_util.h"
#include "components/autofill/core/common/unique_ids.h"
#include "components/password_manager/core/browser/password_form.h"
#include "components/password_manager/core/browser/password_generation_frame_helper.h"
#include "components/password_manager/core/browser/stub_password_manager_client.h"
#include "components/password_manager/core/browser/stub_password_manager_driver.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
#include "content/public/browser/web_contents.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/geometry/rect_f.h"

#if !BUILDFLAG(IS_ANDROID)
#include "base/test/scoped_feature_list.h"
#include "components/password_manager/core/browser/features/password_features.h"
#endif  // !BUILDFLAG(IS_ANDROID)

namespace password_manager {
namespace {

PasswordGenerationType;
PasswordGenerationUIData;
_;
Return;

#if !BUILDFLAG(IS_ANDROID)
kPasswordGenerationExperiment;
kPasswordGenerationNudgePasswordDismissCount;
#endif  // !BUILDFLAG(IS_ANDROID)

PasswordGenerationUIData CreatePasswordGenerationUIData() {}

class MockPasswordManagerDriver
    : public password_manager::StubPasswordManagerDriver {};

class MockPasswordGenerationPopupView : public PasswordGenerationPopupView {};

class PasswordGenerationPopupControllerImplTest
    : public ChromeRenderViewHostTestHarness {};

void PasswordGenerationPopupControllerImplTest::SetUp() {}

void PasswordGenerationPopupControllerImplTest::TearDown() {}

std::unique_ptr<MockPasswordManagerDriver>
PasswordGenerationPopupControllerImplTest::CreateDriver() {}

}  // namespace

TEST_F(PasswordGenerationPopupControllerImplTest, GetOrCreateTheSame) {}

TEST_F(PasswordGenerationPopupControllerImplTest, GetOrCreateDifferentBounds) {}

TEST_F(PasswordGenerationPopupControllerImplTest, GetOrCreateDifferentTabs) {}

TEST_F(PasswordGenerationPopupControllerImplTest, GetOrCreateDifferentDrivers) {}

TEST_F(PasswordGenerationPopupControllerImplTest,
       GetOrCreateDifferentElements) {}

TEST_F(PasswordGenerationPopupControllerImplTest, DestroyInPasswordAccepted) {}

TEST_F(PasswordGenerationPopupControllerImplTest, GetElementTextDirection) {}

TEST_F(PasswordGenerationPopupControllerImplTest,
       PreviewIsTriggeredDuringGeneration) {}

TEST_F(PasswordGenerationPopupControllerImplTest,
       PreviewIsTriggeredOnlyDuringOfferGeneration) {}

TEST_F(PasswordGenerationPopupControllerImplTest, ClearsFormPreviewOnHide) {}

TEST_F(PasswordGenerationPopupControllerImplTest,
       SuggestedTextDefaultPasswordLength) {}

TEST_F(PasswordGenerationPopupControllerImplTest,
       SuggestedTextShorterPasswordLength) {}

#if !BUILDFLAG(IS_ANDROID)
TEST_F(PasswordGenerationPopupControllerImplTest,
       AdvancesFieldFocusOnUseStrongPassword) {}

TEST_F(PasswordGenerationPopupControllerImplTest,
       PreviewsGeneratedPasswordOnShowInNudgePassword) {}

TEST_F(PasswordGenerationPopupControllerImplTest,
       IncrementsNudgePasswordDismissCountPrefOnHide) {}

TEST_F(PasswordGenerationPopupControllerImplTest,
       ResetsNudgePasswordDismissCountPrefOnPasswordAccepted) {}

#endif  // !BUILDFLAG(IS_ANDROID)

}  // namespace password_manager