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

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

Issue 1395103003: Don't use base::MessageLoop::{Quit,QuitClosure} in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 : database_helper_(database_helper) { 65 : database_helper_(database_helper) {
66 DCHECK(database_helper_); 66 DCHECK(database_helper_);
67 } 67 }
68 68
69 void Callback(const std::list<BrowsingDataDatabaseHelper::DatabaseInfo>& 69 void Callback(const std::list<BrowsingDataDatabaseHelper::DatabaseInfo>&
70 database_info_list) { 70 database_info_list) {
71 DCHECK_CURRENTLY_ON(BrowserThread::UI); 71 DCHECK_CURRENTLY_ON(BrowserThread::UI);
72 ASSERT_EQ(1UL, database_info_list.size()); 72 ASSERT_EQ(1UL, database_info_list.size());
73 EXPECT_EQ(std::string(kTestIdentifier1), 73 EXPECT_EQ(std::string(kTestIdentifier1),
74 database_info_list.begin()->identifier.ToString()); 74 database_info_list.begin()->identifier.ToString());
75 base::MessageLoop::current()->Quit(); 75 base::MessageLoop::current()->QuitWhenIdle();
76 } 76 }
77 77
78 private: 78 private:
79 BrowsingDataDatabaseHelper* database_helper_; 79 BrowsingDataDatabaseHelper* database_helper_;
80 }; 80 };
81 81
82 // Flaky on Win/Mac/Linux: http://crbug.com/92460 82 // Flaky on Win/Mac/Linux: http://crbug.com/92460
83 IN_PROC_BROWSER_TEST_F(BrowsingDataDatabaseHelperTest, DISABLED_FetchData) { 83 IN_PROC_BROWSER_TEST_F(BrowsingDataDatabaseHelperTest, DISABLED_FetchData) {
84 CreateDatabases(); 84 CreateDatabases();
85 scoped_refptr<BrowsingDataDatabaseHelper> database_helper( 85 scoped_refptr<BrowsingDataDatabaseHelper> database_helper(
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 base::Unretained(&callback))); 143 base::Unretained(&callback)));
144 144
145 std::list<BrowsingDataDatabaseHelper::DatabaseInfo> result = 145 std::list<BrowsingDataDatabaseHelper::DatabaseInfo> result =
146 callback.result(); 146 callback.result();
147 147
148 ASSERT_EQ(1u, result.size()); 148 ASSERT_EQ(1u, result.size());
149 EXPECT_EQ(origin_str, result.begin()->identifier.ToString()); 149 EXPECT_EQ(origin_str, result.begin()->identifier.ToString());
150 EXPECT_STREQ(db, result.begin()->database_name.c_str()); 150 EXPECT_STREQ(db, result.begin()->database_name.c_str());
151 } 151 }
152 } // namespace 152 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/browsing_data/browsing_data_file_system_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698