Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: net/disk_cache/backend_unittest.cc

Issue 23658057: Simple Cache: stop running index file tests on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/disk_cache/entry_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "base/port.h" 8 #include "base/port.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 3118 matching lines...) Expand 10 before | Expand all | Expand 10 after
3129 entry->Close(); 3129 entry->Close();
3130 entry = NULL; 3130 entry = NULL;
3131 same_entry->Close(); 3131 same_entry->Close();
3132 same_entry = NULL; 3132 same_entry = NULL;
3133 } 3133 }
3134 3134
3135 TEST_F(DiskCacheBackendTest, TracingBackendBasics) { 3135 TEST_F(DiskCacheBackendTest, TracingBackendBasics) {
3136 TracingBackendBasics(); 3136 TracingBackendBasics();
3137 } 3137 }
3138 3138
3139 // The simple cache backend isn't intended to work on windows, which has very 3139 // The Simple Cache backend requires a few guarantees from the filesystem like
3140 // different file system guarantees from Windows. 3140 // atomic renaming of recently open files. Those guarantees are not provided in
3141 #if !defined(OS_WIN) 3141 // general on Windows.
3142 #if defined(OS_POSIX)
3142 3143
3143 TEST_F(DiskCacheBackendTest, SimpleCacheShutdownWithPendingCreate) { 3144 TEST_F(DiskCacheBackendTest, SimpleCacheShutdownWithPendingCreate) {
3144 SetCacheType(net::APP_CACHE); 3145 SetCacheType(net::APP_CACHE);
3145 SetSimpleCacheMode(); 3146 SetSimpleCacheMode();
3146 BackendShutdownWithPendingCreate(false); 3147 BackendShutdownWithPendingCreate(false);
3147 } 3148 }
3148 3149
3149 TEST_F(DiskCacheBackendTest, SimpleCacheShutdownWithPendingFileIO) { 3150 TEST_F(DiskCacheBackendTest, SimpleCacheShutdownWithPendingFileIO) {
3150 SetCacheType(net::APP_CACHE); 3151 SetCacheType(net::APP_CACHE);
3151 SetSimpleCacheMode(); 3152 SetSimpleCacheMode();
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
3466 std::set<std::string> keys_to_match(key_pool); 3467 std::set<std::string> keys_to_match(key_pool);
3467 void* iter = NULL; 3468 void* iter = NULL;
3468 size_t count = 0; 3469 size_t count = 0;
3469 ASSERT_TRUE(EnumerateAndMatchKeys(-1, &iter, &keys_to_match, &count)); 3470 ASSERT_TRUE(EnumerateAndMatchKeys(-1, &iter, &keys_to_match, &count));
3470 cache_->EndEnumeration(&iter); 3471 cache_->EndEnumeration(&iter);
3471 3472
3472 EXPECT_EQ(key_pool.size(), count); 3473 EXPECT_EQ(key_pool.size(), count);
3473 EXPECT_TRUE(keys_to_match.empty()); 3474 EXPECT_TRUE(keys_to_match.empty());
3474 } 3475 }
3475 3476
3476 #endif // !defined(OS_WIN) 3477 #endif // defined(OS_POSIX)
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698