OLD | NEW |
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 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 kThumbnailsPageSize.width() * 3, | 1367 kThumbnailsPageSize.width() * 3, |
1368 true, | 1368 true, |
1369 std::vector<gfx::PNGCodec::Comment>(), | 1369 std::vector<gfx::PNGCodec::Comment>(), |
1370 &png); | 1370 &png); |
1371 | 1371 |
1372 LOG(ERROR) << "Unknown thumbnails MD5: " << md5_string; | 1372 LOG(ERROR) << "Unknown thumbnails MD5: " << md5_string; |
1373 | 1373 |
1374 base::FilePath filepath(test_video_files_[0]->file_name); | 1374 base::FilePath filepath(test_video_files_[0]->file_name); |
1375 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".bad_thumbnails")); | 1375 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".bad_thumbnails")); |
1376 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".png")); | 1376 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".png")); |
1377 int num_bytes = file_util::WriteFile(filepath, | 1377 int num_bytes = base::WriteFile(filepath, |
1378 reinterpret_cast<char*>(&png[0]), | 1378 reinterpret_cast<char*>(&png[0]), |
1379 png.size()); | 1379 png.size()); |
1380 ASSERT_EQ(num_bytes, static_cast<int>(png.size())); | 1380 ASSERT_EQ(num_bytes, static_cast<int>(png.size())); |
1381 } | 1381 } |
1382 ASSERT_NE(match, golden_md5s.end()); | 1382 ASSERT_NE(match, golden_md5s.end()); |
1383 EXPECT_EQ(alpha_solid, true) << "RGBA frame had incorrect alpha"; | 1383 EXPECT_EQ(alpha_solid, true) << "RGBA frame had incorrect alpha"; |
1384 } | 1384 } |
1385 | 1385 |
1386 // Output the frame delivery time to file | 1386 // Output the frame delivery time to file |
1387 // We can only make performance/correctness assertions if the decoder was | 1387 // We can only make performance/correctness assertions if the decoder was |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1581 } | 1581 } |
1582 if (it->first == "v" || it->first == "vmodule") | 1582 if (it->first == "v" || it->first == "vmodule") |
1583 continue; | 1583 continue; |
1584 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 1584 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
1585 } | 1585 } |
1586 | 1586 |
1587 base::ShadowingAtExitManager at_exit_manager; | 1587 base::ShadowingAtExitManager at_exit_manager; |
1588 | 1588 |
1589 return RUN_ALL_TESTS(); | 1589 return RUN_ALL_TESTS(); |
1590 } | 1590 } |
OLD | NEW |