| OLD | NEW |
| 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 */ | |
| 5 | 4 |
| 6 #include <fcntl.h> | 5 #include <fcntl.h> |
| 7 #include <gmock/gmock.h> | 6 #include <gmock/gmock.h> |
| 8 #include <ppapi/c/ppb_file_io.h> | 7 #include <ppapi/c/ppb_file_io.h> |
| 9 #include <ppapi/c/pp_errors.h> | 8 #include <ppapi/c/pp_errors.h> |
| 10 #include <ppapi/c/pp_instance.h> | 9 #include <ppapi/c/pp_instance.h> |
| 11 #include <sys/stat.h> | 10 #include <sys/stat.h> |
| 12 #include <sys/types.h> | 11 #include <sys/types.h> |
| 13 | 12 |
| 14 #include "mock_util.h" | 13 #include "mock_util.h" |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 | 602 |
| 604 ExpectOpen("GET"); | 603 ExpectOpen("GET"); |
| 605 ExpectHeaders("Range: bytes=10-18\n"); | 604 ExpectHeaders("Range: bytes=10-18\n"); |
| 606 SetResponse(200, "Content-Length: 20\n"); | 605 SetResponse(200, "Content-Length: 20\n"); |
| 607 SetResponseBody("0123456789abcdefghij"); | 606 SetResponseBody("0123456789abcdefghij"); |
| 608 EXPECT_EQ(0, node_->Read(10, buf, sizeof(buf) - 1, &result_bytes)); | 607 EXPECT_EQ(0, node_->Read(10, buf, sizeof(buf) - 1, &result_bytes)); |
| 609 EXPECT_EQ(sizeof(buf) - 1, result_bytes); | 608 EXPECT_EQ(sizeof(buf) - 1, result_bytes); |
| 610 EXPECT_STREQ("abcdefghi", &buf[0]); | 609 EXPECT_STREQ("abcdefghi", &buf[0]); |
| 611 } | 610 } |
| 612 | 611 |
| OLD | NEW |