chromium/chrome/browser/ui/views/commerce/price_tracking_email_dialog_view_unittest.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 "chrome/browser/ui/views/commerce/price_tracking_email_dialog_view.h"

#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/identity_test_environment_profile_adaptor.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/views/chrome_test_widget.h"
#include "components/commerce/core/pref_names.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/widget/any_widget_observer.h"
#include "ui/views/widget/unique_widget_ptr.h"

class PriceTrackingEmailDialogViewUnitTest : public BrowserWithTestWindowTest {};

// Accpting the dialog should result in setting the email preference to "true".
TEST_F(PriceTrackingEmailDialogViewUnitTest, DialogAccepted) {}

// Rejecting the dialog should result in setting the email preference to
// "false".
TEST_F(PriceTrackingEmailDialogViewUnitTest, DialogRejected) {}

// Closing the dialog should result in no state change in preferences.
TEST_F(PriceTrackingEmailDialogViewUnitTest, DialogClosed) {}