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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/browsing_data_database_helper.h" | 9 #include "chrome/browser/browsing_data_database_helper.h" |
10 #include "chrome/browser/browsing_data_helper_browsertest.h" | 10 #include "chrome/browser/browsing_data_helper_browsertest.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/test/base/in_process_browser_test.h" | 13 #include "chrome/test/base/in_process_browser_test.h" |
14 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
15 #include "content/test/test_browser_thread.h" | 15 #include "content/test/test_browser_thread.h" |
16 | 16 |
| 17 using content::BrowserThread; |
| 18 |
17 namespace { | 19 namespace { |
18 typedef BrowsingDataHelperCallback<BrowsingDataDatabaseHelper::DatabaseInfo> | 20 typedef BrowsingDataHelperCallback<BrowsingDataDatabaseHelper::DatabaseInfo> |
19 TestCompletionCallback; | 21 TestCompletionCallback; |
20 | 22 |
21 const char kTestIdentifier1[] = "http_www.google.com_0"; | 23 const char kTestIdentifier1[] = "http_www.google.com_0"; |
22 | 24 |
23 const char kTestIdentifierExtension[] = | 25 const char kTestIdentifierExtension[] = |
24 "chrome-extension_behllobkkfkfnphdnhnkndlbkcpglgmj_0"; | 26 "chrome-extension_behllobkkfkfnphdnhnkndlbkcpglgmj_0"; |
25 | 27 |
26 class BrowsingDataDatabaseHelperTest : public InProcessBrowserTest { | 28 class BrowsingDataDatabaseHelperTest : public InProcessBrowserTest { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 base::Unretained(&callback))); | 141 base::Unretained(&callback))); |
140 | 142 |
141 std::list<BrowsingDataDatabaseHelper::DatabaseInfo> result = | 143 std::list<BrowsingDataDatabaseHelper::DatabaseInfo> result = |
142 callback.result(); | 144 callback.result(); |
143 | 145 |
144 ASSERT_EQ(1u, result.size()); | 146 ASSERT_EQ(1u, result.size()); |
145 EXPECT_STREQ(origin_str, result.begin()->origin_identifier.c_str()); | 147 EXPECT_STREQ(origin_str, result.begin()->origin_identifier.c_str()); |
146 EXPECT_STREQ(db, result.begin()->database_name.c_str()); | 148 EXPECT_STREQ(db, result.begin()->database_name.c_str()); |
147 } | 149 } |
148 } // namespace | 150 } // namespace |
OLD | NEW |