4 entries: 2 <---- there is an extra entry on the lru.
29 -------------------------
48 -------------------------
67 -------------------------
86 -------------------------
105 -------------------------
118 data addr 0: 0xa0010005
127 Rankings at 0x90000000
134 ================================
136 Generated with: (see steps on the bug 69135)
138 SetMask(0x1); // 2-entry table.
139 SetMaxSize(0x3000); // 12 kB.
142 std::string key1("The first key");
143 std::string key2("The Second key");
144 std::string key3("The third key");
145 disk_cache::Entry* entry;
147 ASSERT_EQ(net::OK, CreateEntry(key1, &entry));
149 ASSERT_EQ(net::OK, CreateEntry(key2, &entry));
151 ASSERT_EQ(net::OK, CreateEntry(key3, &entry));
154 const int kSize = 20;
155 ASSERT_EQ(net::OK, OpenEntry(key1, &entry));
156 scoped_refptr<net::IOBuffer> buf = new net::IOBuffer(kSize);
157 memset(buf->data(), 0, kSize);
158 EXPECT_EQ(kSize, WriteData(entry, 0, 0, buf, kSize, false));
161 ASSERT_EQ(net::OK, OpenEntry(key2, &entry)); <--- 1st crash.
162 ASSERT_NE(net::OK, OpenEntry(key2, &entry)); <--- 2nd crash. *
164 ASSERT_EQ(net::OK, DoomEntry(key3));
166 (*) and trick the code into deleting the dirty flag.