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

Side by Side Diff: content/common/gpu/media/video_decode_accelerator_unittest.cc

Issue 184563006: Move WriteFile and WriteFileDescriptor from file_util to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // The bulk of this file is support code; sorry about that. Here's an overview 5 // The bulk of this file is support code; sorry about that. Here's an overview
6 // to hopefully help readers of this code: 6 // to hopefully help readers of this code:
7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or
8 // Win/EGL. 8 // Win/EGL.
9 // - ClientState is an enum for the state of the decode client used by the test. 9 // - ClientState is an enum for the state of the decode client used by the test.
10 // - ClientStateNotification is a barrier abstraction that allows the test code 10 // - ClientStateNotification is a barrier abstraction that allows the test code
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 kThumbnailsPageSize.width() * 3, 1363 kThumbnailsPageSize.width() * 3,
1364 true, 1364 true,
1365 std::vector<gfx::PNGCodec::Comment>(), 1365 std::vector<gfx::PNGCodec::Comment>(),
1366 &png); 1366 &png);
1367 1367
1368 LOG(ERROR) << "Unknown thumbnails MD5: " << md5_string; 1368 LOG(ERROR) << "Unknown thumbnails MD5: " << md5_string;
1369 1369
1370 base::FilePath filepath(test_video_files_[0]->file_name); 1370 base::FilePath filepath(test_video_files_[0]->file_name);
1371 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".bad_thumbnails")); 1371 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".bad_thumbnails"));
1372 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".png")); 1372 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".png"));
1373 int num_bytes = file_util::WriteFile(filepath, 1373 int num_bytes = base::WriteFile(filepath,
1374 reinterpret_cast<char*>(&png[0]), 1374 reinterpret_cast<char*>(&png[0]),
1375 png.size()); 1375 png.size());
1376 ASSERT_EQ(num_bytes, static_cast<int>(png.size())); 1376 ASSERT_EQ(num_bytes, static_cast<int>(png.size()));
1377 } 1377 }
1378 ASSERT_NE(match, golden_md5s.end()); 1378 ASSERT_NE(match, golden_md5s.end());
1379 EXPECT_EQ(alpha_solid, true) << "RGBA frame had incorrect alpha"; 1379 EXPECT_EQ(alpha_solid, true) << "RGBA frame had incorrect alpha";
1380 } 1380 }
1381 1381
1382 // Output the frame delivery time to file 1382 // Output the frame delivery time to file
1383 // We can only make performance/correctness assertions if the decoder was 1383 // We can only make performance/correctness assertions if the decoder was
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 } 1574 }
1575 if (it->first == "v" || it->first == "vmodule") 1575 if (it->first == "v" || it->first == "vmodule")
1576 continue; 1576 continue;
1577 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; 1577 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second;
1578 } 1578 }
1579 1579
1580 base::ShadowingAtExitManager at_exit_manager; 1580 base::ShadowingAtExitManager at_exit_manager;
1581 1581
1582 return RUN_ALL_TESTS(); 1582 return RUN_ALL_TESTS();
1583 } 1583 }
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_h264_decoder_unittest.cc ('k') | content/common/gpu/media/video_encode_accelerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698