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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browsing_data_file_system_helper.h" | 10 #include "chrome/browser/browsing_data_file_system_helper.h" |
11 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
12 #include "content/test/test_browser_thread.h" | 12 #include "content/test/test_browser_thread.h" |
13 #include "webkit/fileapi/file_system_context.h" | 13 #include "webkit/fileapi/file_system_context.h" |
14 #include "webkit/fileapi/file_system_path_manager.h" | 14 #include "webkit/fileapi/file_system_path_manager.h" |
15 #include "webkit/fileapi/file_system_types.h" | 15 #include "webkit/fileapi/file_system_types.h" |
16 #include "webkit/fileapi/file_system_usage_cache.h" | 16 #include "webkit/fileapi/file_system_usage_cache.h" |
17 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 17 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
18 | 18 |
| 19 using content::BrowserThread; |
| 20 |
19 namespace { | 21 namespace { |
20 | 22 |
21 // Shorter names for fileapi::* constants. | 23 // Shorter names for fileapi::* constants. |
22 const fileapi::FileSystemType kTemporary = fileapi::kFileSystemTypeTemporary; | 24 const fileapi::FileSystemType kTemporary = fileapi::kFileSystemTypeTemporary; |
23 const fileapi::FileSystemType kPersistent = fileapi::kFileSystemTypePersistent; | 25 const fileapi::FileSystemType kPersistent = fileapi::kFileSystemTypePersistent; |
24 | 26 |
25 // We'll use these three distinct origins for testing, both as strings and as | 27 // We'll use these three distinct origins for testing, both as strings and as |
26 // GURLs in appropriate contexts. | 28 // GURLs in appropriate contexts. |
27 const char kTestOrigin1[] = "http://host1:1/"; | 29 const char kTestOrigin1[] = "http://host1:1/"; |
28 const char kTestOrigin2[] = "http://host2:2/"; | 30 const char kTestOrigin2[] = "http://host2:2/"; |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 info++; | 280 info++; |
279 EXPECT_EQ(kOrigin2, info->origin); | 281 EXPECT_EQ(kOrigin2, info->origin); |
280 EXPECT_FALSE(info->has_persistent); | 282 EXPECT_FALSE(info->has_persistent); |
281 EXPECT_TRUE(info->has_temporary); | 283 EXPECT_TRUE(info->has_temporary); |
282 EXPECT_EQ(0, info->usage_persistent); | 284 EXPECT_EQ(0, info->usage_persistent); |
283 EXPECT_EQ(100, info->usage_temporary); | 285 EXPECT_EQ(100, info->usage_temporary); |
284 } | 286 } |
285 | 287 |
286 } // namespace | 288 } // namespace |
287 | 289 |
OLD | NEW |