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

Side by Side Diff: chrome/browser/history/history_browsertest.cc

Issue 5870001: Last few NewRunnableMethod scoped_refptr params to fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_store_default_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <vector> 5 #include <vector>
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/browser_thread.h" 8 #include "chrome/browser/browser_thread.h"
9 #include "chrome/browser/history/history.h" 9 #include "chrome/browser/history/history.h"
10 #include "chrome/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 void WaitForHistoryBackendToRun() { 105 void WaitForHistoryBackendToRun() {
106 CancelableRequestConsumerTSimple<int> request_consumer; 106 CancelableRequestConsumerTSimple<int> request_consumer;
107 scoped_refptr<HistoryDBTask> task(new WaitForHistoryTask()); 107 scoped_refptr<HistoryDBTask> task(new WaitForHistoryTask());
108 HistoryService* history = GetHistoryService(); 108 HistoryService* history = GetHistoryService();
109 BrowserThread::PostTask(BrowserThread::UI, 109 BrowserThread::PostTask(BrowserThread::UI,
110 FROM_HERE, 110 FROM_HERE,
111 NewRunnableMethod(history, 111 NewRunnableMethod(history,
112 &HistoryService::ScheduleDBTask, 112 &HistoryService::ScheduleDBTask,
113 task.get(), 113 task,
114 &request_consumer)); 114 &request_consumer));
115 ui_test_utils::RunMessageLoop(); 115 ui_test_utils::RunMessageLoop();
116 } 116 }
117 117
118 void ExpectEmptyHistory() { 118 void ExpectEmptyHistory() {
119 std::vector<GURL> urls(GetHistoryContents()); 119 std::vector<GURL> urls(GetHistoryContents());
120 EXPECT_EQ(0U, urls.size()); 120 EXPECT_EQ(0U, urls.size());
121 } 121 }
122 }; 122 };
123 123
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 WaitForHistoryBackendToRun(); 219 WaitForHistoryBackendToRun();
220 220
221 { 221 {
222 std::vector<GURL> urls(GetHistoryContents()); 222 std::vector<GURL> urls(GetHistoryContents());
223 ASSERT_EQ(1U, urls.size()); 223 ASSERT_EQ(1U, urls.size());
224 EXPECT_EQ(GetTestUrl().spec(), urls[0].spec()); 224 EXPECT_EQ(GetTestUrl().spec(), urls[0].spec());
225 } 225 }
226 } 226 }
227 227
228 } // namespace 228 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_store_default_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698