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

Unified Diff: cc/resources/video_resource_updater_unittest.cc

Issue 2395943002: fix highbit video (Closed)
Patch Set: comment added Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/video_resource_updater_unittest.cc
diff --git a/cc/resources/video_resource_updater_unittest.cc b/cc/resources/video_resource_updater_unittest.cc
index 1c414fc548dc2a4a88efcbbdf4bd508b36df38e4..9b9dcfccf9ab60ef7b9df11c429d745bd2b6ce9f 100644
--- a/cc/resources/video_resource_updater_unittest.cc
+++ b/cc/resources/video_resource_updater_unittest.cc
@@ -278,6 +278,16 @@ TEST_F(VideoResourceUpdaterTestWithF16, HighBitFrame) {
VideoFrameExternalResources resources =
updater.CreateExternalResourcesFromVideoFrame(video_frame);
EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources.type);
+ EXPECT_NEAR(resources.multiplier, 2.0, 0.1);
+ EXPECT_NEAR(resources.offset, 0.5, 0.1);
+
+ // Create the resource again, to test the path where the
+ // resources are cached.
+ VideoFrameExternalResources resources2 =
+ updater.CreateExternalResourcesFromVideoFrame(video_frame);
+ EXPECT_EQ(VideoFrameExternalResources::YUV_RESOURCE, resources2.type);
+ EXPECT_NEAR(resources2.multiplier, 2.0, 0.1);
+ EXPECT_NEAR(resources2.offset, 0.5, 0.1);
}
TEST_F(VideoResourceUpdaterTest, HighBitFrameSoftwareCompositor) {
« no previous file with comments | « cc/resources/video_resource_updater.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698