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

#include "base/files/file_path.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/offline_item_utils.h"
#include "chrome/browser/ui/views/download/bubble/download_bubble_contents_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/test_with_browser_view.h"
#include "chrome/browser/ui/views/frame/toolbar_button_provider.h"
#include "components/download/public/common/download_danger_type.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"

namespace {

NiceMock;
Return;
ReturnRefOfCopy;

class MockDownloadBubbleUIController : public DownloadBubbleUIController {};

class MockDownloadCoreService : public DownloadCoreService {};

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

// This tests the DownloadToolbarButtonView that is already in the test
// fixture's browser. This makes sure it is hooked up properly to the testing
// profile and downloads machinery.
// TODO(chlily): Investigate whether there is a better way to do this.
// TODO(chlily): Add more tests to cover all functionality.
class DownloadToolbarButtonViewTest : public TestWithBrowserView {};

TEST_F(DownloadToolbarButtonViewTest, ShowHide) {}

TEST_F(DownloadToolbarButtonViewTest, OpenPrimaryDialog) {}

TEST_F(DownloadToolbarButtonViewTest, OpenSecurityDialog) {}

TEST_F(DownloadToolbarButtonViewTest, OpenMostSpecificDialogToSecurityPage) {}

TEST_F(DownloadToolbarButtonViewTest, OpenMostSpecificDialogToPrimaryPage) {}

}  // namespace