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

Side by Side Diff: Source/platform/fonts/GlyphBufferTest.cpp

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/fonts/GlyphBuffer.h ('k') | Source/platform/fonts/GlyphMetricsMap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "config.h" 5 #include "config.h"
6 #include "platform/fonts/GlyphBuffer.h" 6 #include "platform/fonts/GlyphBuffer.h"
7 7
8 #include "platform/fonts/SimpleFontData.h" 8 #include "platform/fonts/SimpleFontData.h"
9 #include "wtf/PassRefPtr.h" 9 #include "wtf/PassRefPtr.h"
10 #include "wtf/RefPtr.h" 10 #include "wtf/RefPtr.h"
11 #include <gtest/gtest.h> 11 #include <gtest/gtest.h>
12 12
13 using namespace WebCore; 13 using namespace blink;
14 14
15 namespace { 15 namespace {
16 16
17 // Minimal TestSimpleFontData implementation. 17 // Minimal TestSimpleFontData implementation.
18 // Font has no glyphs, but that's okay. 18 // Font has no glyphs, but that's okay.
19 class TestSimpleFontData : public SimpleFontData { 19 class TestSimpleFontData : public SimpleFontData {
20 public: 20 public:
21 static PassRefPtr<TestSimpleFontData> create() 21 static PassRefPtr<TestSimpleFontData> create()
22 { 22 {
23 return adoptRef(new TestSimpleFontData); 23 return adoptRef(new TestSimpleFontData);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 GlyphBuffer glyphBuffer; 228 GlyphBuffer glyphBuffer;
229 glyphBuffer.add(42, font1.get(), 10); 229 glyphBuffer.add(42, font1.get(), 10);
230 glyphBuffer.add(43, font1.get(), 15); 230 glyphBuffer.add(43, font1.get(), 15);
231 glyphBuffer.add(44, font2.get(), FloatSize(12, 2)); 231 glyphBuffer.add(44, font2.get(), FloatSize(12, 2));
232 232
233 glyphBuffer.expandLastAdvance(20); 233 glyphBuffer.expandLastAdvance(20);
234 EXPECT_EQ(FloatSize(32, 2), glyphBuffer.advanceAt(2)); 234 EXPECT_EQ(FloatSize(32, 2), glyphBuffer.advanceAt(2));
235 } 235 }
236 236
237 } // namespace 237 } // namespace
OLDNEW
« no previous file with comments | « Source/platform/fonts/GlyphBuffer.h ('k') | Source/platform/fonts/GlyphMetricsMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698