OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/child/child_process.h" | 10 #include "content/child/child_process.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 scoped_refptr<PPB_ImageData_Impl> image( | 87 scoped_refptr<PPB_ImageData_Impl> image( |
88 new PPB_ImageData_Impl(instance()->pp_instance(), | 88 new PPB_ImageData_Impl(instance()->pp_instance(), |
89 PPB_ImageData_Impl::ForTest())); | 89 PPB_ImageData_Impl::ForTest())); |
90 image->Init(PP_IMAGEDATAFORMAT_BGRA_PREMUL, 640, 360, true); | 90 image->Init(PP_IMAGEDATAFORMAT_BGRA_PREMUL, 640, 360, true); |
91 { | 91 { |
92 base::RunLoop run_loop; | 92 base::RunLoop run_loop; |
93 base::Closure quit_closure = run_loop.QuitClosure(); | 93 base::Closure quit_closure = run_loop.QuitClosure(); |
94 | 94 |
95 EXPECT_CALL(sink, OnVideoFrame()).WillOnce( | 95 EXPECT_CALL(sink, OnVideoFrame()).WillOnce( |
96 RunClosure(quit_closure)); | 96 RunClosure(quit_closure)); |
97 frame_writer->PutFrame(image, 10); | 97 frame_writer->PutFrame(image.get(), 10); |
98 run_loop.Run(); | 98 run_loop.Run(); |
99 } | 99 } |
100 // TODO(perkj): Verify that the track output I420 when | 100 // TODO(perkj): Verify that the track output I420 when |
101 // https://codereview.chromium.org/213423006/ is landed. | 101 // https://codereview.chromium.org/213423006/ is landed. |
102 EXPECT_EQ(1, sink.number_of_frames()); | 102 EXPECT_EQ(1, sink.number_of_frames()); |
103 native_track->RemoveSink(&sink); | 103 native_track->RemoveSink(&sink); |
104 | 104 |
105 // The |frame_writer| is a proxy and is owned by whoever call Open. | 105 // The |frame_writer| is a proxy and is owned by whoever call Open. |
106 delete frame_writer; | 106 delete frame_writer; |
107 } | 107 } |
108 | 108 |
109 } // namespace content | 109 } // namespace content |
OLD | NEW |