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

Side by Side Diff: ppapi/tests/test_transport.cc

Issue 8982006: Add GetLiveVars to PPB_Testing_Dev. Fix leaks it uncovered. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ppapi/tests/test_transport.h" 5 #include "ppapi/tests/test_transport.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } // namespace 98 } // namespace
99 99
100 TestTransport::~TestTransport() { 100 TestTransport::~TestTransport() {
101 delete transport1_; 101 delete transport1_;
102 delete transport2_; 102 delete transport2_;
103 } 103 }
104 104
105 bool TestTransport::Init() { 105 bool TestTransport::Init() {
106 transport_interface_ = static_cast<const PPB_Transport_Dev*>( 106 transport_interface_ = static_cast<const PPB_Transport_Dev*>(
107 pp::Module::Get()->GetBrowserInterface(PPB_TRANSPORT_DEV_INTERFACE)); 107 pp::Module::Get()->GetBrowserInterface(PPB_TRANSPORT_DEV_INTERFACE));
108 return transport_interface_ && InitTestingInterface(); 108 return transport_interface_ && CheckTestingInterface();
109 } 109 }
110 110
111 void TestTransport::RunTests(const std::string& filter) { 111 void TestTransport::RunTests(const std::string& filter) {
112 RUN_TEST(Create, filter); 112 RUN_TEST(Create, filter);
113 RUN_TEST_FORCEASYNC_AND_NOT(Connect, filter); 113 RUN_TEST_FORCEASYNC_AND_NOT(Connect, filter);
114 RUN_TEST(SetProperty, filter); 114 RUN_TEST(SetProperty, filter);
115 RUN_TEST_FORCEASYNC_AND_NOT(SendDataUdp, filter); 115 RUN_TEST_FORCEASYNC_AND_NOT(SendDataUdp, filter);
116 RUN_TEST_FORCEASYNC_AND_NOT(SendDataTcp, filter); 116 RUN_TEST_FORCEASYNC_AND_NOT(SendDataTcp, filter);
117 RUN_TEST_FORCEASYNC_AND_NOT(ConnectAndCloseUdp, filter); 117 RUN_TEST_FORCEASYNC_AND_NOT(ConnectAndCloseUdp, filter);
118 RUN_TEST_FORCEASYNC_AND_NOT(ConnectAndCloseTcp, filter); 118 RUN_TEST_FORCEASYNC_AND_NOT(ConnectAndCloseTcp, filter);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 // Close the transport and verify that callback is aborted. 370 // Close the transport and verify that callback is aborted.
371 ASSERT_EQ(transport1_->Close(), PP_OK); 371 ASSERT_EQ(transport1_->Close(), PP_OK);
372 372
373 ASSERT_EQ(recv_cb.run_count(), 1); 373 ASSERT_EQ(recv_cb.run_count(), 1);
374 ASSERT_EQ(recv_cb.result(), PP_ERROR_ABORTED); 374 ASSERT_EQ(recv_cb.result(), PP_ERROR_ABORTED);
375 375
376 Clean(); 376 Clean();
377 377
378 PASS(); 378 PASS();
379 } 379 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_tcp_socket_private_shared.cc ('k') | ppapi/tests/test_udp_socket_private_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698