#include "third_party/blink/renderer/core/html/image_document.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/document_init.h"
#include "third_party/blink/renderer/core/dom/document_parser.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/geometry/dom_rect.h"
#include "third_party/blink/renderer/core/html/html_image_element.h"
#include "third_party/blink/renderer/core/loader/empty_clients.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.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/testing/task_environment.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
namespace blink {
namespace {
Vector<unsigned char> JpegImage() { … }
Vector<unsigned char> AnimatedWebpImage() { … }
}
class WindowToViewportScalingChromeClient : public EmptyChromeClient { … };
class ImageDocumentTest : public testing::Test { … };
void ImageDocumentTest::CreateDocumentWithoutLoadingImage(int view_width,
int view_height,
bool is_animated) { … }
void ImageDocumentTest::CreateDocument(int view_width,
int view_height,
bool is_animated ) { … }
ImageDocument& ImageDocumentTest::GetDocument() const { … }
void ImageDocumentTest::SetPageZoom(float factor) { … }
void ImageDocumentTest::SetWindowToViewportScalingFactor(float factor) { … }
void ImageDocumentTest::SetForceZeroLayoutHeight(bool force) { … }
TEST_F(ImageDocumentTest, ImageLoad) { … }
TEST_F(ImageDocumentTest, LargeImageScalesDown) { … }
TEST_F(ImageDocumentTest, RestoreImageOnClick) { … }
TEST_F(ImageDocumentTest, InitialZoomDoesNotAffectScreenFit) { … }
TEST_F(ImageDocumentTest, ZoomingDoesNotChangeRelativeSize) { … }
TEST_F(ImageDocumentTest, ImageScalesDownWithDsf) { … }
TEST_F(ImageDocumentTest, ImageNotCenteredWithForceZeroLayoutHeight) { … }
TEST_F(ImageDocumentTest, ImageCenteredWithoutForceZeroLayoutHeight) { … }
TEST_F(ImageDocumentTest, DomInteractive) { … }
TEST_F(ImageDocumentTest, ImageSrcChangedBeforeFinish) { … }
TEST_F(ImageDocumentTest, ImageStyleContainsTransitionForNonAnimatedImage) { … }
TEST_F(ImageDocumentTest, ImageStyleDoesNotContainTransitionForAnimatedImage) { … }
#if BUILDFLAG(IS_ANDROID)
#define MAYBE …
#else
#define MAYBE …
#endif
TEST_F(ImageDocumentTest, MAYBE(ImageCenteredAtDeviceScaleFactor)) { … }
class ImageDocumentViewportTest : public SimTest { … };
TEST_F(ImageDocumentViewportTest, HidingURLBarDoesntChangeImageLocation) { … }
TEST_F(ImageDocumentViewportTest, ScaleImage) { … }
TEST_F(ImageDocumentViewportTest, DivWidth) { … }
#undef MAYBE
}