#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/download/chrome_download_manager_delegate.h"
#include "chrome/browser/download/download_browsertest_utils.h"
#include "chrome/browser/download/download_core_service.h"
#include "chrome/browser/download/download_core_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/toolbar/app_menu_model.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "chrome/test/interaction/tracked_element_webcontents.h"
#include "chrome/test/interaction/webcontents_interaction_test_util.h"
#include "components/download/public/common/download_danger_type.h"
#include "components/safe_browsing/core/common/features.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/interaction/element_identifier.h"
#include "ui/base/interaction/interaction_sequence.h"
namespace {
DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(…);
const char kClickFn[] = …;
Eq;
class DownloadsPageInteractiveUitest
: public InteractiveBrowserTestT<DownloadTestBase> { … };
IN_PROC_BROWSER_TEST_F(DownloadsPageInteractiveUitest, DownloadItemsAppear) { … }
IN_PROC_BROWSER_TEST_F(DownloadsPageInteractiveUitest,
QuickRemoveDownloadItem) { … }
IN_PROC_BROWSER_TEST_F(DownloadsPageInteractiveUitest, ClearAll) { … }
template <download::DownloadDangerType DangerType>
class DownloadsPageInteractiveUitestWithDangerType
: public DownloadsPageInteractiveUitest { … };
template <download::DownloadDangerType DangerType>
class DownloadsPageInteractiveUitestWithDangerTypeForBypassDialog
: public DownloadsPageInteractiveUitestWithDangerType<DangerType> { … };
DownloadsPageInteractiveUitestSuspicious;
IN_PROC_BROWSER_TEST_F(DownloadsPageInteractiveUitestSuspicious,
DiscardSuspiciousFile) { … }
IN_PROC_BROWSER_TEST_F(DownloadsPageInteractiveUitestSuspicious,
QuickDiscardSuspiciousFile) { … }
IN_PROC_BROWSER_TEST_F(DownloadsPageInteractiveUitestSuspicious,
ValidateSuspiciousFile) { … }
DownloadsPageInteractiveUitestDangerous;
IN_PROC_BROWSER_TEST_F(DownloadsPageInteractiveUitestDangerous,
DiscardDangerousFile) { … }
IN_PROC_BROWSER_TEST_F(DownloadsPageInteractiveUitestDangerous,
QuickDiscardDangerousFile) { … }
DownloadsPageInteractiveUitestDangerousFromBypassDialog;
IN_PROC_BROWSER_TEST_F(DownloadsPageInteractiveUitestDangerousFromBypassDialog,
ValidateDangerousFileFromPrompt) { … }
IN_PROC_BROWSER_TEST_F(DownloadsPageInteractiveUitestDangerousFromBypassDialog,
CancelValidateDangerousFile) { … }
}