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

Side by Side Diff: webkit/quota/quota_manager_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 <set> 5 #include <set>
6 #include <sstream> 6 #include <sstream>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 FilePath profile_path() const { return data_dir_.path(); } 392 FilePath profile_path() const { return data_dir_.path(); }
393 int status_callback_count() const { return status_callback_count_; } 393 int status_callback_count() const { return status_callback_count_; }
394 void reset_status_callback_count() { status_callback_count_ = 0; } 394 void reset_status_callback_count() { status_callback_count_ = 0; }
395 395
396 private: 396 private:
397 base::Time IncrementMockTime() { 397 base::Time IncrementMockTime() {
398 ++mock_time_counter_; 398 ++mock_time_counter_;
399 return base::Time::FromDoubleT(mock_time_counter_ * 10.0); 399 return base::Time::FromDoubleT(mock_time_counter_ * 10.0);
400 } 400 }
401 401
402 MessageLoop message_loop_;
402 ScopedTempDir data_dir_; 403 ScopedTempDir data_dir_;
403 base::WeakPtrFactory<QuotaManagerTest> weak_factory_; 404 base::WeakPtrFactory<QuotaManagerTest> weak_factory_;
404 405
405 scoped_refptr<QuotaManager> quota_manager_; 406 scoped_refptr<QuotaManager> quota_manager_;
406 scoped_refptr<MockSpecialStoragePolicy> mock_special_storage_policy_; 407 scoped_refptr<MockSpecialStoragePolicy> mock_special_storage_policy_;
407 408
408 QuotaStatusCode quota_status_; 409 QuotaStatusCode quota_status_;
409 UsageInfoEntries usage_info_; 410 UsageInfoEntries usage_info_;
410 std::string host_; 411 std::string host_;
411 StorageType type_; 412 StorageType type_;
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 EXPECT_EQ(predelete_foo_tmp - 2 - 1, usage()); 2028 EXPECT_EQ(predelete_foo_tmp - 2 - 1, usage());
2028 2029
2029 DeleteHostData("foo.com", kTemp, 2030 DeleteHostData("foo.com", kTemp,
2030 QuotaClient::kDatabase | QuotaClient::kIndexedDatabase); 2031 QuotaClient::kDatabase | QuotaClient::kIndexedDatabase);
2031 MessageLoop::current()->RunAllPending(); 2032 MessageLoop::current()->RunAllPending();
2032 GetHostUsage("foo.com", kTemp); 2033 GetHostUsage("foo.com", kTemp);
2033 MessageLoop::current()->RunAllPending(); 2034 MessageLoop::current()->RunAllPending();
2034 EXPECT_EQ(predelete_foo_tmp - 8 - 4 - 2 - 1, usage()); 2035 EXPECT_EQ(predelete_foo_tmp - 8 - 4 - 2 - 1, usage());
2035 } 2036 }
2036 } // namespace quota 2037 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/quota/quota_database_unittest.cc ('k') | webkit/quota/quota_temporary_storage_evictor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698