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/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
7 #include "chrome/browser/browsing_data_database_helper.h" | 7 #include "chrome/browser/browsing_data_database_helper.h" |
8 #include "chrome/browser/browsing_data_helper_browsertest.h" | 8 #include "chrome/browser/browsing_data_helper_browsertest.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 ASSERT_EQ(1UL, database_info_list.size()); | 65 ASSERT_EQ(1UL, database_info_list.size()); |
66 EXPECT_EQ(std::string(kTestIdentifier1), | 66 EXPECT_EQ(std::string(kTestIdentifier1), |
67 database_info_list.at(0).origin_identifier); | 67 database_info_list.at(0).origin_identifier); |
68 MessageLoop::current()->Quit(); | 68 MessageLoop::current()->Quit(); |
69 } | 69 } |
70 | 70 |
71 private: | 71 private: |
72 BrowsingDataDatabaseHelper* database_helper_; | 72 BrowsingDataDatabaseHelper* database_helper_; |
73 }; | 73 }; |
74 | 74 |
75 IN_PROC_BROWSER_TEST_F(BrowsingDataDatabaseHelperTest, FetchData) { | 75 // Flaky on Win/Mac/Linux: http://crbug.com/92460 |
| 76 IN_PROC_BROWSER_TEST_F(BrowsingDataDatabaseHelperTest, DISABLED_FetchData) { |
76 CreateDatabases(); | 77 CreateDatabases(); |
77 scoped_refptr<BrowsingDataDatabaseHelper> database_helper( | 78 scoped_refptr<BrowsingDataDatabaseHelper> database_helper( |
78 new BrowsingDataDatabaseHelper(browser()->profile())); | 79 new BrowsingDataDatabaseHelper(browser()->profile())); |
79 StopTestOnCallback stop_test_on_callback(database_helper); | 80 StopTestOnCallback stop_test_on_callback(database_helper); |
80 database_helper->StartFetching( | 81 database_helper->StartFetching( |
81 NewCallback(&stop_test_on_callback, &StopTestOnCallback::Callback)); | 82 NewCallback(&stop_test_on_callback, &StopTestOnCallback::Callback)); |
82 // Blocks until StopTestOnCallback::Callback is notified. | 83 // Blocks until StopTestOnCallback::Callback is notified. |
83 ui_test_utils::RunMessageLoop(); | 84 ui_test_utils::RunMessageLoop(); |
84 } | 85 } |
85 | 86 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 NewCallback(&callback, &TestCompletionCallback::callback)); | 130 NewCallback(&callback, &TestCompletionCallback::callback)); |
130 | 131 |
131 std::vector<BrowsingDataDatabaseHelper::DatabaseInfo> result = | 132 std::vector<BrowsingDataDatabaseHelper::DatabaseInfo> result = |
132 callback.result(); | 133 callback.result(); |
133 | 134 |
134 ASSERT_EQ(1u, result.size()); | 135 ASSERT_EQ(1u, result.size()); |
135 EXPECT_STREQ(origin_str, result[0].origin_identifier.c_str()); | 136 EXPECT_STREQ(origin_str, result[0].origin_identifier.c_str()); |
136 EXPECT_STREQ(db, result[0].database_name.c_str()); | 137 EXPECT_STREQ(db, result[0].database_name.c_str()); |
137 } | 138 } |
138 } // namespace | 139 } // namespace |
OLD | NEW |