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

Side by Side Diff: chrome/common/ipc_sync_message_unittest.cc

Issue 21039: Revert my change to get the tree green. Not sure why the tests became flaky.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | « chrome/common/ipc_sync_message_unittest.h ('k') | chrome/common/plugin_messages.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 to make sure that the serialization of synchronous IPC messages 5 // Unit test to make sure that the serialization of synchronous IPC messages
6 // works. This ensures that the macros and templates were defined correctly. 6 // works. This ensures that the macros and templates were defined correctly.
7 // Doesn't test the IPC channel mechanism. 7 // Doesn't test the IPC channel mechanism.
8 8
9 #include <string.h> 9 #include <string.h>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "chrome/common/ipc_message.h" 12 #include "chrome/common/ipc_message.h"
13 #include "chrome/common/ipc_message_utils.h" 13 #include "chrome/common/ipc_message_utils.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 #define IPC_MESSAGE_MACROS_ENUMS
18 #include "chrome/common/ipc_sync_message_unittest.h"
17 19
18 #define MESSAGES_INTERNAL_FILE "chrome/common/ipc_sync_message_unittest.h" 20 // define the classes
19 #include "chrome/common/ipc_message_macros.h" 21 #define IPC_MESSAGE_MACROS_CLASSES
22 #include "chrome/common/ipc_sync_message_unittest.h"
23
20 24
21 static IPC::Message* g_reply; 25 static IPC::Message* g_reply;
22 26
23 class TestMessageReceiver { 27 class TestMessageReceiver {
24 public: 28 public:
25 29
26 void On_0_1(bool* out1) { 30 void On_0_1(bool* out1) {
27 *out1 = false; 31 *out1 = false;
28 } 32 }
29 33
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 244
241 bool1 = false; 245 bool1 = false;
242 Send(new Msg_R_3_2(0, "3_2", false, 2, &bool1, &int1)); 246 Send(new Msg_R_3_2(0, "3_2", false, 2, &bool1, &int1));
243 DCHECK(bool1 && int1 == 32); 247 DCHECK(bool1 && int1 == 32);
244 248
245 bool1 = true; 249 bool1 = true;
246 Send(new Msg_R_3_3(0, 3, "3_3", true, &string1, &int1, &bool1)); 250 Send(new Msg_R_3_3(0, 3, "3_3", true, &string1, &int1, &bool1));
247 DCHECK(string1 == "3_3" && int1 == 33 && !bool1); 251 DCHECK(string1 == "3_3" && int1 == 33 && !bool1);
248 } 252 }
249 253
OLDNEW
« no previous file with comments | « chrome/common/ipc_sync_message_unittest.h ('k') | chrome/common/plugin_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698