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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/GlyphPageTreeNodeTest.cpp

Issue 2432883002: Replaced PassRefPtr copies with moves in unit tests. (Closed)
Patch Set: Created 4 years, 2 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 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 "platform/fonts/GlyphPageTreeNode.h" 5 #include "platform/fonts/GlyphPageTreeNode.h"
6 6
7 #include "platform/fonts/SegmentedFontData.h" 7 #include "platform/fonts/SegmentedFontData.h"
8 #include "platform/fonts/SimpleFontData.h" 8 #include "platform/fonts/SimpleFontData.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 21 matching lines...) Expand all
32 static PassRefPtr<TestSimpleFontData> createUnloaded(UChar32 from, 32 static PassRefPtr<TestSimpleFontData> createUnloaded(UChar32 from,
33 UChar32 to) { 33 UChar32 to) {
34 return adoptRef( 34 return adoptRef(
35 new TestSimpleFontData(TestCustomFontData::create(), from, to)); 35 new TestSimpleFontData(TestCustomFontData::create(), from, to));
36 } 36 }
37 37
38 private: 38 private:
39 TestSimpleFontData(PassRefPtr<CustomFontData> customData, 39 TestSimpleFontData(PassRefPtr<CustomFontData> customData,
40 UChar32 from, 40 UChar32 from,
41 UChar32 to) 41 UChar32 to)
42 : SimpleFontData(customData, 10, false, false), m_from(from), m_to(to) {} 42 : SimpleFontData(std::move(customData), 10, false, false),
43 m_from(from),
44 m_to(to) {}
43 45
44 bool fillGlyphPage(GlyphPage* pageToFill, 46 bool fillGlyphPage(GlyphPage* pageToFill,
45 unsigned offset, 47 unsigned offset,
46 unsigned length, 48 unsigned length,
47 UChar* buffer, 49 UChar* buffer,
48 unsigned bufferLength) const override { 50 unsigned bufferLength) const override {
49 const Glyph kGlyph = 1; 51 const Glyph kGlyph = 1;
50 String bufferString(buffer, bufferLength); 52 String bufferString(buffer, bufferLength);
51 unsigned bufferIndex = 0; 53 unsigned bufferIndex = 0;
52 bool hasGlyphs = false; 54 bool hasGlyphs = false;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 EXPECT_NE(commonPage, latinPage); 281 EXPECT_NE(commonPage, latinPage);
280 EXPECT_NE(commonPage, simplifiedChinesePage); 282 EXPECT_NE(commonPage, simplifiedChinesePage);
281 EXPECT_NE(commonPage, traditionalChinesePage); 283 EXPECT_NE(commonPage, traditionalChinesePage);
282 EXPECT_NE(simplifiedChinesePage, traditionalChinesePage); 284 EXPECT_NE(simplifiedChinesePage, traditionalChinesePage);
283 EXPECT_NE(commonPage, japanesePage); 285 EXPECT_NE(commonPage, japanesePage);
284 EXPECT_NE(japanesePage, simplifiedChinesePage); 286 EXPECT_NE(japanesePage, simplifiedChinesePage);
285 EXPECT_NE(japanesePage, traditionalChinesePage); 287 EXPECT_NE(japanesePage, traditionalChinesePage);
286 } 288 }
287 289
288 } // namespace blink 290 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698