| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/display/display_manager.h" | 5 #include "ash/display/display_manager.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/display/display_controller.h" | 8 #include "ash/display/display_controller.h" |
| 9 #include "ash/display/display_info.h" | 9 #include "ash/display/display_info.h" |
| 10 #include "ash/display/display_layout_store.h" | 10 #include "ash/display/display_layout_store.h" |
| (...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 FontTestHelper(float scale, DisplayType display_type) { | 1569 FontTestHelper(float scale, DisplayType display_type) { |
| 1570 gfx::ClearFontRenderParamsCacheForTest(); | 1570 gfx::ClearFontRenderParamsCacheForTest(); |
| 1571 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 1571 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 1572 if (display_type == INTERNAL) | 1572 if (display_type == INTERNAL) |
| 1573 command_line->AppendSwitch(switches::kAshUseFirstDisplayAsInternal); | 1573 command_line->AppendSwitch(switches::kAshUseFirstDisplayAsInternal); |
| 1574 command_line->AppendSwitchASCII(switches::kAshHostWindowBounds, | 1574 command_line->AppendSwitchASCII(switches::kAshHostWindowBounds, |
| 1575 StringPrintf("1000x800*%f", scale)); | 1575 StringPrintf("1000x800*%f", scale)); |
| 1576 SetUp(); | 1576 SetUp(); |
| 1577 } | 1577 } |
| 1578 | 1578 |
| 1579 virtual ~FontTestHelper() { | 1579 ~FontTestHelper() override { TearDown(); } |
| 1580 TearDown(); | |
| 1581 } | |
| 1582 | 1580 |
| 1583 // test::AshTestBase: | 1581 // test::AshTestBase: |
| 1584 virtual void TestBody() override { | 1582 void TestBody() override { NOTREACHED(); } |
| 1585 NOTREACHED(); | |
| 1586 } | |
| 1587 | 1583 |
| 1588 private: | 1584 private: |
| 1589 DISALLOW_COPY_AND_ASSIGN(FontTestHelper); | 1585 DISALLOW_COPY_AND_ASSIGN(FontTestHelper); |
| 1590 }; | 1586 }; |
| 1591 | 1587 |
| 1592 | 1588 |
| 1593 bool IsTextSubpixelPositioningEnabled() { | 1589 bool IsTextSubpixelPositioningEnabled() { |
| 1594 gfx::FontRenderParams params = | 1590 gfx::FontRenderParams params = |
| 1595 gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(false), NULL); | 1591 gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(false), NULL); |
| 1596 return params.subpixel_positioning; | 1592 return params.subpixel_positioning; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1678 1.25f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor()); | 1674 1.25f, Shell::GetScreen()->GetPrimaryDisplay().device_scale_factor()); |
| 1679 EXPECT_TRUE(IsTextSubpixelPositioningEnabled()); | 1675 EXPECT_TRUE(IsTextSubpixelPositioningEnabled()); |
| 1680 EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams()); | 1676 EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams()); |
| 1681 | 1677 |
| 1682 DisplayInfo::SetUse125DSFForUIScaling(false); | 1678 DisplayInfo::SetUse125DSFForUIScaling(false); |
| 1683 } | 1679 } |
| 1684 | 1680 |
| 1685 #endif // OS_CHROMEOS | 1681 #endif // OS_CHROMEOS |
| 1686 | 1682 |
| 1687 } // namespace ash | 1683 } // namespace ash |
| OLD | NEW |