Lines Matching refs:cb
1156 TestCompletionCallback cb;
1158 entry->WriteData(0, 0, buffer, kSize, &cb, false));
1162 EXPECT_EQ(kSize, cb.WaitForResult());
1168 EXPECT_EQ(net::ERR_IO_PENDING, entry->ReadData(0, 0, buffer, kSize, &cb));
1170 EXPECT_EQ(kSize, cb.WaitForResult());
1291 TestCompletionCallback cb;
1294 int ret = entry->ReadSparseData(offset, buf_2, size, &cb);
1295 EXPECT_EQ(0, cb.GetResult(ret));
1297 ret = entry->WriteSparseData(offset, buf_1, size, &cb);
1298 EXPECT_EQ(size, cb.GetResult(ret));
1300 ret = entry->ReadSparseData(offset, buf_2, size, &cb);
1301 EXPECT_EQ(size, cb.GetResult(ret));
1310 TestCompletionCallback cb;
1314 int ret = entry->ReadSparseData(offset, buf_1, size, &cb);
1315 EXPECT_EQ(size, cb.GetResult(ret));
1407 TestCompletionCallback cb;
1408 int rv = entry->GetAvailableRange(0x20F0000, kSize * 2, &start, &cb);
1409 EXPECT_EQ(kSize, cb.GetResult(rv));
1413 rv = entry->GetAvailableRange(0, kSize, &start, &cb);
1414 EXPECT_EQ(0, cb.GetResult(rv));
1415 rv = entry->GetAvailableRange(0x20F0000 - kSize, kSize, &start, &cb);
1416 EXPECT_EQ(0, cb.GetResult(rv));
1417 rv = entry->GetAvailableRange(0, 0x2100000, &start, &cb);
1418 EXPECT_EQ(kSize, cb.GetResult(rv));
1423 rv = entry->GetAvailableRange(0x2100000, kSize, &start, &cb);
1424 EXPECT_EQ(0, cb.GetResult(rv));
1425 rv = entry->ReadSparseData(start, buf, kSize, &cb);
1426 EXPECT_EQ(0, cb.GetResult(rv));
1429 rv = entry->GetAvailableRange(0x20F2000, kSize, &start, &cb);
1430 EXPECT_EQ(0x2000, cb.GetResult(rv));
1436 rv = entry->GetAvailableRange(0x20F0001 - kSize, kSize, &start, &cb);
1437 EXPECT_EQ(1, cb.GetResult(rv));
1553 TestCompletionCallback cb;
1555 int rv = entry->GetAvailableRange(0, 10000, &start, &cb);
1556 EXPECT_EQ(1024, cb.GetResult(rv));
1561 rv = entry->GetAvailableRange(512, 10000, &start, &cb);
1562 EXPECT_EQ(512, cb.GetResult(rv));
1566 rv = entry->GetAvailableRange(1024, 10000, &start, &cb);
1567 EXPECT_EQ(1024, cb.GetResult(rv));
1572 rv = entry->GetAvailableRange(5500, 512, &start, &cb);
1573 EXPECT_EQ(512, cb.GetResult(rv));
1578 rv = entry->GetAvailableRange(5000, 620, &start, &cb);
1579 EXPECT_EQ(500, cb.GetResult(rv));
1583 rv = entry->GetAvailableRange(40000, 20000, &start, &cb);
1584 EXPECT_EQ(8192, cb.GetResult(rv));
1741 SparseTestCompletionCallback cb(cache_);
1742 int rv = cache_->DoomEntry(key, &cb);
1744 EXPECT_EQ(net::OK, cb.WaitForResult());
1786 TestCompletionCallback cb;
1788 rv = entry->GetAvailableRange(0, 600, &start, &cb);
1789 EXPECT_EQ(100, cb.GetResult(rv));
1792 rv = entry->GetAvailableRange(0, 2048, &start, &cb);
1793 EXPECT_EQ(1024, cb.GetResult(rv));
1796 rv = entry->GetAvailableRange(kSize, kSize, &start, &cb);
1797 EXPECT_EQ(500, cb.GetResult(rv));
1799 rv = entry->GetAvailableRange(20 * 1024, 10000, &start, &cb);
1800 EXPECT_EQ(3616, cb.GetResult(rv));
1807 rv = entry->GetAvailableRange(19400, kSize, &start, &cb);
1808 EXPECT_EQ(3496, cb.GetResult(rv));
1811 rv = entry->GetAvailableRange(19400, kSize, &start, &cb);
1812 EXPECT_EQ(3016, cb.GetResult(rv));
1815 rv = entry->GetAvailableRange(3073, kSize, &start, &cb);
1816 EXPECT_EQ(1523, cb.GetResult(rv));
1818 rv = entry->GetAvailableRange(4600, kSize, &start, &cb);
1819 EXPECT_EQ(0, cb.GetResult(rv));
1824 rv = entry->GetAvailableRange(1024, 10000, &start, &cb);
1825 EXPECT_EQ(7 * 1024 + 500, cb.GetResult(rv));