#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/core/css/parser/sizes_attribute_parser.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/webpreferences/web_preferences.mojom-blink.h"
#include "third_party/blink/renderer/core/css/media_values_cached.h"
#include "third_party/blink/renderer/core/media_type_names.h"
#include "third_party/blink/renderer/core/testing/page_test_base.h"
namespace blink {
namespace {
MediaValues* GetTestMediaValues(const double viewport_width = 500) { … }
}
SizesAttributeParserTestCase;
class SizesAttributeParserTest : public PageTestBase { … };
TEST_F(SizesAttributeParserTest, Basic) { … }
TEST_F(SizesAttributeParserTest, FloatViewportWidth) { … }
TEST_F(SizesAttributeParserTest, NegativeSourceSizesValue) { … }
TEST_F(SizesAttributeParserTest, ZeroSourceSizesValue) { … }
TEST_F(SizesAttributeParserTest, PositiveSourceSizesValue) { … }
TEST_F(SizesAttributeParserTest, EmptySizes) { … }
TEST_F(SizesAttributeParserTest, AutoSizes) { … }
TEST_F(SizesAttributeParserTest, AutoSizesNonLazyImg) { … }
TEST_F(SizesAttributeParserTest, AutoSizesLazyImgNoWidth) { … }
TEST_F(SizesAttributeParserTest, AutoSizesLazyImgZeroWidth) { … }
TEST_F(SizesAttributeParserTest, AutoSizesLazyImgSmallPositiveWidth) { … }
TEST_F(SizesAttributeParserTest, AutoSizesLazyImgLargePositiveWidth) { … }
}