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

Side by Side Diff: remoting/host/json_host_config_unittest.cc

Issue 3060034: Convert src/remoting to std::string/char* away from wstring/wchar_t*. (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « remoting/host/json_host_config.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/message_loop_proxy.h" 7 #include "base/message_loop_proxy.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 EXPECT_EQ("test@gmail.com", value); 72 EXPECT_EQ("test@gmail.com", value);
73 EXPECT_TRUE(target->GetString(kXmppAuthTokenConfigPath, &value)); 73 EXPECT_TRUE(target->GetString(kXmppAuthTokenConfigPath, &value));
74 EXPECT_EQ("TEST_AUTH_TOKEN", value); 74 EXPECT_EQ("TEST_AUTH_TOKEN", value);
75 EXPECT_TRUE(target->GetString(kHostIdConfigPath, &value)); 75 EXPECT_TRUE(target->GetString(kHostIdConfigPath, &value));
76 EXPECT_EQ("TEST_HOST_ID", value); 76 EXPECT_EQ("TEST_HOST_ID", value);
77 EXPECT_TRUE(target->GetString(kHostNameConfigPath, &value)); 77 EXPECT_TRUE(target->GetString(kHostNameConfigPath, &value));
78 EXPECT_EQ("TEST_MACHINE_NAME", value); 78 EXPECT_EQ("TEST_MACHINE_NAME", value);
79 EXPECT_TRUE(target->GetString(kPrivateKeyConfigPath, &value)); 79 EXPECT_TRUE(target->GetString(kPrivateKeyConfigPath, &value));
80 EXPECT_EQ("TEST_PRIVATE_KEY", value); 80 EXPECT_EQ("TEST_PRIVATE_KEY", value);
81 81
82 EXPECT_FALSE(target->GetString(L"non_existent_value", &value)); 82 EXPECT_FALSE(target->GetString("non_existent_value", &value));
83 } 83 }
84 84
85 TEST_F(JsonHostConfigTest, Write) { 85 TEST_F(JsonHostConfigTest, Write) {
86 ASSERT_TRUE(test_dir_.CreateUniqueTempDir()); 86 ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
87 87
88 FilePath test_file = test_dir_.path().AppendASCII("write.json"); 88 FilePath test_file = test_dir_.path().AppendASCII("write.json");
89 WriteTestFile(test_file); 89 WriteTestFile(test_file);
90 scoped_refptr<JsonHostConfig> target( 90 scoped_refptr<JsonHostConfig> target(
91 new JsonHostConfig(test_file, message_loop_proxy_.get())); 91 new JsonHostConfig(test_file, message_loop_proxy_.get()));
92 ASSERT_TRUE(target->Read()); 92 ASSERT_TRUE(target->Read());
(...skipping 19 matching lines...) Expand all
112 EXPECT_EQ(new_auth_token_value, value); 112 EXPECT_EQ(new_auth_token_value, value);
113 EXPECT_TRUE(reader->GetString(kHostIdConfigPath, &value)); 113 EXPECT_TRUE(reader->GetString(kHostIdConfigPath, &value));
114 EXPECT_EQ("TEST_HOST_ID", value); 114 EXPECT_EQ("TEST_HOST_ID", value);
115 EXPECT_TRUE(reader->GetString(kHostNameConfigPath, &value)); 115 EXPECT_TRUE(reader->GetString(kHostNameConfigPath, &value));
116 EXPECT_EQ("TEST_MACHINE_NAME", value); 116 EXPECT_EQ("TEST_MACHINE_NAME", value);
117 EXPECT_TRUE(reader->GetString(kPrivateKeyConfigPath, &value)); 117 EXPECT_TRUE(reader->GetString(kPrivateKeyConfigPath, &value));
118 EXPECT_EQ("TEST_PRIVATE_KEY", value); 118 EXPECT_EQ("TEST_PRIVATE_KEY", value);
119 } 119 }
120 120
121 } 121 }
OLDNEW
« no previous file with comments | « remoting/host/json_host_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698