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

Side by Side Diff: third_party/WebKit/Source/platform/testing/FontTestHelpers.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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 "platform/testing/FontTestHelpers.h" 5 #include "platform/testing/FontTestHelpers.h"
6 6
7 #include <memory>
7 #include "platform/fonts/Font.h" 8 #include "platform/fonts/Font.h"
8 #include "platform/fonts/FontCustomPlatformData.h" 9 #include "platform/fonts/FontCustomPlatformData.h"
9 #include "platform/fonts/FontDescription.h" 10 #include "platform/fonts/FontDescription.h"
10 #include "platform/fonts/FontSelector.h" 11 #include "platform/fonts/FontSelector.h"
11 #include "platform/testing/UnitTestHelpers.h" 12 #include "platform/testing/UnitTestHelpers.h"
12 #include "wtf/PassRefPtr.h" 13 #include "wtf/PassRefPtr.h"
13 #include "wtf/RefPtr.h" 14 #include "wtf/RefPtr.h"
14 #include <memory>
15 15
16 namespace blink { 16 namespace blink {
17 namespace testing { 17 namespace testing {
18 18
19 namespace { 19 namespace {
20 20
21 class TestFontSelector : public FontSelector { 21 class TestFontSelector : public FontSelector {
22 public: 22 public:
23 static TestFontSelector* create(const String& path) { 23 static TestFontSelector* create(const String& path) {
24 RefPtr<SharedBuffer> fontBuffer = testing::readFromFile(path); 24 RefPtr<SharedBuffer> fontBuffer = testing::readFromFile(path);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 fontDescription.setSpecifiedSize(size); 67 fontDescription.setSpecifiedSize(size);
68 fontDescription.setComputedSize(size); 68 fontDescription.setComputedSize(size);
69 69
70 Font font(fontDescription); 70 Font font(fontDescription);
71 font.update(TestFontSelector::create(fontPath)); 71 font.update(TestFontSelector::create(fontPath));
72 return font; 72 return font;
73 } 73 }
74 74
75 } // namespace testing 75 } // namespace testing
76 } // namespace blink 76 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698