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

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

Issue 57783006: Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile (cc perftest). 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
« no previous file with comments | « content/common/cc_messages_perftest.cc ('k') | content/common/common_param_traits_unittest.cc » ('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 <algorithm> 9 #include <algorithm>
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 EXPECT_EQ(a.format, b.format); 192 EXPECT_EQ(a.format, b.format);
193 EXPECT_EQ(a.target, b.target); 193 EXPECT_EQ(a.target, b.target);
194 EXPECT_EQ(a.filter, b.filter); 194 EXPECT_EQ(a.filter, b.filter);
195 EXPECT_EQ(a.size.ToString(), b.size.ToString()); 195 EXPECT_EQ(a.size.ToString(), b.size.ToString());
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 IPC::Message msg(1, 2); 202 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
203 203
204 Transform arbitrary_matrix; 204 Transform arbitrary_matrix;
205 arbitrary_matrix.Scale(3, 3); 205 arbitrary_matrix.Scale(3, 3);
206 arbitrary_matrix.Translate(-5, 20); 206 arbitrary_matrix.Translate(-5, 20);
207 arbitrary_matrix.Rotate(15); 207 arbitrary_matrix.Rotate(15);
208 gfx::Rect arbitrary_rect1(-5, 9, 3, 15); 208 gfx::Rect arbitrary_rect1(-5, 9, 3, 15);
209 gfx::Rect arbitrary_rect1_inside_rect1(-4, 12, 2, 8); 209 gfx::Rect arbitrary_rect1_inside_rect1(-4, 12, 2, 8);
210 gfx::Rect arbitrary_rect2_inside_rect1(-5, 11, 1, 2); 210 gfx::Rect arbitrary_rect2_inside_rect1(-5, 11, 1, 2);
211 gfx::Rect arbitrary_rect2(40, 23, 11, 7); 211 gfx::Rect arbitrary_rect2(40, 23, 11, 7);
212 gfx::Rect arbitrary_rect1_inside_rect2(44, 23, 4, 2); 212 gfx::Rect arbitrary_rect1_inside_rect2(44, 23, 4, 2);
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 pass_cmp->quad_list[i]->shared_quad_state == 486 pass_cmp->quad_list[i]->shared_quad_state ==
487 pass_cmp->quad_list[i - 1]->shared_quad_state; 487 pass_cmp->quad_list[i - 1]->shared_quad_state;
488 bool same_shared_quad_state_out = 488 bool same_shared_quad_state_out =
489 pass_out->quad_list[i]->shared_quad_state == 489 pass_out->quad_list[i]->shared_quad_state ==
490 pass_out->quad_list[i - 1]->shared_quad_state; 490 pass_out->quad_list[i - 1]->shared_quad_state;
491 EXPECT_EQ(same_shared_quad_state_cmp, same_shared_quad_state_out); 491 EXPECT_EQ(same_shared_quad_state_cmp, same_shared_quad_state_out);
492 } 492 }
493 } 493 }
494 494
495 TEST_F(CCMessagesTest, Resources) { 495 TEST_F(CCMessagesTest, Resources) {
496 IPC::Message msg(1, 2); 496 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
497 gfx::Size arbitrary_size(757, 1281); 497 gfx::Size arbitrary_size(757, 1281);
498 unsigned int arbitrary_uint1 = 71234838; 498 unsigned int arbitrary_uint1 = 71234838;
499 unsigned int arbitrary_uint2 = 53589793; 499 unsigned int arbitrary_uint2 = 53589793;
500 500
501 GLbyte arbitrary_mailbox1[64] = { 501 GLbyte arbitrary_mailbox1[64] = {
502 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 502 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
503 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 503 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
504 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 504 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
505 1, 2, 3, 4 505 1, 2, 3, 4
506 }; 506 };
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 } 595 }
596 596
597 // Verify the largest DrawQuad type is RenderPassDrawQuad. If this ever 597 // Verify the largest DrawQuad type is RenderPassDrawQuad. If this ever
598 // changes, then the ReserveSizeForRenderPassWrite() method needs to be 598 // changes, then the ReserveSizeForRenderPassWrite() method needs to be
599 // updated as well to use the new largest quad. 599 // updated as well to use the new largest quad.
600 EXPECT_EQ(sizeof(RenderPassDrawQuad), largest); 600 EXPECT_EQ(sizeof(RenderPassDrawQuad), largest);
601 } 601 }
602 602
603 } // namespace 603 } // namespace
604 } // namespace content 604 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cc_messages_perftest.cc ('k') | content/common/common_param_traits_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698