diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-03-08 13:07:32 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-03-08 13:40:10 +0000 |
commit | 818d9aed569afd192f6d4f6d9b28b72912df8b93 (patch) | |
tree | fa30cbdffa3e8fdc09dbbe37ffc0a721b40fced1 /chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp | |
parent | 66a2147d838e293f4a5db7711c8eba4e6faaaf0f (diff) | |
download | qtwebengine-chromium-818d9aed569afd192f6d4f6d9b28b72912df8b93.tar.gz |
BASELINE: Update Chromium to 65.0.3325.151
Change-Id: I3c71dd500483eb29491ac3eee4123714dda52da9
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp b/chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp index ffc8c6cdf4e..39a0bd5e489 100644 --- a/chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp +++ b/chromium/third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp @@ -1032,4 +1032,31 @@ TEST_F(TextAutosizerTest, ClusterHasEnoughTextToAutosizeForZoomDSF) { EXPECT_FLOAT_EQ(20.0f * device_scale, target->GetLayoutObject()->Style()->ComputedFontSize()); } + +TEST_F(TextAutosizerTest, AfterPrint) { + const float device_scale = 3; + FloatSize print_size(160, 240); + set_device_scale_factor(device_scale); + SetBodyInnerHTML(R"HTML( + <style> + html { font-size: 8px; } + </style> + <body> + <div id='target'> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed + do eiusmod tempor incididunt ut labore et dolore magna aliqua. + Ut enim ad minim veniam, quis nostrud exercitation ullamco + laboris nisi ut aliquip ex ea commodo consequat. + </div> + </body> + )HTML"); + Element* target = GetDocument().getElementById("target"); + EXPECT_FLOAT_EQ(20.0f * device_scale, + target->GetLayoutObject()->Style()->ComputedFontSize()); + GetDocument().GetFrame()->SetPrinting(true, print_size, print_size, 1.0); + EXPECT_FLOAT_EQ(8.0f, target->GetLayoutObject()->Style()->ComputedFontSize()); + GetDocument().GetFrame()->SetPrinting(false, print_size, print_size, 1.0); + EXPECT_FLOAT_EQ(20.0f * device_scale, + target->GetLayoutObject()->Style()->ComputedFontSize()); +} } // namespace blink |