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

Side by Side Diff: chrome/common/ipc_fuzzing_tests.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/common.vcproj ('k') | chrome/common/ipc_logging.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 #include <stdio.h> 5 #include <stdio.h>
6 #include <iostream> 6 #include <iostream>
7 #include <string> 7 #include <string>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL); 89 IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL);
90 EXPECT_TRUE(m.WriteInt(0x71000000)); // This is the count of elements. 90 EXPECT_TRUE(m.WriteInt(0x71000000)); // This is the count of elements.
91 EXPECT_TRUE(m.WriteInt64(1)); 91 EXPECT_TRUE(m.WriteInt64(1));
92 EXPECT_TRUE(m.WriteInt64(2)); 92 EXPECT_TRUE(m.WriteInt64(2));
93 93
94 std::vector<int64> vec; 94 std::vector<int64> vec;
95 void* iter = 0; 95 void* iter = 0;
96 EXPECT_FALSE(ReadParam(&m, &iter, &vec)); 96 EXPECT_FALSE(ReadParam(&m, &iter, &vec));
97 } 97 }
98 98
99 // We don't actually use the messages defined in this fiel, but we do this 99 // Typically the ipc_message_macros files is included twice but here we only
100 // to get to the IPC macros. 100 // include it once in 'enum mode' because we want more control of the class
101 #define MESSAGES_INTERNAL_FILE "chrome/common/ipc_sync_message_unittest.h" 101 // definitions.
102 #define IPC_MESSAGE_MACROS_ENUMS
102 #include "chrome/common/ipc_message_macros.h" 103 #include "chrome/common/ipc_message_macros.h"
103 104
104 enum IPCMessageIds { 105 enum IPCMessageIds {
105 UNUSED_IPC_TYPE, 106 UNUSED_IPC_TYPE,
106 SERVER_FIRST_IPC_TYPE, // 1st Test message tag. 107 SERVER_FIRST_IPC_TYPE, // 1st Test message tag.
107 SERVER_SECOND_IPC_TYPE, // 2nd Test message tag. 108 SERVER_SECOND_IPC_TYPE, // 2nd Test message tag.
108 SERVER_THIRD_IPC_TYPE, // 3rd Test message tag. 109 SERVER_THIRD_IPC_TYPE, // 3rd Test message tag.
109 CLIENT_MALFORMED_IPC, // Sent to client if server detects bad message. 110 CLIENT_MALFORMED_IPC, // Sent to client if server detects bad message.
110 CLIENT_UNHANDLED_IPC // Sent to client if server detects unhanded IPC. 111 CLIENT_UNHANDLED_IPC // Sent to client if server detects unhanded IPC.
111 }; 112 };
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 IPC::Message::PRIORITY_NORMAL); 420 IPC::Message::PRIORITY_NORMAL);
420 msg->WriteInt(0x64); 421 msg->WriteInt(0x64);
421 msg->WriteInt(0x32); 422 msg->WriteInt(0x32);
422 EXPECT_FALSE(server.OnMessageReceived(*msg)); 423 EXPECT_FALSE(server.OnMessageReceived(*msg));
423 delete msg; 424 delete msg;
424 425
425 EXPECT_EQ(0, server.unhandled_msgs()); 426 EXPECT_EQ(0, server.unhandled_msgs());
426 #endif 427 #endif
427 } 428 }
428 429
OLDNEW
« no previous file with comments | « chrome/common/common.vcproj ('k') | chrome/common/ipc_logging.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698