| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 6 #include "chrome/browser/browsing_data_database_helper.h" | 7 #include "chrome/browser/browsing_data_database_helper.h" |
| 8 #include "chrome/browser/chrome_thread.h" |
| 7 #include "chrome/test/in_process_browser_test.h" | 9 #include "chrome/test/in_process_browser_test.h" |
| 8 #include "chrome/test/testing_profile.h" | 10 #include "chrome/test/testing_profile.h" |
| 9 #include "chrome/test/ui_test_utils.h" | 11 #include "chrome/test/ui_test_utils.h" |
| 10 | 12 |
| 11 static const char kTestIdentifier1[] = "http_www.google.com_0"; | 13 static const char kTestIdentifier1[] = "http_www.google.com_0"; |
| 12 | 14 |
| 13 static const char kTestIdentifierExtension[] = | 15 static const char kTestIdentifierExtension[] = |
| 14 "chrome-extension_behllobkkfkfnphdnhnkndlbkcpglgmj_0"; | 16 "chrome-extension_behllobkkfkfnphdnhnkndlbkcpglgmj_0"; |
| 15 | 17 |
| 16 class BrowsingDataDatabaseHelperTest : public InProcessBrowserTest { | 18 class BrowsingDataDatabaseHelperTest : public InProcessBrowserTest { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 IN_PROC_BROWSER_TEST_F(BrowsingDataDatabaseHelperTest, FetchData) { | 74 IN_PROC_BROWSER_TEST_F(BrowsingDataDatabaseHelperTest, FetchData) { |
| 73 CreateDatabases(); | 75 CreateDatabases(); |
| 74 scoped_refptr<BrowsingDataDatabaseHelper> database_helper( | 76 scoped_refptr<BrowsingDataDatabaseHelper> database_helper( |
| 75 new BrowsingDataDatabaseHelper(&testing_profile_)); | 77 new BrowsingDataDatabaseHelper(&testing_profile_)); |
| 76 StopTestOnCallback stop_test_on_callback(database_helper); | 78 StopTestOnCallback stop_test_on_callback(database_helper); |
| 77 database_helper->StartFetching( | 79 database_helper->StartFetching( |
| 78 NewCallback(&stop_test_on_callback, &StopTestOnCallback::Callback)); | 80 NewCallback(&stop_test_on_callback, &StopTestOnCallback::Callback)); |
| 79 // Blocks until StopTestOnCallback::Callback is notified. | 81 // Blocks until StopTestOnCallback::Callback is notified. |
| 80 ui_test_utils::RunMessageLoop(); | 82 ui_test_utils::RunMessageLoop(); |
| 81 } | 83 } |
| OLD | NEW |