| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/gfx/font_render_params.h" | 5 #include "ui/gfx/font_render_params.h" |
| 6 | 6 |
| 7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 TestFontDelegate() {} | 24 TestFontDelegate() {} |
| 25 ~TestFontDelegate() override {} | 25 ~TestFontDelegate() override {} |
| 26 | 26 |
| 27 void set_params(const FontRenderParams& params) { params_ = params; } | 27 void set_params(const FontRenderParams& params) { params_ = params; } |
| 28 | 28 |
| 29 FontRenderParams GetDefaultFontRenderParams() const override { | 29 FontRenderParams GetDefaultFontRenderParams() const override { |
| 30 return params_; | 30 return params_; |
| 31 } | 31 } |
| 32 void GetDefaultFontDescription(std::string* family_out, | 32 void GetDefaultFontDescription(std::string* family_out, |
| 33 int* size_pixels_out, | 33 int* size_pixels_out, |
| 34 bool* italic_out, | 34 int* style_out, |
| 35 Font::Weight* weight_out, | 35 Font::Weight* weight_out, |
| 36 FontRenderParams* params_out) const override { | 36 FontRenderParams* params_out) const override { |
| 37 NOTIMPLEMENTED(); | 37 NOTIMPLEMENTED(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 FontRenderParams params_; | 41 FontRenderParams params_; |
| 42 | 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(TestFontDelegate); | 43 DISALLOW_COPY_AND_ASSIGN(TestFontDelegate); |
| 44 }; | 44 }; |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 EXPECT_EQ("Verdana", suggested_family); | 379 EXPECT_EQ("Verdana", suggested_family); |
| 380 | 380 |
| 381 query.families.clear(); | 381 query.families.clear(); |
| 382 query.families.push_back("Arial"); | 382 query.families.push_back("Arial"); |
| 383 suggested_family.clear(); | 383 suggested_family.clear(); |
| 384 GetFontRenderParams(query, &suggested_family); | 384 GetFontRenderParams(query, &suggested_family); |
| 385 EXPECT_EQ("Verdana", suggested_family); | 385 EXPECT_EQ("Verdana", suggested_family); |
| 386 } | 386 } |
| 387 | 387 |
| 388 } // namespace gfx | 388 } // namespace gfx |
| OLD | NEW |