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 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |