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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/scoped_temp_dir.h" | 8 #include "base/scoped_temp_dir.h" |
9 #include "content/browser/appcache/chrome_appcache_service.h" | 9 #include "content/browser/appcache/chrome_appcache_service.h" |
10 #include "content/test/test_browser_thread.h" | 10 #include "content/test/test_browser_thread.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "webkit/appcache/appcache_database.h" | 12 #include "webkit/appcache/appcache_database.h" |
13 #include "webkit/appcache/appcache_storage_impl.h" | 13 #include "webkit/appcache/appcache_storage_impl.h" |
14 #include "webkit/appcache/appcache_test_helper.h" | 14 #include "webkit/appcache/appcache_test_helper.h" |
15 #include "webkit/quota/mock_special_storage_policy.h" | 15 #include "webkit/quota/mock_special_storage_policy.h" |
16 | 16 |
17 #include <set> | 17 #include <set> |
18 | 18 |
| 19 using content::BrowserThread; |
| 20 |
19 namespace { | 21 namespace { |
20 const FilePath::CharType kTestingAppCacheDirname[] = | 22 const FilePath::CharType kTestingAppCacheDirname[] = |
21 FILE_PATH_LITERAL("Application Cache"); | 23 FILE_PATH_LITERAL("Application Cache"); |
22 | 24 |
23 // Examples of a protected and an unprotected origin, to be used througout the | 25 // Examples of a protected and an unprotected origin, to be used througout the |
24 // test. | 26 // test. |
25 const char kProtectedManifest[] = "http://www.protected.com/cache.manifest"; | 27 const char kProtectedManifest[] = "http://www.protected.com/cache.manifest"; |
26 const char kNormalManifest[] = "http://www.normal.com/cache.manifest"; | 28 const char kNormalManifest[] = "http://www.normal.com/cache.manifest"; |
27 const char kSessionOnlyManifest[] = "http://www.sessiononly.com/cache.manifest"; | 29 const char kSessionOnlyManifest[] = "http://www.sessiononly.com/cache.manifest"; |
28 | 30 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 EXPECT_TRUE(origins.find(kNormalManifestURL.GetOrigin()) == origins.end()); | 181 EXPECT_TRUE(origins.find(kNormalManifestURL.GetOrigin()) == origins.end()); |
180 EXPECT_TRUE(origins.find(kSessionOnlyManifestURL.GetOrigin()) == | 182 EXPECT_TRUE(origins.find(kSessionOnlyManifestURL.GetOrigin()) == |
181 origins.end()); | 183 origins.end()); |
182 | 184 |
183 // Delete and let cleanup tasks run prior to returning. | 185 // Delete and let cleanup tasks run prior to returning. |
184 appcache_service = NULL; | 186 appcache_service = NULL; |
185 message_loop_.RunAllPending(); | 187 message_loop_.RunAllPending(); |
186 } | 188 } |
187 | 189 |
188 } // namespace appcache | 190 } // namespace appcache |
OLD | NEW |