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 "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" | 5 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/files/file_enumerator.h" | 13 #include "base/files/file_enumerator.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/test/thread_test_helper.h" | 18 #include "base/test/thread_test_helper.h" |
19 #include "base/threading/sequenced_worker_pool.h" | 19 #include "base/threading/sequenced_worker_pool.h" |
20 #include "chrome/browser/browsing_data/browsing_data_helper_browsertest.h" | 20 #include "chrome/browser/browsing_data/browsing_data_helper_browsertest.h" |
21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/ui/browser.h" | 22 #include "chrome/browser/ui/browser.h" |
23 #include "chrome/test/base/in_process_browser_test.h" | 23 #include "chrome/test/base/in_process_browser_test.h" |
24 #include "chrome/test/base/ui_test_utils.h" | |
25 #include "content/public/browser/dom_storage_context.h" | 24 #include "content/public/browser/dom_storage_context.h" |
26 #include "content/public/test/test_utils.h" | 25 #include "content/public/test/test_utils.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
28 | 27 |
29 using content::BrowserContext; | 28 using content::BrowserContext; |
30 using content::BrowserThread; | 29 using content::BrowserThread; |
31 using content::DOMStorageContext; | 30 using content::DOMStorageContext; |
32 | 31 |
33 namespace { | 32 namespace { |
34 typedef | 33 typedef |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 base::Bind(&TestCompletionCallback::callback, | 183 base::Bind(&TestCompletionCallback::callback, |
185 base::Unretained(&callback))); | 184 base::Unretained(&callback))); |
186 | 185 |
187 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo> result = | 186 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo> result = |
188 callback.result(); | 187 callback.result(); |
189 | 188 |
190 ASSERT_EQ(1u, result.size()); | 189 ASSERT_EQ(1u, result.size()); |
191 EXPECT_EQ(origin, result.begin()->origin_url); | 190 EXPECT_EQ(origin, result.begin()->origin_url); |
192 } | 191 } |
193 } // namespace | 192 } // namespace |
OLD | NEW |