Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp

Issue 2348993002: Don't include LayoutObject.h from FrameView.h (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/LayoutObject.h"
5 #include "core/layout/LayoutTestHelper.h" 6 #include "core/layout/LayoutTestHelper.h"
6 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
7 8
8 namespace blink { 9 namespace blink {
9 10
10 class TextAutosizerTest : public RenderingTest { 11 class TextAutosizerTest : public RenderingTest {
11 private: 12 private:
12 void SetUp() override 13 void SetUp() override
13 { 14 {
14 RenderingTest::SetUp(); 15 RenderingTest::SetUp();
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 document().settings()->setDeviceScaleAdjustment(2.0f); 390 document().settings()->setDeviceScaleAdjustment(2.0f);
390 document().view()->updateAllLifecyclePhases(); 391 document().view()->updateAllLifecyclePhases();
391 392
392 autosized = document().getElementById("autosized"); 393 autosized = document().getElementById("autosized");
393 EXPECT_FLOAT_EQ(16.f, autosized->layoutObject()->style()->specifiedFontSize( )); 394 EXPECT_FLOAT_EQ(16.f, autosized->layoutObject()->style()->specifiedFontSize( ));
394 // (device scale adjustment = 2) * (specified font-size = 16px) * (viewport width = 800px) / (window width = 320px) = 80px. 395 // (device scale adjustment = 2) * (specified font-size = 16px) * (viewport width = 800px) / (window width = 320px) = 80px.
395 EXPECT_FLOAT_EQ(80.f, autosized->layoutObject()->style()->computedFontSize() ); 396 EXPECT_FLOAT_EQ(80.f, autosized->layoutObject()->style()->computedFontSize() );
396 } 397 }
397 398
398 } // namespace blink 399 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ImageQualityController.cpp ('k') | third_party/WebKit/Source/core/page/PageAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698