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

Unified Diff: ipc/ipc_channel_unittest.cc

Issue 940783002: Cleanup: Remove wstring methods from base::Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 9 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_unittest.cc ('k') | ipc/ipc_fuzzing_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_unittest.cc
diff --git a/ipc/ipc_channel_unittest.cc b/ipc/ipc_channel_unittest.cc
index 383ddb0467d7854ccf8f04584d2f631a7cad2e7f..19cfad862ddae3e31be0d091e0c19d2abb903684 100644
--- a/ipc/ipc_channel_unittest.cc
+++ b/ipc/ipc_channel_unittest.cc
@@ -12,6 +12,8 @@
#include "base/message_loop/message_loop.h"
#include "base/pickle.h"
+#include "base/strings/string16.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_test_base.h"
@@ -26,18 +28,18 @@ class IPCChannelTest : public IPCTestBase {
TEST_F(IPCChannelTest, BasicMessageTest) {
int v1 = 10;
std::string v2("foobar");
- std::wstring v3(L"hello world");
+ base::string16 v3(base::ASCIIToUTF16("hello world"));
IPC::Message m(0, 1, IPC::Message::PRIORITY_NORMAL);
EXPECT_TRUE(m.WriteInt(v1));
EXPECT_TRUE(m.WriteString(v2));
- EXPECT_TRUE(m.WriteWString(v3));
+ EXPECT_TRUE(m.WriteString16(v3));
PickleIterator iter(m);
int vi;
std::string vs;
- std::wstring vw;
+ base::string16 vs16;
EXPECT_TRUE(iter.ReadInt(&vi));
EXPECT_EQ(v1, vi);
@@ -45,13 +47,13 @@ TEST_F(IPCChannelTest, BasicMessageTest) {
EXPECT_TRUE(iter.ReadString(&vs));
EXPECT_EQ(v2, vs);
- EXPECT_TRUE(iter.ReadWString(&vw));
- EXPECT_EQ(v3, vw);
+ EXPECT_TRUE(iter.ReadString16(&vs16));
+ EXPECT_EQ(v3, vs16);
// should fail
EXPECT_FALSE(iter.ReadInt(&vi));
EXPECT_FALSE(iter.ReadString(&vs));
- EXPECT_FALSE(iter.ReadWString(&vw));
+ EXPECT_FALSE(iter.ReadString16(&vs16));
}
TEST_F(IPCChannelTest, ChannelTest) {
« no previous file with comments | « base/pickle_unittest.cc ('k') | ipc/ipc_fuzzing_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698