| 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" | 7 #include "app/sql/connection.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/memory/scoped_temp_dir.h" | 9 #include "base/scoped_temp_dir.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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 EXPECT_EQ(5000, db.GetOriginUsage(kOtherOrigin)); | 602 EXPECT_EQ(5000, db.GetOriginUsage(kOtherOrigin)); |
| 603 | 603 |
| 604 EXPECT_TRUE(db.FindCachesForOrigin(kOrigin, &cache_records)); | 604 EXPECT_TRUE(db.FindCachesForOrigin(kOrigin, &cache_records)); |
| 605 EXPECT_EQ(2U, cache_records.size()); | 605 EXPECT_EQ(2U, cache_records.size()); |
| 606 cache_records.clear(); | 606 cache_records.clear(); |
| 607 EXPECT_TRUE(db.FindCachesForOrigin(kOtherOrigin, &cache_records)); | 607 EXPECT_TRUE(db.FindCachesForOrigin(kOtherOrigin, &cache_records)); |
| 608 EXPECT_EQ(1U, cache_records.size()); | 608 EXPECT_EQ(1U, cache_records.size()); |
| 609 } | 609 } |
| 610 | 610 |
| 611 } // namespace appcache | 611 } // namespace appcache |
| OLD | NEW |