#include "chrome/browser/web_applications/web_contents/web_app_icon_downloader.h"
#include <stddef.h>
#include <tuple>
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_future.h"
#include "base/test/test_mock_time_task_runner.h"
#include "chrome/browser/web_applications/test/web_app_test.h"
#include "chrome/browser/web_applications/web_app_constants.h"
#include "chrome/browser/web_applications/web_app_install_utils.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/prerender_test_util.h"
#include "content/public/test/web_contents_tester.h"
#include "net/http/http_status_code.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/geometry/size.h"
namespace web_app {
namespace {
_;
FieldsAre;
IsEmpty;
IsTrue;
Pair;
UnorderedElementsAre;
std::vector<SkBitmap> CreateTestBitmaps(const std::vector<gfx::Size>& sizes) { … }
class WebAppIconDownloaderTest : public WebAppTest { … };
TEST_F(WebAppIconDownloaderTest, SimpleDownload) { … }
TEST_F(WebAppIconDownloaderTest, NoHTTPStatusCode) { … }
TEST_F(WebAppIconDownloaderTest, DownloadMultipleUrls) { … }
TEST_F(WebAppIconDownloaderTest, SkipPageFavicons) { … }
TEST_F(WebAppIconDownloaderTest, ShuttingDown) { … }
TEST_F(WebAppIconDownloaderTest, PageNavigates) { … }
TEST_F(WebAppIconDownloaderTest, PageNavigatesAfterDownload) { … }
TEST_F(WebAppIconDownloaderTest, PageNavigatesSameDocument) { … }
TEST_F(WebAppIconDownloaderTest, HungAllIconsFail) { … }
TEST_F(WebAppIconDownloaderTest, HungFailAllOption) { … }
TEST_F(WebAppIconDownloaderTest, HungIconSuccess) { … }
class WebAppIconDownloaderPrerenderTest : public WebAppIconDownloaderTest { … };
TEST_F(WebAppIconDownloaderPrerenderTest, PrerenderedPageNavigates) { … }
}
}