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 23 matching lines...) Expand all Loading... |
34 static const std::string kUnknownStreamUrl = "unknown_stream_url"; | 34 static const std::string kUnknownStreamUrl = "unknown_stream_url"; |
35 | 35 |
36 class VideoDestinationHandlerTest : public PpapiUnittest { | 36 class VideoDestinationHandlerTest : public PpapiUnittest { |
37 public: | 37 public: |
38 VideoDestinationHandlerTest() | 38 VideoDestinationHandlerTest() |
39 : child_process_(new ChildProcess()), | 39 : child_process_(new ChildProcess()), |
40 registry_(new MockMediaStreamRegistry()) { | 40 registry_(new MockMediaStreamRegistry()) { |
41 registry_->Init(kTestStreamUrl); | 41 registry_->Init(kTestStreamUrl); |
42 } | 42 } |
43 | 43 |
44 virtual void TearDown() override { | 44 void TearDown() override { |
45 registry_.reset(); | 45 registry_.reset(); |
46 blink::WebHeap::collectAllGarbageForTesting(); | 46 blink::WebHeap::collectAllGarbageForTesting(); |
47 PpapiUnittest::TearDown(); | 47 PpapiUnittest::TearDown(); |
48 } | 48 } |
49 | 49 |
50 base::MessageLoop* io_message_loop() const { | 50 base::MessageLoop* io_message_loop() const { |
51 return child_process_->io_message_loop(); | 51 return child_process_->io_message_loop(); |
52 } | 52 } |
53 | 53 |
54 protected: | 54 protected: |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 base::MessageLoop::current()->RunUntilIdle(); | 107 base::MessageLoop::current()->RunUntilIdle(); |
108 } | 108 } |
109 EXPECT_EQ(1, sink.number_of_frames()); | 109 EXPECT_EQ(1, sink.number_of_frames()); |
110 native_track->RemoveSink(&sink); | 110 native_track->RemoveSink(&sink); |
111 | 111 |
112 // The |frame_writer| is a proxy and is owned by whoever call Open. | 112 // The |frame_writer| is a proxy and is owned by whoever call Open. |
113 delete frame_writer; | 113 delete frame_writer; |
114 } | 114 } |
115 | 115 |
116 } // namespace content | 116 } // namespace content |
OLD | NEW |