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

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

Issue 343003003: Move IPC traits for SkBitmap, gfx_geometry into ui/gfx/ipc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some missing includes & gfx_ipc deps Created 6 years, 5 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.h ('k') | content/common/frame_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) 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 <string.h> 5 #include <string.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "content/public/common/common_param_traits.h" 10 #include "content/public/common/common_param_traits.h"
11 #include "ipc/ipc_message.h" 11 #include "ipc/ipc_message.h"
12 #include "ipc/ipc_message_utils.h" 12 #include "ipc/ipc_message_utils.h"
13 #include "net/base/host_port_pair.h" 13 #include "net/base/host_port_pair.h"
14 #include "printing/backend/print_backend.h" 14 #include "printing/backend/print_backend.h"
15 #include "printing/page_range.h" 15 #include "printing/page_range.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "third_party/skia/include/core/SkBitmap.h" 17 #include "third_party/skia/include/core/SkBitmap.h"
18 #include "ui/gfx/ipc/gfx_param_traits.h"
18 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
19 #include "url/gurl.h" 20 #include "url/gurl.h"
20 21
21 // Tests that serialize/deserialize correctly understand each other 22 // Tests that serialize/deserialize correctly understand each other
22 TEST(IPCMessageTest, Serialize) { 23 TEST(IPCMessageTest, Serialize) {
23 const char* serialize_cases[] = { 24 const char* serialize_cases[] = {
24 "http://www.google.com/", 25 "http://www.google.com/",
25 "http://user:pass@host.com:888/foo;bar?baz#nop", 26 "http://user:pass@host.com:888/foo;bar?baz#nop",
26 }; 27 };
27 28
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 185
185 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL); 186 IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
186 IPC::ParamTraits<net::HostPortPair>::Write(&msg, input); 187 IPC::ParamTraits<net::HostPortPair>::Write(&msg, input);
187 188
188 net::HostPortPair output; 189 net::HostPortPair output;
189 PickleIterator iter(msg); 190 PickleIterator iter(msg);
190 EXPECT_TRUE(IPC::ParamTraits<net::HostPortPair>::Read(&msg, &iter, &output)); 191 EXPECT_TRUE(IPC::ParamTraits<net::HostPortPair>::Read(&msg, &iter, &output));
191 EXPECT_EQ(input.host(), output.host()); 192 EXPECT_EQ(input.host(), output.host());
192 EXPECT_EQ(input.port(), output.port()); 193 EXPECT_EQ(input.port(), output.port());
193 } 194 }
OLDNEW
« no previous file with comments | « content/common/cc_messages.h ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698