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

Side by Side Diff: ipc/ipc_sync_channel_unittest.cc

Issue 2863034: Up the warnings in ipc... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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
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 // Unit test for SyncChannel. 5 // Unit test for SyncChannel.
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 // sync call on another channel. 720 // sync call on another channel.
721 // The callstack should unwind correctly, i.e. the outermost call should 721 // The callstack should unwind correctly, i.e. the outermost call should
722 // complete first, and so on. 722 // complete first, and so on.
723 class QueuedReplyClient : public Worker { 723 class QueuedReplyClient : public Worker {
724 public: 724 public:
725 QueuedReplyClient(base::Thread* listener_thread, 725 QueuedReplyClient(base::Thread* listener_thread,
726 const std::string& channel_name, 726 const std::string& channel_name,
727 const std::string& expected_text, 727 const std::string& expected_text,
728 bool pump_during_send) 728 bool pump_during_send)
729 : Worker(channel_name, Channel::MODE_CLIENT), 729 : Worker(channel_name, Channel::MODE_CLIENT),
730 expected_text_(expected_text), 730 pump_during_send_(pump_during_send),
731 pump_during_send_(pump_during_send) { 731 expected_text_(expected_text) {
732 Worker::OverrideThread(listener_thread); 732 Worker::OverrideThread(listener_thread);
733 } 733 }
734 734
735 virtual void Run() { 735 virtual void Run() {
736 std::string response; 736 std::string response;
737 SyncMessage* msg = new SyncChannelNestedTestMsg_String(&response); 737 SyncMessage* msg = new SyncChannelNestedTestMsg_String(&response);
738 if (pump_during_send_) 738 if (pump_during_send_)
739 msg->EnableMessagePumping(); 739 msg->EnableMessagePumping();
740 bool result = Send(msg); 740 bool result = Send(msg);
741 DCHECK(result); 741 DCHECK(result);
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 1108
1109 } // namespace 1109 } // namespace
1110 1110
1111 // Tests basic synchronous call 1111 // Tests basic synchronous call
1112 TEST_F(IPCSyncChannelTest, SyncMessageFilter) { 1112 TEST_F(IPCSyncChannelTest, SyncMessageFilter) {
1113 std::vector<Worker*> workers; 1113 std::vector<Worker*> workers;
1114 workers.push_back(new SyncMessageFilterServer()); 1114 workers.push_back(new SyncMessageFilterServer());
1115 workers.push_back(new SimpleClient()); 1115 workers.push_back(new SimpleClient());
1116 RunTest(workers); 1116 RunTest(workers);
1117 } 1117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698