#include "chrome/browser/ui/views/download/bubble/download_bubble_security_view.h"
#include "base/test/scoped_feature_list.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_item_warning_data.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_contents_view_info.h"
#include "chrome/browser/ui/download/download_bubble_info.h"
#include "chrome/browser/ui/download/download_bubble_security_view_info.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/download/bubble/download_bubble_contents_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/common/chrome_switches.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 "components/safe_browsing/core/common/features.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/base/mojom/dialog_button.mojom.h"
#include "ui/color/color_id.h"
#include "ui/views/bubble/bubble_dialog_delegate_view.h"
#include "ui/views/vector_icons.h"
#include "ui/views/view.h"
#include "ui/views/window/dialog_client_view.h"
namespace {
ContentId;
Return;
ReturnRefOfCopy;
SubpageButton;
WarningSurface;
WarningAction;
WarningActionEvent;
class MockDownloadBubbleNavigationHandler
: public DownloadBubbleNavigationHandler { … };
class MockDownloadBubbleSecurityViewDelegate
: public DownloadBubbleSecurityView::Delegate { … };
class MockDownloadCoreService : public DownloadCoreService { … };
std::unique_ptr<KeyedService> BuildMockDownloadCoreService(
content::BrowserContext* browser_context) { … }
}
class DownloadBubbleSecurityViewTest : public ChromeViewsTestBase { … };
TEST_F(DownloadBubbleSecurityViewTest,
UpdateSecurityView_WillHaveAppropriateDialogButtons) { … }
TEST_F(DownloadBubbleSecurityViewTest, VerifyLogWarningActions) { … }
TEST_F(DownloadBubbleSecurityViewTest, ResizesOnUpdate) { … }
TEST_F(DownloadBubbleSecurityViewTest, ProcessButtonClick) { … }
TEST_F(DownloadBubbleSecurityViewTest, InitializeAndReset) { … }
TEST_F(DownloadBubbleSecurityViewTest, ReturnToPrimaryDialog) { … }
TEST_F(DownloadBubbleSecurityViewTest, InsecureDontReturnToPrimaryDialog) { … }
TEST_F(DownloadBubbleSecurityViewTest, ReturnToPrimaryDialogNoSubpage) { … }
TEST_F(DownloadBubbleSecurityViewTest, ValidateDangerousDownload) { … }