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

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

Issue 8879009: In ppapi/tests: |... const*| -> |const ...*| (for consistency). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « ppapi/tests/test_input_event.cc ('k') | ppapi/tests/test_transport.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) 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_tcp_socket_private_shared.h" 5 #include "ppapi/tests/test_tcp_socket_private_shared.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <new> 8 #include <new>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "ppapi/cpp/module.h" 12 #include "ppapi/cpp/module.h"
13 #include "ppapi/tests/test_utils.h" 13 #include "ppapi/tests/test_utils.h"
14 #include "ppapi/tests/testing_instance.h" 14 #include "ppapi/tests/testing_instance.h"
15 15
16 REGISTER_TEST_CASE(TCPSocketPrivateShared); 16 REGISTER_TEST_CASE(TCPSocketPrivateShared);
17 17
18 // TODO(ygorshenin): get rid of using external server in tests, 18 // TODO(ygorshenin): get rid of using external server in tests,
19 // http://crbug.com/105863 19 // http://crbug.com/105863
20 const char* const TestTCPSocketPrivateShared::kHost = "www.google.com"; 20 const char* const TestTCPSocketPrivateShared::kHost = "www.google.com";
21 21
22 TestTCPSocketPrivateShared::TestTCPSocketPrivateShared( 22 TestTCPSocketPrivateShared::TestTCPSocketPrivateShared(
23 TestingInstance* instance) 23 TestingInstance* instance)
24 : TestCase(instance), tcp_socket_private_interface_(NULL) { 24 : TestCase(instance), tcp_socket_private_interface_(NULL) {
25 } 25 }
26 26
27 bool TestTCPSocketPrivateShared::Init() { 27 bool TestTCPSocketPrivateShared::Init() {
28 tcp_socket_private_interface_ = 28 tcp_socket_private_interface_ = static_cast<const PPB_TCPSocket_Private*>(
29 reinterpret_cast<PPB_TCPSocket_Private const*>( 29 pp::Module::Get()->GetBrowserInterface(PPB_TCPSOCKET_PRIVATE_INTERFACE));
30 pp::Module::Get()->GetBrowserInterface(
31 PPB_TCPSOCKET_PRIVATE_INTERFACE));
32 if (!tcp_socket_private_interface_) 30 if (!tcp_socket_private_interface_)
33 instance_->AppendError("TCPSocketPrivate interface not available"); 31 instance_->AppendError("TCPSocketPrivate interface not available");
34 return tcp_socket_private_interface_ && InitTestingInterface(); 32 return tcp_socket_private_interface_ && InitTestingInterface();
35 } 33 }
36 34
37 void TestTCPSocketPrivateShared::RunTests(const std::string& filter) { 35 void TestTCPSocketPrivateShared::RunTests(const std::string& filter) {
38 RUN_TEST(Create, filter); 36 RUN_TEST(Create, filter);
39 RUN_TEST_FORCEASYNC_AND_NOT(GetAddress, filter); 37 RUN_TEST_FORCEASYNC_AND_NOT(GetAddress, filter);
40 RUN_TEST_FORCEASYNC_AND_NOT(Connect, filter); 38 RUN_TEST_FORCEASYNC_AND_NOT(Connect, filter);
41 RUN_TEST_FORCEASYNC_AND_NOT(Reconnect, filter); 39 RUN_TEST_FORCEASYNC_AND_NOT(Reconnect, filter);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 if (!error_message.empty()) 260 if (!error_message.empty())
263 return error_message; 261 return error_message;
264 error_message = 262 error_message =
265 CheckHTTPResponse(socket, "GET /robots.txt\r\n", "HTTP/1.0 200 OK"); 263 CheckHTTPResponse(socket, "GET /robots.txt\r\n", "HTTP/1.0 200 OK");
266 if (!error_message.empty()) 264 if (!error_message.empty())
267 return error_message; 265 return error_message;
268 tcp_socket_private_interface_->Disconnect(socket); 266 tcp_socket_private_interface_->Disconnect(socket);
269 267
270 PASS(); 268 PASS();
271 } 269 }
OLDNEW
« no previous file with comments | « ppapi/tests/test_input_event.cc ('k') | ppapi/tests/test_transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698