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

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

Issue 8477015: Make it possible to enable/disable specific ppapi tests. Migrate PostMessage tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix license headers. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/tests/test_transport.h ('k') | ppapi/tests/test_uma.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 }; 95 };
96 96
97 } // namespace 97 } // namespace
98 98
99 bool TestTransport::Init() { 99 bool TestTransport::Init() {
100 transport_interface_ = reinterpret_cast<PPB_Transport_Dev const*>( 100 transport_interface_ = reinterpret_cast<PPB_Transport_Dev const*>(
101 pp::Module::Get()->GetBrowserInterface(PPB_TRANSPORT_DEV_INTERFACE)); 101 pp::Module::Get()->GetBrowserInterface(PPB_TRANSPORT_DEV_INTERFACE));
102 return transport_interface_ && InitTestingInterface(); 102 return transport_interface_ && InitTestingInterface();
103 } 103 }
104 104
105 void TestTransport::RunTest() { 105 void TestTransport::RunTests(const std::string& filter) {
106 RUN_TEST(Create); 106 RUN_TEST(Create, filter);
107 RUN_TEST_FORCEASYNC_AND_NOT(Connect); 107 RUN_TEST_FORCEASYNC_AND_NOT(Connect, filter);
108 RUN_TEST(SetProperty); 108 RUN_TEST(SetProperty, filter);
109 RUN_TEST_FORCEASYNC_AND_NOT(SendDataUdp); 109 RUN_TEST_FORCEASYNC_AND_NOT(SendDataUdp, filter);
110 RUN_TEST_FORCEASYNC_AND_NOT(SendDataTcp); 110 RUN_TEST_FORCEASYNC_AND_NOT(SendDataTcp, filter);
111 RUN_TEST_FORCEASYNC_AND_NOT(ConnectAndCloseUdp); 111 RUN_TEST_FORCEASYNC_AND_NOT(ConnectAndCloseUdp, filter);
112 RUN_TEST_FORCEASYNC_AND_NOT(ConnectAndCloseTcp); 112 RUN_TEST_FORCEASYNC_AND_NOT(ConnectAndCloseTcp, filter);
113 } 113 }
114 114
115 std::string TestTransport::InitTargets(PP_TransportType type) { 115 std::string TestTransport::InitTargets(PP_TransportType type) {
116 transport1_.reset(new pp::Transport_Dev(instance_, kTestChannelName, type)); 116 transport1_.reset(new pp::Transport_Dev(instance_, kTestChannelName, type));
117 transport2_.reset(new pp::Transport_Dev(instance_, kTestChannelName, type)); 117 transport2_.reset(new pp::Transport_Dev(instance_, kTestChannelName, type));
118 118
119 ASSERT_TRUE(transport1_.get() != NULL); 119 ASSERT_TRUE(transport1_.get() != NULL);
120 ASSERT_TRUE(transport2_.get() != NULL); 120 ASSERT_TRUE(transport2_.get() != NULL);
121 121
122 PASS(); 122 PASS();
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // Close the transport and verify that callback is aborted. 364 // Close the transport and verify that callback is aborted.
365 ASSERT_EQ(transport1_->Close(), PP_OK); 365 ASSERT_EQ(transport1_->Close(), PP_OK);
366 366
367 ASSERT_EQ(recv_cb.run_count(), 1); 367 ASSERT_EQ(recv_cb.run_count(), 1);
368 ASSERT_EQ(recv_cb.result(), PP_ERROR_ABORTED); 368 ASSERT_EQ(recv_cb.result(), PP_ERROR_ABORTED);
369 369
370 Clean(); 370 Clean();
371 371
372 PASS(); 372 PASS();
373 } 373 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_transport.h ('k') | ppapi/tests/test_uma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698