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

Side by Side Diff: content/common/cc_messages_unittest.cc

Issue 12378053: Move Mailbox from cc to gpu, and its traits to gpu/ipc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios hate Created 7 years, 9 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/common/cc_messages.cc ('k') | content/content_tests.gypi » ('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/common/cc_messages.h" 5 #include "content/common/cc_messages.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "cc/compositor_frame.h" 9 #include "cc/compositor_frame.h"
10 #include "ipc/ipc_message.h" 10 #include "ipc/ipc_message.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0, 501 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 7, 5, 3, 1, 2, 4, 6, 8, 0,
502 0, 9, 8, 7 502 0, 9, 8, 7
503 }; 503 };
504 504
505 TransferableResource arbitrary_resource1; 505 TransferableResource arbitrary_resource1;
506 arbitrary_resource1.id = 2178312; 506 arbitrary_resource1.id = 2178312;
507 arbitrary_resource1.sync_point = arbitrary_uint1; 507 arbitrary_resource1.sync_point = arbitrary_uint1;
508 arbitrary_resource1.format = 7; 508 arbitrary_resource1.format = 7;
509 arbitrary_resource1.filter = 53; 509 arbitrary_resource1.filter = 53;
510 arbitrary_resource1.size = gfx::Size(37189, 123123); 510 arbitrary_resource1.size = gfx::Size(37189, 123123);
511 arbitrary_resource1.mailbox.setName(arbitrary_mailbox1); 511 arbitrary_resource1.mailbox.SetName(arbitrary_mailbox1);
512 512
513 TransferableResource arbitrary_resource2; 513 TransferableResource arbitrary_resource2;
514 arbitrary_resource2.id = 789132; 514 arbitrary_resource2.id = 789132;
515 arbitrary_resource1.sync_point = arbitrary_uint2; 515 arbitrary_resource1.sync_point = arbitrary_uint2;
516 arbitrary_resource2.format = 30; 516 arbitrary_resource2.format = 30;
517 arbitrary_resource1.filter = 47; 517 arbitrary_resource1.filter = 47;
518 arbitrary_resource2.size = gfx::Size(89123, 23789); 518 arbitrary_resource2.size = gfx::Size(89123, 23789);
519 arbitrary_resource2.mailbox.setName(arbitrary_mailbox2); 519 arbitrary_resource2.mailbox.SetName(arbitrary_mailbox2);
520 520
521 DelegatedFrameData frame_in; 521 DelegatedFrameData frame_in;
522 frame_in.resource_list.push_back(arbitrary_resource1); 522 frame_in.resource_list.push_back(arbitrary_resource1);
523 frame_in.resource_list.push_back(arbitrary_resource2); 523 frame_in.resource_list.push_back(arbitrary_resource2);
524 524
525 IPC::ParamTraits<DelegatedFrameData>::Write(&msg, frame_in); 525 IPC::ParamTraits<DelegatedFrameData>::Write(&msg, frame_in);
526 526
527 DelegatedFrameData frame_out; 527 DelegatedFrameData frame_out;
528 PickleIterator iter(msg); 528 PickleIterator iter(msg);
529 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, 529 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
530 &iter, &frame_out)); 530 &iter, &frame_out));
531 531
532 ASSERT_EQ(2u, frame_out.resource_list.size()); 532 ASSERT_EQ(2u, frame_out.resource_list.size());
533 Compare(arbitrary_resource1, frame_out.resource_list[0]); 533 Compare(arbitrary_resource1, frame_out.resource_list[0]);
534 Compare(arbitrary_resource2, frame_out.resource_list[1]); 534 Compare(arbitrary_resource2, frame_out.resource_list[1]);
535 } 535 }
536 536
537 } // namespace 537 } // namespace
538 } // namespace content 538 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698