#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/html/lazy_load_image_observer.h"
#include <optional>
#include <tuple>
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
#include "third_party/blink/renderer/core/html/html_iframe_element.h"
#include "third_party/blink/renderer/core/html/html_image_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/loader/resource/image_resource.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/core/style/style_image.h"
#include "third_party/blink/renderer/core/testing/sim/sim_compositor.h"
#include "third_party/blink/renderer/core/testing/sim/sim_request.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"
#include "third_party/blink/renderer/platform/heap/thread_state.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_request.h"
#include "third_party/blink/renderer/platform/network/network_state_notifier.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
namespace blink {
namespace {
const Vector<char>& TestImage() { … }
class LazyLoadImagesSimTest : public SimTest { … };
TEST_F(LazyLoadImagesSimTest, ImgSrcset) { … }
class LazyLoadImagesParamsTest
: public SimTest,
public ::testing::WithParamInterface<WebEffectiveConnectionType> { … };
TEST_P(LazyLoadImagesParamsTest, NearViewport) { … }
TEST_P(LazyLoadImagesParamsTest, FarFromViewport) { … }
INSTANTIATE_TEST_SUITE_P(…);
class LazyLoadImagesTest : public SimTest { … };
TEST_F(LazyLoadImagesTest, LoadAllImagesIfPrinting) { … }
TEST_F(LazyLoadImagesTest, LoadAllImagesIfPrintingIFrame) { … }
TEST_F(LazyLoadImagesTest, AttributeChangedFromLazyToEager) { … }
TEST_F(LazyLoadImagesTest, AttributeChangedFromAutoToEager) { … }
TEST_F(LazyLoadImagesTest, AttributeChangedFromUnsetToEager) { … }
TEST_F(LazyLoadImagesTest, ImageInsideLazyLoadedFrame) { … }
TEST_F(LazyLoadImagesTest, LazyLoadFileUrls) { … }
TEST_F(LazyLoadImagesTest, GarbageCollectDeferredLazyLoadImages) { … }
TEST_F(LazyLoadImagesTest, DeferredLazyLoadImagesKeptAliveForDecodeRequest) { … }
}
}