OLD | NEW |
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 "content/browser/storage_partition_impl_map.h" | 5 #include "content/browser/storage_partition_impl_map.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "content/public/test/test_browser_context.h" | 9 #include "content/public/test/test_browser_context.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 // Test that the Less comparison function is implemented properly to uniquely | 14 // Test that the Less comparison function is implemented properly to uniquely |
15 // identify storage partitions used as keys in a std::map. | 15 // identify storage partitions used as keys in a std::map. |
16 TEST(StoragePartitionConfigTest, OperatorLess) { | 16 TEST(StoragePartitionConfigTest, OperatorLess) { |
17 StoragePartitionImplMap::StoragePartitionConfig c1( | 17 StoragePartitionImplMap::StoragePartitionConfig c1( |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 base::RunLoop run_loop; | 83 base::RunLoop run_loop; |
84 storage_partition_impl_map.GarbageCollect( | 84 storage_partition_impl_map.GarbageCollect( |
85 active_paths.Pass(), run_loop.QuitClosure()); | 85 active_paths.Pass(), run_loop.QuitClosure()); |
86 run_loop.Run(); | 86 run_loop.Run(); |
87 | 87 |
88 EXPECT_TRUE(base::PathExists(active_path)); | 88 EXPECT_TRUE(base::PathExists(active_path)); |
89 EXPECT_FALSE(base::PathExists(inactive_path)); | 89 EXPECT_FALSE(base::PathExists(inactive_path)); |
90 } | 90 } |
91 | 91 |
92 } // namespace content | 92 } // namespace content |
OLD | NEW |