Lines Matching defs:buffer1
52 scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize1);
53 CacheTestFillBuffer(buffer1->data(), kSize1, false);
54 EXPECT_EQ(0, entry1->ReadData(0, 0, buffer1, kSize1, NULL));
55 base::strlcpy(buffer1->data(), "the data", kSize1);
56 EXPECT_EQ(10, entry1->WriteData(0, 0, buffer1, kSize1, NULL, false));
57 memset(buffer1->data(), 0, kSize1);
58 EXPECT_EQ(10, entry1->ReadData(0, 0, buffer1, kSize1, NULL));
59 EXPECT_STREQ("the data", buffer1->data());
136 scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize1);
139 CacheTestFillBuffer(buffer1->data(), kSize1, false);
143 EXPECT_EQ(0, entry1->ReadData(0, 15 * 1024, buffer1, kSize1, &callback1));
144 base::strlcpy(buffer1->data(), "the data", kSize1);
146 int ret = entry1->WriteData(0, 0, buffer1, kSize1, &callback2, false);
208 ret = entry1->ReadData(0, 0, buffer1, kSize1, &callback12);
245 scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize1);
247 CacheTestFillBuffer(buffer1->data(), kSize1, false);
249 base::strlcpy(buffer1->data(), "the data", kSize1);
250 EXPECT_EQ(17000, entry1->WriteData(0, 0, buffer1, kSize1, NULL, false));
251 memset(buffer1->data(), 0, kSize1);
252 EXPECT_EQ(17000, entry1->ReadData(0, 0, buffer1, kSize1, NULL));
253 EXPECT_STREQ("the data", buffer1->data());
265 EXPECT_EQ(17000, entry1->ReadData(1, 0, buffer1, kSize1, NULL));
266 EXPECT_EQ(17000, entry1->WriteData(1, 20000, buffer1, kSize1, NULL, false));
309 scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize1);
312 CacheTestFillBuffer(buffer1->data(), kSize1, false);
315 base::strlcpy(buffer1->data(), "the data", kSize1);
316 int ret = entry1->WriteData(0, 0, buffer1, kSize1, &callback1, false);
330 EXPECT_STREQ("the data", buffer1->data());
361 ret = entry1->ReadData(1, 0, buffer1, kSize1, &callback8);
365 ret = entry1->WriteData(1, 20000, buffer1, kSize1, &callback9, false);
398 scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kBufferSize);
403 CacheTestFillBuffer(buffer1->data(), kBufferSize, false);
404 EXPECT_EQ(kBufferSize, entry->WriteData(i, 0, buffer1, kBufferSize, NULL,
408 EXPECT_EQ(0, memcmp(buffer1->data(), buffer2->data(), kBufferSize));
412 entry->ReadData(kNumStreams, 0, buffer1, kBufferSize, NULL));
479 scoped_refptr<net::IOBuffer> buffer1
481 CacheTestFillBuffer(buffer1->data(), kSize, false);
484 base::strlcpy(buffer1->data(), "the data", kSize);
485 EXPECT_EQ(10, entry1->WriteData(0, 0, buffer1, 10, NULL, false));
490 EXPECT_EQ(2000, entry1->WriteData(0, 0, buffer1, 2000, NULL, false));
493 EXPECT_TRUE(!memcmp(buffer1->data(), buffer2->data(), 2000));
495 EXPECT_EQ(20000, entry1->WriteData(0, 0, buffer1, kSize, NULL, false));
498 EXPECT_TRUE(!memcmp(buffer1->data(), buffer2->data(), kSize));
503 EXPECT_EQ(10, entry2->WriteData(0, 0, buffer1, 10, NULL, false));
509 EXPECT_EQ(2000, entry2->WriteData(0, 0, buffer1, 2000, NULL, false));
512 EXPECT_TRUE(!memcmp(buffer1->data(), buffer2->data(), 2000));
518 EXPECT_EQ(20000, entry2->WriteData(0, 0, buffer1, kSize, NULL, false));
521 EXPECT_TRUE(!memcmp(buffer1->data(), buffer2->data(), kSize));
543 scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize1);
546 CacheTestFillBuffer(buffer1->data(), kSize1, false);
550 EXPECT_EQ(200, entry1->WriteData(0, 0, buffer1, 200, NULL, false));
552 EXPECT_EQ(100, entry1->WriteData(0, 0, buffer1, 100, NULL, false));
554 EXPECT_EQ(100, entry1->WriteData(0, 0, buffer1, 100, NULL, true));
556 EXPECT_EQ(0, entry1->WriteData(0, 50, buffer1, 0, NULL, true));
558 EXPECT_EQ(0, entry1->WriteData(0, 0, buffer1, 0, NULL, true));
564 EXPECT_EQ(20000, entry1->WriteData(0, 0, buffer1, 20000, NULL, true));
567 EXPECT_TRUE(!memcmp(buffer1->data(), buffer2->data(), 20000));
571 EXPECT_EQ(18000, entry1->WriteData(0, 0, buffer1, 18000, NULL, false));
573 EXPECT_EQ(18000, entry1->WriteData(0, 0, buffer1, 18000, NULL, true));
575 EXPECT_EQ(0, entry1->WriteData(0, 17500, buffer1, 0, NULL, true));
579 EXPECT_EQ(600, entry1->WriteData(0, 1000, buffer1, 600, NULL, true));
582 EXPECT_TRUE(!memcmp(buffer1->data(), buffer2->data(), 600));
584 EXPECT_TRUE(!memcmp(buffer1->data(), buffer2->data(), 1000)) <<
588 EXPECT_EQ(20000, entry1->WriteData(0, 0, buffer1, 20000, NULL, true));
590 EXPECT_EQ(0, entry1->WriteData(0, 0, buffer1, 0, NULL, true));
704 scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize1);
708 CacheTestFillBuffer(buffer1->data(), kSize1, false);
712 EXPECT_EQ(200, entry1->WriteData(0, 400, buffer1, 200, NULL, false));
720 EXPECT_EQ(200, entry1->WriteData(0, 800, buffer1, 200, NULL, false));
728 EXPECT_EQ(200, entry1->WriteData(0, 1800, buffer1, 200, NULL, true));
734 EXPECT_EQ(200, entry1->WriteData(0, 19800, buffer1, 200, NULL, false));
740 EXPECT_EQ(600, entry1->WriteData(0, 1000, buffer1, 600, NULL, true));
743 EXPECT_TRUE(!memcmp(buffer3->data(), buffer1->data(), 600));
746 EXPECT_EQ(600, entry1->WriteData(0, 2000, buffer1, 600, NULL, false));
752 EXPECT_EQ(600, entry1->WriteData(0, 3000, buffer1, 600, NULL, true));
817 scoped_refptr<net::IOBuffer> buffer1 = new net::IOBuffer(kSize1);
819 CacheTestFillBuffer(buffer1->data(), kSize1, false);
822 EXPECT_EQ(2000, entry->WriteData(0, 0, buffer1, 2000, NULL, false));
824 EXPECT_EQ(0, memcmp(buffer1->data(), buffer2->data(), kSize1));