chromium/chrome/browser/download/download_danger_prompt_browsertest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "chrome/browser/download/download_danger_prompt.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/download_protection/download_protection_service.h"
#include "chrome/browser/safe_browsing/test_safe_browsing_service.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_tabstrip.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/tabs/tab_strip_model.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/download/public/common/mock_download_item.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing/core/browser/db/database_manager.h"
#include "components/safe_browsing/core/common/proto/csd.pb.h"
#include "content/public/browser/download_item_utils.h"
#include "content/public/test/browser_test.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

_;
ByRef;
Eq;
Return;
ReturnRef;
SaveArg;

namespace safe_browsing {

namespace {

const char kTestDownloadUrl[] =;
const char kDownloadResponseToken[] =;

}  // namespace

class DownloadDangerPromptTest : public InProcessBrowserTest {};

// Disabled for flaky timeouts on Windows. crbug.com/446696
#if BUILDFLAG(IS_WIN)
#define MAYBE_TestAll
#else
#define MAYBE_TestAll
#endif
IN_PROC_BROWSER_TEST_F(DownloadDangerPromptTest, MAYBE_TestAll) {}

// Class for testing interactive dialogs.
class DownloadDangerPromptBrowserTest : public DialogBrowserTest {};

IN_PROC_BROWSER_TEST_F(DownloadDangerPromptBrowserTest,
                       InvokeUi_DangerousFileFromApi) {}

IN_PROC_BROWSER_TEST_F(DownloadDangerPromptBrowserTest,
                       InvokeUi_DangerousUrlFromApi) {}

IN_PROC_BROWSER_TEST_F(DownloadDangerPromptBrowserTest,
                       InvokeUi_UncommonContentFromApi) {}

IN_PROC_BROWSER_TEST_F(DownloadDangerPromptBrowserTest,
                       InvokeUi_PotentiallyUnwantedFromApi) {}

IN_PROC_BROWSER_TEST_F(DownloadDangerPromptBrowserTest,
                       InvokeUi_AccountCompromiseFromApi) {}

}  // namespace safe_browsing