#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "content/browser/download/download_manager_impl.h"
#include "content/browser/download/save_package.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/download_test_observer.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/shell/browser/shell.h"
#include "content/shell/browser/shell_download_manager_delegate.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace content {
namespace {
const char kTestFile[] = …;
class TestShellDownloadManagerDelegate : public ShellDownloadManagerDelegate { … };
class DownloadicidalObserver : public DownloadManager::Observer { … };
class DownloadCompleteObserver : public DownloadManager::Observer { … };
}
class SavePackageBrowserTest : public ContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SavePackageBrowserTest, ImplicitCancel) { … }
IN_PROC_BROWSER_TEST_F(SavePackageBrowserTest, ExplicitCancel) { … }
IN_PROC_BROWSER_TEST_F(SavePackageBrowserTest, DownloadItemDestroyed) { … }
IN_PROC_BROWSER_TEST_F(SavePackageBrowserTest, DownloadItemCanceled) { … }
IN_PROC_BROWSER_TEST_F(SavePackageBrowserTest, Reload) { … }
class SavePackageFencedFrameBrowserTest : public SavePackageBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SavePackageFencedFrameBrowserTest,
IgnoreFencedFrameInMHTML) { … }
}