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

Side by Side Diff: webkit/database/database_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
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 <map> 5 #include <map>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 void OnGetOriginsComplete(const std::set<GURL>& origins, 194 void OnGetOriginsComplete(const std::set<GURL>& origins,
195 quota::StorageType type) { 195 quota::StorageType type) {
196 origins_ = origins; 196 origins_ = origins;
197 type_ = type; 197 type_ = type;
198 } 198 }
199 199
200 void OnDeleteOriginDataComplete(quota::QuotaStatusCode status) { 200 void OnDeleteOriginDataComplete(quota::QuotaStatusCode status) {
201 delete_status_ = status; 201 delete_status_ = status;
202 } 202 }
203 203
204 MessageLoop message_loop_;
204 int64 usage_; 205 int64 usage_;
205 std::set<GURL> origins_; 206 std::set<GURL> origins_;
206 quota::StorageType type_; 207 quota::StorageType type_;
207 quota::QuotaStatusCode delete_status_; 208 quota::QuotaStatusCode delete_status_;
208 scoped_refptr<MockDatabaseTracker> mock_tracker_; 209 scoped_refptr<MockDatabaseTracker> mock_tracker_;
209 base::WeakPtrFactory<DatabaseQuotaClientTest> weak_factory_; 210 base::WeakPtrFactory<DatabaseQuotaClientTest> weak_factory_;
210 }; 211 };
211 212
212 213
213 TEST_F(DatabaseQuotaClientTest, GetOriginUsage) { 214 TEST_F(DatabaseQuotaClientTest, GetOriginUsage) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 mock_tracker()->set_async_delete(false); 282 mock_tracker()->set_async_delete(false);
282 EXPECT_TRUE(DeleteOriginData(&client, kTemp, kOriginA)); 283 EXPECT_TRUE(DeleteOriginData(&client, kTemp, kOriginA));
283 EXPECT_EQ(1, mock_tracker()->delete_called_count()); 284 EXPECT_EQ(1, mock_tracker()->delete_called_count());
284 285
285 mock_tracker()->set_async_delete(true); 286 mock_tracker()->set_async_delete(true);
286 EXPECT_TRUE(DeleteOriginData(&client, kTemp, kOriginA)); 287 EXPECT_TRUE(DeleteOriginData(&client, kTemp, kOriginA));
287 EXPECT_EQ(2, mock_tracker()->delete_called_count()); 288 EXPECT_EQ(2, mock_tracker()->delete_called_count());
288 } 289 }
289 290
290 } // namespace webkit_database 291 } // namespace webkit_database
OLDNEW
« no previous file with comments | « webkit/database/database_connections_unittest.cc ('k') | webkit/database/database_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698