OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 1472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 } | 1483 } |
1484 | 1484 |
1485 DumpOriginInfoTable(); | 1485 DumpOriginInfoTable(); |
1486 base::RunLoop().RunUntilIdle(); | 1486 base::RunLoop().RunUntilIdle(); |
1487 | 1487 |
1488 bool found_origin_in_database = false; | 1488 bool found_origin_in_database = false; |
1489 typedef OriginInfoTableEntries::const_iterator iterator; | 1489 typedef OriginInfoTableEntries::const_iterator iterator; |
1490 for (iterator itr(origin_info_entries().begin()), | 1490 for (iterator itr(origin_info_entries().begin()), |
1491 end(origin_info_entries().end()); | 1491 end(origin_info_entries().end()); |
1492 itr != end; ++itr) { | 1492 itr != end; ++itr) { |
1493 if (itr->type == kTemp && | 1493 if (itr->type == kTemp && itr->origin == "http://foo.com/") { |
1494 GURL("http://foo.com/") == itr->origin) { | |
1495 found_origin_in_database = true; | 1494 found_origin_in_database = true; |
1496 break; | 1495 break; |
1497 } | 1496 } |
1498 } | 1497 } |
1499 // The origin "http://foo.com/" should be in the database. | 1498 // The origin "http://foo.com/" should be in the database. |
1500 EXPECT_TRUE(found_origin_in_database); | 1499 EXPECT_TRUE(found_origin_in_database); |
1501 | 1500 |
1502 for (size_t i = 0; i < kNumberOfTemporaryOrigins - 1; ++i) { | 1501 for (size_t i = 0; i < kNumberOfTemporaryOrigins - 1; ++i) { |
1503 GetEvictionOrigin(kTemp); | 1502 GetEvictionOrigin(kTemp); |
1504 base::RunLoop().RunUntilIdle(); | 1503 base::RunLoop().RunUntilIdle(); |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2302 base::FilePath tmp_dir; | 2301 base::FilePath tmp_dir; |
2303 ASSERT_TRUE(base::GetTempDir(&tmp_dir)); | 2302 ASSERT_TRUE(base::GetTempDir(&tmp_dir)); |
2304 uint64_t available_space = 0; | 2303 uint64_t available_space = 0; |
2305 uint64_t total_size = 0; | 2304 uint64_t total_size = 0; |
2306 EXPECT_TRUE(GetVolumeInfo(tmp_dir, &available_space, &total_size)); | 2305 EXPECT_TRUE(GetVolumeInfo(tmp_dir, &available_space, &total_size)); |
2307 EXPECT_GT(available_space, 0u) << tmp_dir.value(); | 2306 EXPECT_GT(available_space, 0u) << tmp_dir.value(); |
2308 EXPECT_GT(total_size, 0u) << tmp_dir.value(); | 2307 EXPECT_GT(total_size, 0u) << tmp_dir.value(); |
2309 } | 2308 } |
2310 | 2309 |
2311 } // namespace content | 2310 } // namespace content |
OLD | NEW |