Coverage: Fix a bug on iOS platform.

profraw_file_paths is expected to be a list of profraw files, this CL
fixes the bug on iOS platform.

Change-Id: If153fab4b4573e340bbac648b3a366b14cb1e326
Reviewed-on: https://chromium-review.googlesource.com/1069988
Reviewed-by: Abhishek Arya <[email protected]>
Commit-Queue: Abhishek Arya <[email protected]>
Cr-Commit-Position: refs/heads/master@{#561101}
diff --git a/tools/code_coverage/coverage.py b/tools/code_coverage/coverage.py
index d209998..bb292b09 100755
--- a/tools/code_coverage/coverage.py
+++ b/tools/code_coverage/coverage.py
@@ -1007,7 +1007,7 @@
 
       profraw_file_paths = []
       if _IsIOS():
-        profraw_file_paths = _GetProfrawDataFileByParsingOutput(output)
+        profraw_file_paths = [_GetProfrawDataFileByParsingOutput(output)]
       else:
         for file_or_dir in os.listdir(_GetCoverageReportRootDirPath()):
           if file_or_dir.endswith(PROFRAW_FILE_EXTENSION):
@@ -1019,6 +1019,10 @@
           'please make sure the binary exists, is properly instrumented and '
           'does not crash. %s' % (target, FILE_BUG_MESSAGE))
 
+      assert isinstance(profraw_file_paths, list), (
+        'Variable \'profraw_file_paths\' is expected to be of type \'list\', '
+        'but it is a %s. %s' % (type(profraw_file_paths), FILE_BUG_MESSAGE))
+
       try:
         profdata_file_path = _CreateTargetProfDataFileFromProfRawFiles(
             target, profraw_file_paths)