Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-platform-abstraction.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 #include "test-platform-abstraction.h"
18 #include "dali-test-suite-utils.h"
19 #include <dali/integration-api/bitmap.h>
20
21 namespace Dali
22 {
23
24 /**
25  * Constructor
26  */
27 TestPlatformAbstraction::TestPlatformAbstraction()
28 : mRequest(0)
29 {
30   Initialize();
31 }
32
33 /**
34  * Destructor
35  */
36 TestPlatformAbstraction::~TestPlatformAbstraction()
37 {
38 }
39
40 /**
41  * @copydoc PlatformAbstraction::GetTimeMicroseconds()
42  */
43 void TestPlatformAbstraction::GetTimeMicroseconds(unsigned int &seconds, unsigned int &microSeconds)
44 {
45   seconds = mSeconds;
46   microSeconds = mMicroSeconds;
47   mTrace.PushCall("GetTimeMicroseconds", "");
48 }
49
50 /**
51  * @copydoc PlatformAbstraction::Suspend()
52  */
53 void TestPlatformAbstraction::Suspend()
54 {
55   mTrace.PushCall("Suspend", "");
56 }
57
58 /**
59  * @copydoc PlatformAbstraction::Resume()
60  */
61 void TestPlatformAbstraction::Resume()
62 {
63   mTrace.PushCall("Resume", "");
64 }
65
66 void TestPlatformAbstraction::GetClosestImageSize( const std::string& filename,
67                                                    const ImageAttributes& attributes,
68                                                    Vector2& closestSize)
69 {
70   closestSize = mClosestSize;
71   mTrace.PushCall("GetClosestImageSize", "");
72 }
73
74 void TestPlatformAbstraction::GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
75                                                    const ImageAttributes& attributes,
76                                                    Vector2& closestSize)
77 {
78   closestSize = mClosestSize;
79   mTrace.PushCall("GetClosestImageSize", "");
80 }
81
82
83 /**
84  * @copydoc PlatformAbstraction::LoadResource()
85  */
86 void TestPlatformAbstraction::LoadResource(const Integration::ResourceRequest& request)
87 {
88   mTrace.PushCall("LoadResource", "");
89   if(mRequest != NULL)
90   {
91     delete mRequest;
92     tet_infoline ("Warning: multiple resource requests not handled by Test Suite. You may see unexpected errors");
93   }
94   mRequest = new Integration::ResourceRequest(request);
95 }
96
97 Integration::ResourcePointer TestPlatformAbstraction::LoadResourceSynchronously( const Integration::ResourceType& resourceType, const std::string& resourcePath )
98 {
99   mTrace.PushCall("LoadResourceSynchronously", "");
100   return mResources.loadedResource;
101 }
102
103 /**
104  * @copydoc PlatformAbstraction::SaveResource()
105  */
106 void TestPlatformAbstraction::SaveResource(const Integration::ResourceRequest& request)
107 {
108   mTrace.PushCall("SaveResource", "");
109   if(mRequest != NULL)
110   {
111     delete mRequest;
112     tet_infoline ("Warning: multiple resource requests not handled by Test Suite. You may see unexpected errors");
113   }
114   mRequest = new Integration::ResourceRequest(request);
115 }
116
117 /**
118  * @copydoc PlatformAbstraction::CancelLoad()
119  */
120 void TestPlatformAbstraction::CancelLoad(Integration::ResourceId id, Integration::ResourceTypeId typeId)
121 {
122   mTrace.PushCall("CancelLoad", "");
123 }
124
125 /**
126  * @copydoc PlatformAbstraction::GetResources()
127  */
128 void TestPlatformAbstraction::GetResources(Integration::ResourceCache& cache)
129 {
130   mTrace.PushCall("GetResources", "");
131
132   if(mResources.loaded)
133   {
134     cache.LoadResponse( mResources.loadedId, mResources.loadedType, mResources.loadedResource, Integration::RESOURCE_COMPLETELY_LOADED );
135   }
136   if(mResources.loadFailed)
137   {
138     cache.LoadFailed( mResources.loadFailedId, mResources.loadFailure );
139   }
140   if(mResources.saved)
141   {
142     cache.SaveComplete( mResources.savedId, mResources.savedType );
143   }
144   if(mResources.saveFailed)
145   {
146     cache.SaveFailed( mResources.saveFailedId, mResources.saveFailure );
147   }
148 }
149
150 /**
151  * @copydoc PlatformAbstraction::IsLoading()
152  */
153 bool TestPlatformAbstraction::IsLoading()
154 {
155   mTrace.PushCall("IsLoading", "");
156   return mIsLoadingResult;
157 }
158
159 /**
160  * @copydoc PlatformAbstraction::GetDefaultFontFamily()
161  */
162 std::string TestPlatformAbstraction::GetDefaultFontFamily() const
163 {
164   mTrace.PushCall("GetDefaultFontFamily", "");
165   return mGetDefaultFontFamilyResult;
166 }
167
168 /**
169  * @copydoc PlatformAbstraction::GetDefaultFontSize()
170  */
171 const float TestPlatformAbstraction::GetDefaultFontSize() const
172 {
173   mTrace.PushCall("GetDefaultFontSize", "");
174   return mGetDefaultFontSizeResult;
175 }
176
177 const PixelSize TestPlatformAbstraction::GetFontLineHeightFromCapsHeight(const std::string& fontFamily, const std::string& fontStyle, const CapsHeight& capsHeight) const
178 {
179   mTrace.PushCall("GetFontLineHeightFromCapsHeight", "");
180   // LineHeight will be bigger than CapsHeight, so return capsHeight + 1
181   return PixelSize(capsHeight + 1);
182 }
183
184 /**
185  * @copydoc PlatformAbstraction::GetGlyphData()
186  */
187
188 Integration::GlyphSet* TestPlatformAbstraction::GetGlyphData ( const Integration::TextResourceType& textRequest,
189                                                                const std::string& fontFamily,
190                                                                bool getBitmap) const
191 {
192   if( getBitmap )
193   {
194     mTrace.PushCall("GetGlyphData", "getBitmap:true");
195   }
196   else
197   {
198     mTrace.PushCall("GetGlyphData", "getBitmap:false");
199   }
200
201   // It creates fake metrics for the received characters.
202
203   Integration::GlyphSet* set = new Dali::Integration::GlyphSet();
204   Integration::BitmapPtr bitmapData;
205
206   std::set<uint32_t> characters;
207
208   for( Integration::TextResourceType::CharacterList::const_iterator it = textRequest.mCharacterList.begin(), endIt = textRequest.mCharacterList.end(); it != endIt; ++it )
209   {
210     if( characters.find( it->character ) == characters.end() )
211     {
212       characters.insert( it->character );
213       Integration::GlyphMetrics character = {it->character, Integration::GlyphMetrics::LOW_QUALITY,  10.0f,  10.0f, 9.0f, 1.0f, 10.0f, it->xPosition, it->yPosition };
214
215       if( getBitmap )
216       {
217         bitmapData = Integration::Bitmap::New(Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, true);
218         bitmapData->GetPackedPixelsProfile()->ReserveBuffer(Pixel::A8, 64, 64);
219         PixelBuffer* pixelBuffer = bitmapData->GetBuffer();
220         memset( pixelBuffer, it->character, 64*64 );
221       }
222
223       set->AddCharacter(bitmapData, character);
224     }
225   }
226
227   set->mLineHeight = 10.0f;
228   set->mAscender = 9.0f;
229   set->mUnitsPerEM = 2048.0f/64.0f;
230   set->SetAtlasResourceId( textRequest.mTextureAtlasId );
231   set->mFontHash = textRequest.mFontHash;
232
233   return set;
234 }
235
236 /**
237  * @copydoc PlatformAbstraction::GetCachedGlyphData()
238  */
239
240 Integration::GlyphSet* TestPlatformAbstraction::GetCachedGlyphData( const Integration::TextResourceType& textRequest,
241                                                                     const std::string& fontFamily ) const
242 {
243   mTrace.PushCall("GetCachedGlyphData", "");
244
245   // It creates fake metrics and bitmap for received numeric characters '0' through '9'.
246   Integration::GlyphSet* set = new Dali::Integration::GlyphSet();
247   Integration::BitmapPtr bitmapData;
248
249   std::set<uint32_t> characters;
250
251   for( Integration::TextResourceType::CharacterList::const_iterator it = textRequest.mCharacterList.begin(), endIt = textRequest.mCharacterList.end(); it != endIt; ++it )
252   {
253     if( it->character >= '0' && it->character <= '9' && characters.find( it->character ) == characters.end() )
254     {
255       characters.insert( it->character );
256       Integration::GlyphMetrics character = {it->character, Integration::GlyphMetrics::HIGH_QUALITY,  10.0f,  10.0f, 9.0f, 1.0f, 10.0f, it->xPosition, it->yPosition };
257
258       bitmapData = Integration::Bitmap::New(Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, true);
259       bitmapData->GetPackedPixelsProfile()->ReserveBuffer(Pixel::A8, 64, 64);
260       PixelBuffer* pixelBuffer = bitmapData->GetBuffer();
261       memset( pixelBuffer, it->character, 64*64 );
262       set->AddCharacter(bitmapData, character);
263     }
264   }
265
266   set->mLineHeight = 10.0f;
267   set->mAscender = 9.0f;
268   set->mUnitsPerEM = 2048.0f/64.0f;
269   set->SetAtlasResourceId( textRequest.mTextureAtlasId );
270   set->mFontHash = textRequest.mFontHash;
271
272   return set;
273 }
274
275
276 /**
277  * @copydoc PlatformAbstraction::GetGlobalMetrics()
278  */
279 void TestPlatformAbstraction::GetGlobalMetrics( const std::string& fontFamily,
280                                                 const std::string& fontStyle,
281                                                 Integration::GlobalMetrics& globalMetrics ) const
282 {
283   globalMetrics.lineHeight = 10.0f;
284   globalMetrics.ascender = 9.0f;
285   globalMetrics.unitsPerEM = 2048.0f/64.0f;
286   globalMetrics.underlineThickness = 2.f;
287   globalMetrics.underlinePosition = 1.f;
288 }
289
290 /**
291  * @copydoc PlatformAbstraction::GetFontPath()
292  */
293 std::string TestPlatformAbstraction::GetFontPath(const std::string& family, bool bold, bool italic) const
294 {
295   mTrace.PushCall("GetFontPath", "");
296   return mGetFontPathResult;
297
298   // Do nothing with arguments
299 }
300
301 /**
302  * @copydoc PlatformAbstraction::SetDpi()
303  */
304 void TestPlatformAbstraction::SetDpi (unsigned int dpiHorizontal, unsigned int dpiVertical)
305 {
306   mTrace.PushCall("SetDpi", "");
307 }
308
309 /**
310  * @copydoc PlatformAbstraction::GetFontFamilyForChars()
311  */
312 std::string TestPlatformAbstraction::GetFontFamilyForChars(const TextArray& charsRequested) const
313 {
314   mTrace.PushCall("GetFontFamilyForChars", "");
315   return mGetDefaultFontFamilyResult;
316 }
317
318 /**
319  * @copydoc PlatformAbstraction::AllGlyphsSupported()
320  */
321 bool TestPlatformAbstraction::AllGlyphsSupported(const std::string& name, const std::string& fontStyle, const TextArray& text) const
322 {
323   mTrace.PushCall("AllGlyphsSupported", "");
324   return true;
325 }
326
327 /**
328  * @copydoc PlatformAbstraction::ValidateFontFamilyName()
329  */
330 bool TestPlatformAbstraction::ValidateFontFamilyName(const std::string& fontFamily, const std::string& fontStyle, bool& isDefaultSystemFont, std::string& closestMatch, std::string& closestStyleMatch) const
331 {
332   mTrace.PushCall("ValidateFontFamilyName", "");
333   return true;
334 }
335
336 /**
337  * @copydoc PlatformAbstraction::GetFontList()
338  */
339 std::vector<std::string> TestPlatformAbstraction::GetFontList( PlatformAbstraction::FontListMode mode ) const
340 {
341   mFontListMode = mode;
342   mTrace.PushCall("ValidateGetFontList", "");
343   std::vector<std::string> fontList;
344   return fontList;
345 }
346
347 /**
348  * @copydoc PlatformAbstraction::LoadFile()
349  */
350 bool TestPlatformAbstraction::LoadFile( const std::string& filename, std::vector< unsigned char >& buffer ) const
351 {
352   mTrace.PushCall("LoadFile", "");
353   if( mLoadFileResult.loadResult )
354   {
355     buffer = mLoadFileResult.buffer;
356   }
357
358   return mLoadFileResult.loadResult;
359 }
360
361 /**
362  * @copydoc PlatformAbstraction::SaveFile()
363  */
364 bool TestPlatformAbstraction::SaveFile(const std::string& filename, std::vector< unsigned char >& buffer) const
365 {
366   mTrace.PushCall("SaveFile", "");
367   return false;
368 }
369
370 void TestPlatformAbstraction::JoinLoaderThreads()
371 {
372   mTrace.PushCall("JoinLoaderThreads", "");
373 }
374
375 void TestPlatformAbstraction::UpdateDefaultsFromDevice()
376 {
377   mTrace.PushCall("UpdateDefaultsFromDevice", "");
378   mGetDefaultFontFamilyResult+=1.0f;
379 }
380
381 Integration::DynamicsFactory* TestPlatformAbstraction::GetDynamicsFactory()
382 {
383   mTrace.PushCall("GetDynamicsFactory", "");
384   return NULL;
385 }
386
387 bool TestPlatformAbstraction::ReadGlobalMetricsFromCache( const std::string& fontFamily,
388                                                           const std::string& fontStyle,
389                                                           Integration::GlobalMetrics& globalMetrics )
390 {
391   mTrace.PushCall("ReadGlobalMetricsFromCacheFile", "");
392   globalMetrics = mReadGlobalMetrics; // Want to copy contents...
393   return mReadGlobalMetricsResult; // Default false (will be set to true on subsequent write)
394 }
395
396 void TestPlatformAbstraction::WriteGlobalMetricsToCache( const std::string& fontFamily,
397                                                          const std::string& fontStyle,
398                                                          const Integration::GlobalMetrics& globalMetrics )
399 {
400   // Copy so next read uses written values. TODO: Could add method
401   // to turn this behaviour off for more extensive testing.
402   mReadGlobalMetrics = globalMetrics;
403   mReadGlobalMetricsResult = true;
404
405   mTrace.PushCall("WriteGlobalMetricsToCacheFile", "");
406 }
407
408 bool TestPlatformAbstraction::ReadMetricsFromCache( const std::string& fontFamily,
409                                                     const std::string& fontStyle,
410                                                     std::vector<Integration::GlyphMetrics>& glyphMetricsContainer )
411 {
412   mTrace.PushCall("ReadMetricsFromCacheFile", "");
413   glyphMetricsContainer = mReadMetrics;
414   return mReadMetricsResult; // Default false (will be set to true on subsequent write)
415 }
416
417 void TestPlatformAbstraction::WriteMetricsToCache( const std::string& fontFamily,
418                                                    const std::string& fontStyle,
419                                                    const Integration::GlyphSet& glyphSet )
420 {
421   // Copy so next read uses written values. TODO: Could add method
422   // to turn this behaviour off for more extensive testing.
423   const Integration::GlyphSet::CharacterList& charList =  glyphSet.GetCharacterList();
424   mReadMetrics.clear();
425   for(std::size_t i=0, end=charList.size(); i<end; ++i)
426   {
427     mReadMetrics.push_back(charList[i].second);
428   }
429   mReadMetricsResult = true;
430
431   mTrace.PushCall("WriteMetricsToCacheFile", "");
432 }
433
434
435 void TestPlatformAbstraction::GetFileNamesFromDirectory( const std::string& directoryName,
436                                                          std::vector<std::string>& fileNames )
437 {
438   fileNames.push_back( std::string( "u1f004.png" ) );
439   fileNames.push_back( std::string( "u1f0cf.png" ) );
440   fileNames.push_back( std::string( "u1f170.png" ) );
441   fileNames.push_back( std::string( "u1f601.png" ) );
442 }
443
444
445 Integration::BitmapPtr TestPlatformAbstraction::GetGlyphImage( const std::string& fontFamily, const std::string& fontStyle, float fontSize, uint32_t character ) const
446 {
447   Integration::BitmapPtr image = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, true );
448   image->GetPackedPixelsProfile()->ReserveBuffer( Pixel::RGBA8888, 1, 1 );
449
450   mTrace.PushCall("GetGlyphImage", "");
451
452   return image;
453 }
454
455
456 /** Call this every test */
457 void TestPlatformAbstraction::Initialize()
458 {
459   mTrace.Reset();
460   mTrace.Enable(true);
461   memset(&mResources, 0, sizeof(Resources));
462   memset(&mReadGlobalMetrics, 0, sizeof(Integration::GlobalMetrics));
463   mSeconds=0;
464   mMicroSeconds=0;
465   mIsLoadingResult=false;
466   mGetDefaultFontFamilyResult = "HelveticaNeue";
467   mGetDefaultFontSizeResult=12.0f;
468   mGetFontPathResult="helvetica-12";
469   mReadMetricsResult=false;
470   mReadGlobalMetricsResult=false;
471
472   if(mRequest)
473   {
474     delete mRequest;
475     mRequest = 0;
476   }
477 }
478
479
480 bool TestPlatformAbstraction::WasCalled(TestFuncEnum func)
481 {
482   switch(func)
483   {
484     case GetTimeMicrosecondsFunc:             return mTrace.FindMethod("GetTimeMicroseconds");
485     case SuspendFunc:                         return mTrace.FindMethod("Suspend");
486     case ResumeFunc:                          return mTrace.FindMethod("Resume");
487     case LoadResourceFunc:                    return mTrace.FindMethod("LoadResource");
488     case SaveResourceFunc:                    return mTrace.FindMethod("SaveResource");
489     case LoadFileFunc:                        return mTrace.FindMethod("LoadFile");
490     case SaveFileFunc:                        return mTrace.FindMethod("SaveFile");
491     case CancelLoadFunc:                      return mTrace.FindMethod("CancelLoad");
492     case GetResourcesFunc:                    return mTrace.FindMethod("GetResources");
493     case IsLoadingFunc:                       return mTrace.FindMethod("IsLoading");
494     case GetDefaultFontFamilyFunc:            return mTrace.FindMethod("GetDefaultFontFamily");
495     case GetDefaultFontSizeFunc:              return mTrace.FindMethod("GetDefaultFontSize");
496     case GetFontLineHeightFromCapsHeightFunc: return mTrace.FindMethod("GetFontLineHeightFromCapsHeight");
497     case GetGlyphDataFunc:                    return mTrace.FindMethod("GetGlyphData");
498     case GetCachedGlyphDataFunc:              return mTrace.FindMethod("GetCachedGlyphData");
499     case GetFontPathFunc:                     return mTrace.FindMethod("GetFontPath");
500     case SetDpiFunc:                          return mTrace.FindMethod("SetDpi");
501     case JoinLoaderThreadsFunc:               return mTrace.FindMethod("JoinLoaderThreads");
502     case GetFontFamilyForCharsFunc:           return mTrace.FindMethod("GetFontFamilyForChars");
503     case AllGlyphsSupportedFunc:              return mTrace.FindMethod("AllGlyphsSupported");
504     case ValidateFontFamilyNameFunc:          return mTrace.FindMethod("ValidateFontFamilyName");
505     case UpdateDefaultsFromDeviceFunc:        return mTrace.FindMethod("UpdateDefaultsFromDevice");
506     case GetDynamicsFactoryFunc:              return mTrace.FindMethod("GetDynamicsFactory");
507     case ValidateGetFontListFunc:             return mTrace.FindMethod("ValidateGetFontList");
508     case ReadGlobalMetricsFromCacheFileFunc:  return mTrace.FindMethod("ReadGlobalMetricsFromCacheFile");
509     case WriteGlobalMetricsToCacheFileFunc:   return mTrace.FindMethod("WriteGlobalMetricsToCacheFile");
510     case ReadMetricsFromCacheFileFunc:        return mTrace.FindMethod("ReadMetricsFromCacheFile");
511     case WriteMetricsToCacheFileFunc:         return mTrace.FindMethod("WriteMetricsToCacheFile");
512   }
513   return false;
514 }
515
516 void TestPlatformAbstraction::SetGetTimeMicrosecondsResult(size_t sec, size_t usec)
517 {
518   mSeconds = sec;
519   mMicroSeconds = usec;
520 }
521
522 void TestPlatformAbstraction::IncrementGetTimeResult(size_t milliseconds)
523 {
524   mMicroSeconds += milliseconds * 1000u;
525   unsigned int additionalSeconds = mMicroSeconds / 1000000u;
526
527   mSeconds += additionalSeconds;
528   mMicroSeconds -= additionalSeconds * 1000000u;
529 }
530
531 void TestPlatformAbstraction::SetIsLoadingResult(bool result)
532 {
533   mIsLoadingResult = result;
534 }
535
536 void TestPlatformAbstraction::SetGetDefaultFontFamilyResult(std::string result)
537 {
538   mGetDefaultFontFamilyResult = result;
539 }
540
541 void TestPlatformAbstraction::SetGetDefaultFontSizeResult(float result)
542 {
543   mGetDefaultFontSizeResult = result;
544 }
545
546 void TestPlatformAbstraction::SetGetFontPathResult(std::string& result)
547 {
548   mGetFontPathResult = result;
549 }
550
551 void TestPlatformAbstraction::ClearReadyResources()
552 {
553   memset(&mResources, 0, sizeof(Resources));
554 }
555
556 void TestPlatformAbstraction::SetResourceLoaded(Integration::ResourceId  loadedId,
557                                                 Integration::ResourceTypeId  loadedType,
558                                                 Integration::ResourcePointer loadedResource)
559 {
560   mResources.loaded = true;
561   mResources.loadedId = loadedId;
562   mResources.loadedType = loadedType;
563   mResources.loadedResource = loadedResource;
564 }
565
566 void TestPlatformAbstraction::SetResourceLoadFailed(Integration::ResourceId  id,
567                                                     Integration::ResourceFailure failure)
568 {
569   mResources.loadFailed = true;
570   mResources.loadFailedId = id;
571   mResources.loadFailure = failure;
572 }
573
574 void TestPlatformAbstraction::SetResourceSaved(Integration::ResourceId      savedId,
575                                                Integration::ResourceTypeId  savedType)
576 {
577   mResources.saved = true;
578   mResources.savedId = savedId;
579   mResources.savedType = savedType;
580 }
581
582 void TestPlatformAbstraction::SetResourceSaveFailed(Integration::ResourceId  id,
583                                                     Integration::ResourceFailure failure)
584 {
585   mResources.saveFailed = true;
586   mResources.saveFailedId = id;
587   mResources.saveFailure = failure;
588 }
589
590 Integration::ResourceRequest* TestPlatformAbstraction::GetRequest()
591 {
592   return mRequest;
593 }
594
595 void TestPlatformAbstraction::DiscardRequest()
596 {
597   delete mRequest;
598   mRequest = NULL;
599 }
600
601 void TestPlatformAbstraction::SetClosestImageSize(const Vector2& size)
602 {
603   mClosestSize = size;
604 }
605
606 void TestPlatformAbstraction::SetLoadFileResult( bool result, std::vector< unsigned char >& buffer )
607 {
608   mLoadFileResult.loadResult = result;
609   if( result )
610   {
611     mLoadFileResult.buffer = buffer;
612   }
613 }
614
615 void TestPlatformAbstraction::SetSaveFileResult( bool result )
616 {
617   mSaveFileResult = result;
618 }
619
620 Integration::PlatformAbstraction::FontListMode TestPlatformAbstraction::GetLastFontListMode( )
621 {
622   return mFontListMode;
623 }
624
625 void TestPlatformAbstraction::SetReadGlobalMetricsResult( bool success, Integration::GlobalMetrics& globalMetrics )
626 {
627   mReadGlobalMetricsResult = success;
628   mReadGlobalMetrics = globalMetrics;
629 }
630
631 void TestPlatformAbstraction::SetReadMetricsResult( bool success, std::vector<Integration::GlyphMetrics>& glyphMetricsContainer )
632 {
633   mReadMetricsResult = success;
634   mReadMetrics = glyphMetricsContainer; // copy
635 }
636
637 } // namespace Dali