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

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

Issue 14139012: PPAPI: More test cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Provide a message loop for "background thread" test so we can use a REQUIRED callback Created 7 years, 8 months 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_tcp_socket_private.cc ('k') | ppapi/tests/test_tcp_socket_private_trusted.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_tcp_socket_private_disallowed.h" 5 #include "ppapi/tests/test_tcp_socket_private_disallowed.h"
6 6
7 #include "ppapi/cpp/module.h" 7 #include "ppapi/cpp/module.h"
8 #include "ppapi/tests/test_utils.h" 8 #include "ppapi/tests/test_utils.h"
9 #include "ppapi/tests/testing_instance.h" 9 #include "ppapi/tests/testing_instance.h"
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 void TestTCPSocketPrivateDisallowed::RunTests(const std::string& filter) { 33 void TestTCPSocketPrivateDisallowed::RunTests(const std::string& filter) {
34 RUN_TEST(Connect, filter); 34 RUN_TEST(Connect, filter);
35 } 35 }
36 36
37 std::string TestTCPSocketPrivateDisallowed::TestConnect() { 37 std::string TestTCPSocketPrivateDisallowed::TestConnect() {
38 PP_Resource socket = 38 PP_Resource socket =
39 tcp_socket_private_interface_->Create(instance_->pp_instance()); 39 tcp_socket_private_interface_->Create(instance_->pp_instance());
40 if (0 != socket) { 40 if (0 != socket) {
41 TestCompletionCallback callback(instance_->pp_instance()); 41 TestCompletionCallback callback(instance_->pp_instance());
42 int32_t rv = tcp_socket_private_interface_->Connect( 42 callback.WaitForResult(tcp_socket_private_interface_->Connect(
43 socket, kServerName, kPort, 43 socket, kServerName, kPort,
44 callback.GetCallback().pp_completion_callback()); 44 callback.GetCallback().pp_completion_callback()));
45 45 CHECK_CALLBACK_BEHAVIOR(callback);
46 if (PP_OK_COMPLETIONPENDING == rv) 46 ASSERT_EQ(PP_ERROR_FAILED, callback.result());
47 rv = callback.WaitForResult();
48
49 if (PP_ERROR_FAILED != rv)
50 return "PPB_TCPSocket_Private can connect without allowing switch";
51 } 47 }
52 PASS(); 48 PASS();
53 } 49 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_tcp_socket_private.cc ('k') | ppapi/tests/test_tcp_socket_private_trusted.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698