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

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

Issue 18339006: Rename RenderViewGone IPC/methods to better reflect reality (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for reviews by creis@ and palmer@. Created 7 years, 5 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
« no previous file with comments | « content/public/browser/web_contents_observer.h ('k') | content/shell/webkit_test_controller.h » ('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) 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const NotificationSource& source, 51 const NotificationSource& source,
52 const NotificationDetails& details) OVERRIDE { 52 const NotificationDetails& details) OVERRIDE {
53 DCHECK(type == NOTIFICATION_DOM_OPERATION_RESPONSE); 53 DCHECK(type == NOTIFICATION_DOM_OPERATION_RESPONSE);
54 Details<DomOperationNotificationDetails> dom_op_details(details); 54 Details<DomOperationNotificationDetails> dom_op_details(details);
55 response_ = dom_op_details->json; 55 response_ = dom_op_details->json;
56 did_respond_ = true; 56 did_respond_ = true;
57 message_loop_runner_->Quit(); 57 message_loop_runner_->Quit();
58 } 58 }
59 59
60 // Overridden from WebContentsObserver: 60 // Overridden from WebContentsObserver:
61 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE { 61 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE {
62 message_loop_runner_->Quit(); 62 message_loop_runner_->Quit();
63 } 63 }
64 64
65 bool WaitAndGetResponse(std::string* response) WARN_UNUSED_RESULT { 65 bool WaitAndGetResponse(std::string* response) WARN_UNUSED_RESULT {
66 message_loop_runner_->Run(); 66 message_loop_runner_->Run();
67 *response = response_; 67 *response = response_;
68 return did_respond_; 68 return did_respond_;
69 } 69 }
70 70
71 private: 71 private:
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(); 509 message_queue_.pop();
510 return true; 510 return true;
511 } 511 }
512 512
513 } // namespace content 513 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_observer.h ('k') | content/shell/webkit_test_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698