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

Side by Side Diff: chrome/browser/extensions/extension_function_test_utils.cc

Issue 10822030: Move ui_test_utils::RunMessageLoop to test_utils so that it can be reused by content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 "chrome/browser/extensions/extension_function_test_utils.h" 5 #include "chrome/browser/extensions/extension_function_test_utils.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 function->set_dispatcher(dispatcher.AsWeakPtr()); 217 function->set_dispatcher(dispatcher.AsWeakPtr());
218 218
219 function->set_profile(browser->profile()); 219 function->set_profile(browser->profile());
220 function->set_include_incognito(flags & INCLUDE_INCOGNITO); 220 function->set_include_incognito(flags & INCLUDE_INCOGNITO);
221 function->Run(); 221 function->Run();
222 222
223 // If the RunImpl of |function| didn't already call SendResponse, run the 223 // If the RunImpl of |function| didn't already call SendResponse, run the
224 // message loop until they do. 224 // message loop until they do.
225 if (!response_delegate.HasResponse()) { 225 if (!response_delegate.HasResponse()) {
226 response_delegate.set_should_post_quit(true); 226 response_delegate.set_should_post_quit(true);
227 ui_test_utils::RunMessageLoop(); 227 content::RunMessageLoop();
228 } 228 }
229 229
230 EXPECT_TRUE(response_delegate.HasResponse()); 230 EXPECT_TRUE(response_delegate.HasResponse());
231 return response_delegate.GetResponse(); 231 return response_delegate.GetResponse();
232 } 232 }
233 233
234 } // namespace extension_function_test_utils 234 } // namespace extension_function_test_utils
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.cc ('k') | chrome/browser/extensions/extension_test_message_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698