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

Unified Diff: media/filters/video_renderer_algorithm_unittest.cc

Issue 1409123005: Add methods for telling V8 how much memory audio/video is using. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix html viewer. Created 5 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 | « media/filters/video_renderer_algorithm.cc ('k') | media/renderers/audio_renderer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_renderer_algorithm_unittest.cc
diff --git a/media/filters/video_renderer_algorithm_unittest.cc b/media/filters/video_renderer_algorithm_unittest.cc
index e8b82f2bc3138c73d2474c0684a88179783723fa..8a4930966e537598ffc7e647d24ecf40613dc0ea 100644
--- a/media/filters/video_renderer_algorithm_unittest.cc
+++ b/media/filters/video_renderer_algorithm_unittest.cc
@@ -570,6 +570,7 @@ TEST_F(VideoRendererAlgorithmTest, EffectiveFramesQueuedWithoutCadence) {
algorithm_.EnqueueFrame(CreateFrame(tg.interval(3)));
EXPECT_EQ(4u, algorithm_.EffectiveFramesQueued());
EXPECT_EQ(4u, frames_queued());
+ EXPECT_EQ(384, algorithm_.GetMemoryUsage());
// Issue a render call that should drop the first two frames and mark the 3rd
// as consumed.
@@ -582,6 +583,7 @@ TEST_F(VideoRendererAlgorithmTest, EffectiveFramesQueuedWithoutCadence) {
EXPECT_EQ(tg.interval(2), frame->timestamp());
EXPECT_EQ(1u, algorithm_.EffectiveFramesQueued());
EXPECT_EQ(2u, frames_queued());
+ EXPECT_EQ(192, algorithm_.GetMemoryUsage());
// Rendering one more frame should return 0 effective frames queued.
frame = RenderAndStep(&tg, &frames_dropped);
@@ -591,6 +593,7 @@ TEST_F(VideoRendererAlgorithmTest, EffectiveFramesQueuedWithoutCadence) {
EXPECT_EQ(tg.interval(3), frame->timestamp());
EXPECT_EQ(0u, algorithm_.EffectiveFramesQueued());
EXPECT_EQ(1u, frames_queued());
+ EXPECT_EQ(96, algorithm_.GetMemoryUsage());
}
// The maximum acceptable drift should be updated once we have two frames.
« no previous file with comments | « media/filters/video_renderer_algorithm.cc ('k') | media/renderers/audio_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698