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

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

Issue 35643005: Remove unused IPC::Message priority. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 1 month 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) 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 "base/command_line.h" 9 #include "base/command_line.h"
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 for (size_t i = 0; i < arraysize(a.mailbox.name); ++i) 196 for (size_t i = 0; i < arraysize(a.mailbox.name); ++i)
197 EXPECT_EQ(a.mailbox.name[i], b.mailbox.name[i]); 197 EXPECT_EQ(a.mailbox.name[i], b.mailbox.name[i]);
198 } 198 }
199 }; 199 };
200 200
201 TEST_F(CCMessagesTest, AllQuads) { 201 TEST_F(CCMessagesTest, AllQuads) {
202 CommandLine& command_line = *CommandLine::ForCurrentProcess(); 202 CommandLine& command_line = *CommandLine::ForCurrentProcess();
203 if (!command_line.HasSwitch(switches::kAllowFiltersOverIPC)) 203 if (!command_line.HasSwitch(switches::kAllowFiltersOverIPC))
204 command_line.AppendSwitch(switches::kAllowFiltersOverIPC); 204 command_line.AppendSwitch(switches::kAllowFiltersOverIPC);
205 205
206 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); 206 IPC::Message msg(1, 2);
207 207
208 Transform arbitrary_matrix; 208 Transform arbitrary_matrix;
209 arbitrary_matrix.Scale(3, 3); 209 arbitrary_matrix.Scale(3, 3);
210 arbitrary_matrix.Translate(-5, 20); 210 arbitrary_matrix.Translate(-5, 20);
211 arbitrary_matrix.Rotate(15); 211 arbitrary_matrix.Rotate(15);
212 gfx::Rect arbitrary_rect1(-5, 9, 3, 15); 212 gfx::Rect arbitrary_rect1(-5, 9, 3, 15);
213 gfx::Rect arbitrary_rect1_inside_rect1(-4, 12, 2, 8); 213 gfx::Rect arbitrary_rect1_inside_rect1(-4, 12, 2, 8);
214 gfx::Rect arbitrary_rect2_inside_rect1(-5, 11, 1, 2); 214 gfx::Rect arbitrary_rect2_inside_rect1(-5, 11, 1, 2);
215 gfx::Rect arbitrary_rect2(40, 23, 11, 7); 215 gfx::Rect arbitrary_rect2(40, 23, 11, 7);
216 gfx::Rect arbitrary_rect1_inside_rect2(44, 23, 4, 2); 216 gfx::Rect arbitrary_rect1_inside_rect2(44, 23, 4, 2);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 pass_cmp->quad_list[i]->shared_quad_state == 490 pass_cmp->quad_list[i]->shared_quad_state ==
491 pass_cmp->quad_list[i - 1]->shared_quad_state; 491 pass_cmp->quad_list[i - 1]->shared_quad_state;
492 bool same_shared_quad_state_out = 492 bool same_shared_quad_state_out =
493 pass_out->quad_list[i]->shared_quad_state == 493 pass_out->quad_list[i]->shared_quad_state ==
494 pass_out->quad_list[i - 1]->shared_quad_state; 494 pass_out->quad_list[i - 1]->shared_quad_state;
495 EXPECT_EQ(same_shared_quad_state_cmp, same_shared_quad_state_out); 495 EXPECT_EQ(same_shared_quad_state_cmp, same_shared_quad_state_out);
496 } 496 }
497 } 497 }
498 498
499 TEST_F(CCMessagesTest, Resources) { 499 TEST_F(CCMessagesTest, Resources) {
500 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); 500 IPC::Message msg(1, 2);
501 gfx::Size arbitrary_size(757, 1281); 501 gfx::Size arbitrary_size(757, 1281);
502 unsigned int arbitrary_uint1 = 71234838; 502 unsigned int arbitrary_uint1 = 71234838;
503 unsigned int arbitrary_uint2 = 53589793; 503 unsigned int arbitrary_uint2 = 53589793;
504 504
505 GLbyte arbitrary_mailbox1[64] = { 505 GLbyte arbitrary_mailbox1[64] = {
506 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 506 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
507 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 507 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
508 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 508 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
509 1, 2, 3, 4 509 1, 2, 3, 4
510 }; 510 };
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg, 550 EXPECT_TRUE(IPC::ParamTraits<DelegatedFrameData>::Read(&msg,
551 &iter, &frame_out)); 551 &iter, &frame_out));
552 552
553 ASSERT_EQ(2u, frame_out.resource_list.size()); 553 ASSERT_EQ(2u, frame_out.resource_list.size());
554 Compare(arbitrary_resource1, frame_out.resource_list[0]); 554 Compare(arbitrary_resource1, frame_out.resource_list[0]);
555 Compare(arbitrary_resource2, frame_out.resource_list[1]); 555 Compare(arbitrary_resource2, frame_out.resource_list[1]);
556 } 556 }
557 557
558 } // namespace 558 } // namespace
559 } // namespace content 559 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_unittest.cc ('k') | content/common/common_param_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698