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

Side by Side Diff: webkit/appcache/appcache_quota_client_unittest.cc

Issue 10540042: Move remaining webkit storage unit tests to content_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « webkit/appcache/appcache_host_unittest.cc ('k') | webkit/appcache/appcache_service_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/message_loop_proxy.h" 10 #include "base/message_loop_proxy.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ++num_get_origins_completions_; 147 ++num_get_origins_completions_;
148 origins_ = origins; 148 origins_ = origins;
149 type_ = type; 149 type_ = type;
150 } 150 }
151 151
152 void OnDeleteOriginDataComplete(quota::QuotaStatusCode status) { 152 void OnDeleteOriginDataComplete(quota::QuotaStatusCode status) {
153 ++num_delete_origins_completions_; 153 ++num_delete_origins_completions_;
154 delete_status_ = status; 154 delete_status_ = status;
155 } 155 }
156 156
157 MessageLoop message_loop_;
157 int64 usage_; 158 int64 usage_;
158 std::set<GURL> origins_; 159 std::set<GURL> origins_;
159 quota::StorageType type_; 160 quota::StorageType type_;
160 quota::QuotaStatusCode delete_status_; 161 quota::QuotaStatusCode delete_status_;
161 int num_get_origin_usage_completions_; 162 int num_get_origin_usage_completions_;
162 int num_get_origins_completions_; 163 int num_get_origins_completions_;
163 int num_delete_origins_completions_; 164 int num_delete_origins_completions_;
164 MockAppCacheService mock_service_; 165 MockAppCacheService mock_service_;
165 base::WeakPtrFactory<AppCacheQuotaClientTest> weak_factory_; 166 base::WeakPtrFactory<AppCacheQuotaClientTest> weak_factory_;
166 }; 167 };
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 // A real completion callback from the service should 429 // A real completion callback from the service should
429 // be dropped if it comes in after NotifyAppCacheDestroyed. 430 // be dropped if it comes in after NotifyAppCacheDestroyed.
430 MessageLoop::current()->RunAllPending(); 431 MessageLoop::current()->RunAllPending();
431 EXPECT_EQ(1, num_delete_origins_completions_); 432 EXPECT_EQ(1, num_delete_origins_completions_);
432 EXPECT_EQ(quota::kQuotaErrorAbort, delete_status_); 433 EXPECT_EQ(quota::kQuotaErrorAbort, delete_status_);
433 434
434 Call_OnQuotaManagerDestroyed(client); 435 Call_OnQuotaManagerDestroyed(client);
435 } 436 }
436 437
437 } // namespace appcache 438 } // namespace appcache
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_host_unittest.cc ('k') | webkit/appcache/appcache_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698