chromium/chrome/browser/ui/views/download/bubble/download_bubble_contents_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/download/bubble/download_bubble_contents_view.h"

#include "base/test/gmock_expected_support.h"
#include "chrome/browser/download/bubble/download_bubble_ui_controller.h"
#include "chrome/browser/download/chrome_download_manager_delegate.h"
#include "chrome/browser/download/download_core_service.h"
#include "chrome/browser/download/download_core_service_factory.h"
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/download_ui_model.h"
#include "chrome/browser/download/offline_item_utils.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/download/download_bubble_info.h"
#include "chrome/browser/ui/hats/mock_trust_safety_sentiment_service.h"
#include "chrome/browser/ui/hats/trust_safety_sentiment_service_factory.h"
#include "chrome/browser/ui/views/download/bubble/download_bubble_primary_view.h"
#include "chrome/browser/ui/views/download/bubble/download_bubble_row_view.h"
#include "chrome/browser/ui/views/download/bubble/download_toolbar_button_view.h"
#include "chrome/test/base/test_browser_window.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "components/download/public/common/mock_download_item.h"
#include "content/public/browser/download_item_utils.h"
#include "content/public/test/mock_download_manager.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/bubble/bubble_dialog_delegate_view.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/view.h"
#include "ui/views/window/dialog_client_view.h"

namespace {

_;
NiceMock;
Return;
ReturnRefOfCopy;

class MockDownloadBubbleNavigationHandler
    : public DownloadBubbleNavigationHandler {};

class MockDownloadCoreService : public DownloadCoreService {};

std::unique_ptr<KeyedService> BuildMockDownloadCoreService(
    content::BrowserContext* browser_context) {}

class DownloadBubbleContentsViewTest
    : public ChromeViewsTestBase,
      public ::testing::WithParamInterface<bool> {};

// The test parameter is whether the primary view is the partial view.
INSTANTIATE_TEST_SUITE_P();

TEST_P(DownloadBubbleContentsViewTest, ShowSecurityPage) {}

TEST_P(DownloadBubbleContentsViewTest, Destroy) {}

// Switching back and forth between pages should work and not crash.
TEST_P(DownloadBubbleContentsViewTest, SwitchPages) {}

TEST_P(DownloadBubbleContentsViewTest, ShowPrimaryPageSpecifyingContentId) {}

TEST_P(DownloadBubbleContentsViewTest, ProcessSecuritySubpageButtonPress) {}

TEST_P(DownloadBubbleContentsViewTest,
       TrustSafetySentimentInteractedWithDownloadWarningUI) {}

TEST_P(DownloadBubbleContentsViewTest, AddSecuritySubpageWarningActionEvent) {}

TEST_P(DownloadBubbleContentsViewTest, LogDismissOnDestroyed) {}

TEST_P(DownloadBubbleContentsViewTest,
       DontLogDismissOnDestroyedIfSecurityViewNotShown) {}

TEST_P(DownloadBubbleContentsViewTest,
       ProcessSecuritySubpageButtonPressCallsOnSecurityDialogButtonPress) {}

}  // namespace