| OLD | NEW |
| 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 "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
| 6 | 6 |
| 7 #include "app/sql/connection.h" | |
| 8 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 9 #include "base/scoped_temp_dir.h" | 8 #include "base/scoped_temp_dir.h" |
| 9 #include "sql/connection.h" |
| 10 #include "webkit/appcache/appcache_database.h" | 10 #include "webkit/appcache/appcache_database.h" |
| 11 #include "webkit/appcache/appcache_entry.h" | 11 #include "webkit/appcache/appcache_entry.h" |
| 12 | 12 |
| 13 namespace { | 13 namespace { |
| 14 | 14 |
| 15 const base::Time kZeroTime; | 15 const base::Time kZeroTime; |
| 16 | 16 |
| 17 class TestErrorDelegate : public sql::ErrorDelegate { | 17 class TestErrorDelegate : public sql::ErrorDelegate { |
| 18 public: | 18 public: |
| 19 virtual ~TestErrorDelegate() { } | 19 virtual ~TestErrorDelegate() { } |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 EXPECT_EQ(1U, cache_records.size()); | 607 EXPECT_EQ(1U, cache_records.size()); |
| 608 | 608 |
| 609 std::map<GURL, int64> usage_map; | 609 std::map<GURL, int64> usage_map; |
| 610 EXPECT_TRUE(db.GetAllOriginUsage(&usage_map)); | 610 EXPECT_TRUE(db.GetAllOriginUsage(&usage_map)); |
| 611 EXPECT_EQ(2U, usage_map.size()); | 611 EXPECT_EQ(2U, usage_map.size()); |
| 612 EXPECT_EQ(1100, usage_map[kOrigin]); | 612 EXPECT_EQ(1100, usage_map[kOrigin]); |
| 613 EXPECT_EQ(5000, usage_map[kOtherOrigin]); | 613 EXPECT_EQ(5000, usage_map[kOtherOrigin]); |
| 614 } | 614 } |
| 615 | 615 |
| 616 } // namespace appcache | 616 } // namespace appcache |
| OLD | NEW |