media/gpu/test: Fix video decoder thumbnail test writing to wrong path.

This CL fixes a bug causing the video decoder thumbnail test to write the
thumbnails image to the wrong path. When calling MakeAbsoluteFilePath() on a
non-existing folder the path will always resolve to the current working
directory. To fix this we need to first create the path before resolving it.

This CL will also print the path of the output file, making it easier to locate.

TEST=./video_decode_accelerator_tests on eve

BUG=964168

Change-Id: I0f8a0c2eef1c26097bfd5072a303b7db149ac06f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1695326
Commit-Queue: David Staessens <dstaessens@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676786}
diff --git a/media/gpu/test/video_player/frame_renderer_thumbnail.cc b/media/gpu/test/video_player/frame_renderer_thumbnail.cc
index 9e45dc7..c6edff93 100644
--- a/media/gpu/test/video_player/frame_renderer_thumbnail.cc
+++ b/media/gpu/test/video_player/frame_renderer_thumbnail.cc
@@ -119,10 +119,8 @@
 std::unique_ptr<FrameRendererThumbnail> FrameRendererThumbnail::Create(
     const std::vector<std::string> thumbnail_checksums,
     const base::FilePath& output_folder) {
-  base::FilePath resolved_output_folder =
-      base::MakeAbsoluteFilePath(output_folder);
   auto frame_renderer = base::WrapUnique(
-      new FrameRendererThumbnail(thumbnail_checksums, resolved_output_folder));
+      new FrameRendererThumbnail(thumbnail_checksums, output_folder));
   frame_renderer->Initialize();
   return frame_renderer;
 }
@@ -235,7 +233,10 @@
                         kThumbnailsPageSize, kThumbnailsPageSize.width() * 4,
                         true, std::vector<gfx::PNGCodec::Comment>(), &png);
 
-  base::FilePath filepath = output_folder_.Append(kThumbnailFilename);
+  base::FilePath filepath =
+      base::MakeAbsoluteFilePath(output_folder_).Append(kThumbnailFilename);
+  LOG(INFO) << "Saving thumbnails image to " << filepath;
+
   base::File thumbnail_file(
       filepath, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
   int num_bytes =