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

Unified Diff: base/pickle_unittest.cc

Issue 6488010: Propagate the remote socket address to URLRequest and to ViewHostMsg_FrameNavigate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address eroman's comments Created 9 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 side-by-side diff with in-line comments
Download patch
Index: base/pickle_unittest.cc
diff --git a/base/pickle_unittest.cc b/base/pickle_unittest.cc
index 39eaa1bb7936525d2ad7d685f21f09df449b3c69..51330c7b4acd942c5f6647b49bcb83db791e378f 100644
--- a/base/pickle_unittest.cc
+++ b/base/pickle_unittest.cc
@@ -19,6 +19,7 @@ const char testdata[] = "AAA\0BBB\0";
const int testdatalen = arraysize(testdata) - 1;
const bool testbool1 = false;
const bool testbool2 = true;
+const uint16 testuint16 = 32123;
// checks that the result
void VerifyResult(const Pickle& pickle) {
@@ -42,6 +43,10 @@ void VerifyResult(const Pickle& pickle) {
EXPECT_TRUE(pickle.ReadBool(&iter, &outbool));
EXPECT_EQ(testbool2, outbool);
+ uint16 outuint16;
+ EXPECT_TRUE(pickle.ReadUInt16(&iter, &outuint16));
+ EXPECT_EQ(testuint16, outuint16);
+
const char* outdata;
int outdatalen;
EXPECT_TRUE(pickle.ReadData(&iter, &outdata, &outdatalen));
@@ -66,6 +71,7 @@ TEST(PickleTest, EncodeDecode) {
EXPECT_TRUE(pickle.WriteWString(testwstr));
EXPECT_TRUE(pickle.WriteBool(testbool1));
EXPECT_TRUE(pickle.WriteBool(testbool2));
+ EXPECT_TRUE(pickle.WriteUInt16(testuint16));
EXPECT_TRUE(pickle.WriteData(testdata, testdatalen));
// Over allocate BeginWriteData so we can test TrimWriteData.

Powered by Google App Engine
This is Rietveld 408576698