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

Unified Diff: base/pickle_unittest.cc

Issue 981853002: Revert of Adding StringPiece read/write support to pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « base/pickle.cc ('k') | ipc/ipc_perftest_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/pickle_unittest.cc
diff --git a/base/pickle_unittest.cc b/base/pickle_unittest.cc
index 466d32ad86705d15541c1c9cda3e6055e849372d..1fa1f32d49c736548ec36bbb8ac0aeb32c46b28c 100644
--- a/base/pickle_unittest.cc
+++ b/base/pickle_unittest.cc
@@ -30,13 +30,10 @@
const std::string teststring("Hello world"); // note non-aligned string length
const std::wstring testwstring(L"Hello, world");
const base::string16 teststring16(base::ASCIIToUTF16("Hello, world"));
-const char testrawstring[] = "Hello new world"; // Test raw string writing
-// Test raw char16 writing, assumes UTF16 encoding is ANSI for alpha chars.
-const base::char16 testrawstring16[] = {'A', 'l', 'o', 'h', 'a', 0};
const char testdata[] = "AAA\0BBB\0";
const int testdatalen = arraysize(testdata) - 1;
-// checks that the results can be read correctly from the Pickle
+// checks that the result
void VerifyResult(const Pickle& pickle) {
PickleIterator iter(pickle);
@@ -93,14 +90,6 @@
base::string16 outstring16;
EXPECT_TRUE(iter.ReadString16(&outstring16));
EXPECT_EQ(teststring16, outstring16);
-
- base::StringPiece outstringpiece;
- EXPECT_TRUE(iter.ReadStringPiece(&outstringpiece));
- EXPECT_EQ(testrawstring, outstringpiece);
-
- base::StringPiece16 outstringpiece16;
- EXPECT_TRUE(iter.ReadStringPiece16(&outstringpiece16));
- EXPECT_EQ(testrawstring16, outstringpiece16);
const char* outdata;
int outdatalen;
@@ -132,8 +121,6 @@
EXPECT_TRUE(pickle.WriteString(teststring));
EXPECT_TRUE(pickle.WriteWString(testwstring));
EXPECT_TRUE(pickle.WriteString16(teststring16));
- EXPECT_TRUE(pickle.WriteString(testrawstring));
- EXPECT_TRUE(pickle.WriteString16(testrawstring16));
EXPECT_TRUE(pickle.WriteData(testdata, testdatalen));
VerifyResult(pickle);
« no previous file with comments | « base/pickle.cc ('k') | ipc/ipc_perftest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698