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

Unified Diff: content/renderer/media/rtc_peer_connection_handler_unittest.cc

Issue 1439973006: Reland Fix leak of RTCPeerConnectionHandler if PeerConnection.close() is called from js.… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bug and add expectation. Created 5 years, 1 month 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 | « content/renderer/media/rtc_peer_connection_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_peer_connection_handler_unittest.cc
diff --git a/content/renderer/media/rtc_peer_connection_handler_unittest.cc b/content/renderer/media/rtc_peer_connection_handler_unittest.cc
index 6cbdd1db986c06622a30e80969fa77bfff3495d4..e2867d14beaa6680af90a01375d58da84af32d54 100644
--- a/content/renderer/media/rtc_peer_connection_handler_unittest.cc
+++ b/content/renderer/media/rtc_peer_connection_handler_unittest.cc
@@ -231,6 +231,7 @@ class RTCPeerConnectionHandlerTest : public ::testing::Test {
mock_peer_connection_ = pc_handler_->native_peer_connection();
ASSERT_TRUE(mock_peer_connection_);
+ EXPECT_CALL(*mock_peer_connection_, Close());
}
void TearDown() override {
@@ -334,6 +335,11 @@ TEST_F(RTCPeerConnectionHandlerTest, Destruct) {
pc_handler_.reset(NULL);
}
+TEST_F(RTCPeerConnectionHandlerTest, DestructAllHandlers) {
+ EXPECT_CALL(*mock_client_.get(), releasePeerConnectionHandler())
+ .Times(1);
+ RTCPeerConnectionHandler::DestructAllHandlers();
+}
TEST_F(RTCPeerConnectionHandlerTest, CreateOffer) {
blink::WebRTCSessionDescriptionRequest request;
blink::WebMediaConstraints options;
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698