OLD | NEW |
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.h" | 5 #include "ppapi/tests/test_tcp_socket_private.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include "base/string_split.h" | |
10 #include "ppapi/c/dev/ppb_url_util_dev.h" | 9 #include "ppapi/c/dev/ppb_url_util_dev.h" |
11 #include "ppapi/cpp/dev/url_util_dev.h" | 10 #include "ppapi/cpp/dev/url_util_dev.h" |
12 #include "ppapi/cpp/private/tcp_socket_private.h" | 11 #include "ppapi/cpp/private/tcp_socket_private.h" |
13 #include "ppapi/cpp/var.h" | 12 #include "ppapi/cpp/var.h" |
14 #include "ppapi/tests/testing_instance.h" | 13 #include "ppapi/tests/testing_instance.h" |
15 #include "ppapi/tests/test_utils.h" | 14 #include "ppapi/tests/test_utils.h" |
16 | 15 |
17 namespace { | 16 namespace { |
18 | 17 |
19 // Validates the first line of an HTTP response. | 18 // Validates the first line of an HTTP response. |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 if (rv < 0) | 208 if (rv < 0) |
210 return rv; | 209 return rv; |
211 if (rv == 0) | 210 if (rv == 0) |
212 return PP_ERROR_FAILED; | 211 return PP_ERROR_FAILED; |
213 written += rv; | 212 written += rv; |
214 } | 213 } |
215 if (written != s.size()) | 214 if (written != s.size()) |
216 return PP_ERROR_FAILED; | 215 return PP_ERROR_FAILED; |
217 return PP_OK; | 216 return PP_OK; |
218 } | 217 } |
OLD | NEW |