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

Unified Diff: remoting/host/host_key_pair_unittest.cc

Issue 10007048: Cleanup and simplify HostConfig and JsonHostConfig. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « remoting/host/host_key_pair.cc ('k') | remoting/host/in_memory_host_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_key_pair_unittest.cc
diff --git a/remoting/host/host_key_pair_unittest.cc b/remoting/host/host_key_pair_unittest.cc
index ec4fc389ea0fc20b91360951a7d01854280e948c..51b90db58e3346af07d2d015178f3aaa1d391c48 100644
--- a/remoting/host/host_key_pair_unittest.cc
+++ b/remoting/host/host_key_pair_unittest.cc
@@ -27,21 +27,19 @@ const char kExpectedSignature[] =
"gDcvyW8QiGuKLopGj/4c5CQT4yE8JjsyU3Qqo2ZPK4neJYQhOmAlg+Q5dAPLpzWMj5HQyOVHJaSXZ"
"Y8vl/LiKvbdofYLeYNVKAE4q5mfpQMrsysPYpbxBV60AhFyrvtC040MFGcflKQRZNiZwMXVb7DclC"
"BPgvK7rI5Y0ERtVm+yNmH7vCivfyAnDUYA==";
-}
-
+} // namespace
class HostKeyPairTest : public testing::Test {
protected:
virtual void SetUp() {
ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
FilePath config_path = test_dir_.path().AppendASCII("test_config.json");
- config_ = new JsonHostConfig(
- config_path, base::MessageLoopProxy::current());
+ config_.reset(new JsonHostConfig(config_path));
}
MessageLoop message_loop_;
ScopedTempDir test_dir_;
- scoped_refptr<JsonHostConfig> config_;
+ scoped_ptr<JsonHostConfig> config_;
};
TEST_F(HostKeyPairTest, SaveLoad) {
@@ -49,12 +47,12 @@ TEST_F(HostKeyPairTest, SaveLoad) {
// generate the same signature with both keys.
HostKeyPair exported_key;
exported_key.LoadFromString(kTestHostKeyPair);
- exported_key.Save(config_);
+ exported_key.Save(config_.get());
message_loop_.RunAllPending();
HostKeyPair imported_key;
- imported_key.Load(config_);
+ imported_key.Load(*config_);
ASSERT_EQ(exported_key.GetSignature(kTestMessage),
imported_key.GetSignature(kTestMessage));
« no previous file with comments | « remoting/host/host_key_pair.cc ('k') | remoting/host/in_memory_host_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698