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

Side by Side Diff: ppapi/tests/test_udp_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_udp_socket_private.cc ('k') | ppapi/tests/test_utils.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) 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_udp_socket_private_disallowed.h" 5 #include "ppapi/tests/test_udp_socket_private_disallowed.h"
6 6
7 #include "ppapi/cpp/module.h" 7 #include "ppapi/cpp/module.h"
8 #include "ppapi/cpp/private/net_address_private.h" 8 #include "ppapi/cpp/private/net_address_private.h"
9 #include "ppapi/tests/testing_instance.h" 9 #include "ppapi/tests/testing_instance.h"
10 #include "ppapi/tests/test_utils.h" 10 #include "ppapi/tests/test_utils.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 std::string TestUDPSocketPrivateDisallowed::TestBind() { 31 std::string TestUDPSocketPrivateDisallowed::TestBind() {
32 PP_Resource socket = 32 PP_Resource socket =
33 udp_socket_private_interface_->Create(instance_->pp_instance()); 33 udp_socket_private_interface_->Create(instance_->pp_instance());
34 if (0 != socket) { 34 if (0 != socket) {
35 PP_NetAddress_Private addr; 35 PP_NetAddress_Private addr;
36 pp::NetAddressPrivate::GetAnyAddress(false, &addr); 36 pp::NetAddressPrivate::GetAnyAddress(false, &addr);
37 37
38 TestCompletionCallback callback(instance_->pp_instance()); 38 TestCompletionCallback callback(instance_->pp_instance());
39 int32_t rv = udp_socket_private_interface_->Bind(socket, &addr, 39 callback.WaitForResult(udp_socket_private_interface_->Bind(socket, &addr,
40 callback.GetCallback().pp_completion_callback()); 40 callback.GetCallback().pp_completion_callback()));
41 41 CHECK_CALLBACK_BEHAVIOR(callback);
42 if (PP_OK_COMPLETIONPENDING == rv) 42 ASSERT_EQ(PP_ERROR_FAILED, callback.result());
43 rv = callback.WaitForResult();
44
45 if (PP_ERROR_FAILED != rv)
46 return "PPB_UDPSocket_Private can bind without allowing switch";
47 } 43 }
48 PASS(); 44 PASS();
49 } 45 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_udp_socket_private.cc ('k') | ppapi/tests/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698