Chromium Code Reviews| Index: net/disk_cache/entry_unittest.cc |
| diff --git a/net/disk_cache/entry_unittest.cc b/net/disk_cache/entry_unittest.cc |
| index 7addc85e5a03b851fd412827823a1f4ee87f4d7a..f76e9acfaffb700fa34c07ceb779e724a6f1d88e 100644 |
| --- a/net/disk_cache/entry_unittest.cc |
| +++ b/net/disk_cache/entry_unittest.cc |
| @@ -2874,9 +2874,7 @@ TEST_F(DiskCacheEntryTest, SimpleCacheOptimistic4) { |
| entry2->Close(); |
| } |
| -// This test is flaky because of the race of Create followed by a Doom. |
| -// See test SimpleCacheCreateDoomRace. |
| -TEST_F(DiskCacheEntryTest, DISABLED_SimpleCacheOptimistic5) { |
| +TEST_F(DiskCacheEntryTest, SimpleCacheOptimistic5) { |
|
gavinp
2013/08/26 20:36:50
YAY!
|
| // Test sequence: |
| // Create, Doom, Write, Read, Close. |
| SetSimpleCacheMode(); |
| @@ -2945,10 +2943,6 @@ TEST_F(DiskCacheEntryTest, SimpleCacheOptimistic6) { |
| EXPECT_EQ(0, memcmp(buffer1->data(), buffer1_read->data(), kSize1)); |
| entry->Doom(); |
| - |
| - // Check that we are not leaking. |
| - EXPECT_TRUE( |
| - static_cast<disk_cache::SimpleEntryImpl*>(entry)->HasOneRef()); |
| } |
| // Confirm that IO buffers are not referenced by the Simple Cache after a write |
| @@ -2987,7 +2981,7 @@ TEST_F(DiskCacheEntryTest, SimpleCacheOptimisticWriteReleases) { |
| EXPECT_TRUE(buffer1->HasOneRef()); |
| } |
| -TEST_F(DiskCacheEntryTest, DISABLED_SimpleCacheCreateDoomRace) { |
| +TEST_F(DiskCacheEntryTest, SimpleCacheCreateDoomRace) { |
| // Test sequence: |
| // Create, Doom, Write, Close, Check files are not on disk anymore. |
| SetSimpleCacheMode(); |
| @@ -3008,14 +3002,6 @@ TEST_F(DiskCacheEntryTest, DISABLED_SimpleCacheCreateDoomRace) { |
| cache_->DoomEntry(key, cb.callback()); |
| EXPECT_EQ(net::OK, cb.GetResult(net::ERR_IO_PENDING)); |
| - // Lets do a Write so we block until all operations are done, so we can check |
| - // the HasOneRef() below. This call can't be optimistic and we are checking |
| - // that here. |
| - EXPECT_EQ( |
| - net::ERR_IO_PENDING, |
| - entry->WriteData(0, 0, buffer1.get(), kSize1, cb.callback(), false)); |
| - EXPECT_EQ(kSize1, cb.GetResult(net::ERR_IO_PENDING)); |
| - |
| // Check that we are not leaking. |
| EXPECT_TRUE( |
| static_cast<disk_cache::SimpleEntryImpl*>(entry)->HasOneRef()); |