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

Side by Side Diff: content/public/test/browser_test_utils.cc

Issue 16831021: Convert asynchronous closure test in cr.ui framework to a browser test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 "content/public/test/browser_test_utils.h" 5 #include "content/public/test/browser_test_utils.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 bool DOMMessageQueue::WaitForMessage(std::string* message) { 497 bool DOMMessageQueue::WaitForMessage(std::string* message) {
498 if (message_queue_.empty()) { 498 if (message_queue_.empty()) {
499 waiting_for_message_ = true; 499 waiting_for_message_ = true;
500 // This will be quit when a new message comes in. 500 // This will be quit when a new message comes in.
501 message_loop_runner_ = new MessageLoopRunner; 501 message_loop_runner_ = new MessageLoopRunner;
502 message_loop_runner_->Run(); 502 message_loop_runner_->Run();
503 } 503 }
504 // The queue should not be empty, unless we were quit because of a timeout. 504 // The queue should not be empty, unless we were quit because of a timeout.
505 if (message_queue_.empty()) 505 if (message_queue_.empty())
506 return false; 506 return false;
507 if (message) 507 if (message) {
508 *message = message_queue_.front(); 508 *message = message_queue_.front();
509 message_queue_.pop();
sky 2013/06/20 23:26:26 Should the pop happen regardless of message being
kevers 2013/06/21 13:45:40 Good catch. Fixed.
510 }
509 return true; 511 return true;
510 } 512 }
511 513
512 } // namespace content 514 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698