Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: chrome/browser/browsing_data/browsing_data_database_helper_browsertest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "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/browsing_data_database_helper.h" 9 #include "chrome/browser/browsing_data/browsing_data_database_helper.h"
10 #include "chrome/browser/browsing_data/browsing_data_helper_browsertest.h" 10 #include "chrome/browser/browsing_data/browsing_data_helper_browsertest.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 : database_helper_(database_helper) { 66 : database_helper_(database_helper) {
67 DCHECK(database_helper_); 67 DCHECK(database_helper_);
68 } 68 }
69 69
70 void Callback(const std::list<BrowsingDataDatabaseHelper::DatabaseInfo>& 70 void Callback(const std::list<BrowsingDataDatabaseHelper::DatabaseInfo>&
71 database_info_list) { 71 database_info_list) {
72 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 72 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
73 ASSERT_EQ(1UL, database_info_list.size()); 73 ASSERT_EQ(1UL, database_info_list.size());
74 EXPECT_EQ(std::string(kTestIdentifier1), 74 EXPECT_EQ(std::string(kTestIdentifier1),
75 database_info_list.begin()->origin_identifier); 75 database_info_list.begin()->origin_identifier);
76 MessageLoop::current()->Quit(); 76 base::MessageLoop::current()->Quit();
77 } 77 }
78 78
79 private: 79 private:
80 BrowsingDataDatabaseHelper* database_helper_; 80 BrowsingDataDatabaseHelper* database_helper_;
81 }; 81 };
82 82
83 // Flaky on Win/Mac/Linux: http://crbug.com/92460 83 // Flaky on Win/Mac/Linux: http://crbug.com/92460
84 IN_PROC_BROWSER_TEST_F(BrowsingDataDatabaseHelperTest, DISABLED_FetchData) { 84 IN_PROC_BROWSER_TEST_F(BrowsingDataDatabaseHelperTest, DISABLED_FetchData) {
85 CreateDatabases(); 85 CreateDatabases();
86 scoped_refptr<BrowsingDataDatabaseHelper> database_helper( 86 scoped_refptr<BrowsingDataDatabaseHelper> database_helper(
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 base::Unretained(&callback))); 145 base::Unretained(&callback)));
146 146
147 std::list<BrowsingDataDatabaseHelper::DatabaseInfo> result = 147 std::list<BrowsingDataDatabaseHelper::DatabaseInfo> result =
148 callback.result(); 148 callback.result();
149 149
150 ASSERT_EQ(1u, result.size()); 150 ASSERT_EQ(1u, result.size());
151 EXPECT_STREQ(origin_str, result.begin()->origin_identifier.c_str()); 151 EXPECT_STREQ(origin_str, result.begin()->origin_identifier.c_str());
152 EXPECT_STREQ(db, result.begin()->database_name.c_str()); 152 EXPECT_STREQ(db, result.begin()->database_name.c_str());
153 } 153 }
154 } // namespace 154 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698