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

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

Issue 3087003: Added HostKeyPair class, signatures for heartbeat messages. (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') | remoting/host/test_key_pair.h » ('j') | 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"
11 #include "remoting/host/json_host_config.h" 11 #include "remoting/host/json_host_config.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 15
16 namespace { 16 namespace {
17 const char *kTestConfig = 17 const char* kTestConfig =
18 "{\n" 18 "{\n"
19 " \"xmpp_login\" : \"test@gmail.com\",\n" 19 " \"xmpp_login\" : \"test@gmail.com\",\n"
20 " \"xmpp_auth_token\" : \"TEST_AUTH_TOKEN\",\n" 20 " \"xmpp_auth_token\" : \"TEST_AUTH_TOKEN\",\n"
21 " \"host_id\" : \"TEST_HOST_ID\",\n" 21 " \"host_id\" : \"TEST_HOST_ID\",\n"
22 " \"host_name\" : \"TEST_MACHINE_NAME\",\n" 22 " \"host_name\" : \"TEST_MACHINE_NAME\",\n"
23 " \"private_key\" : \"TEST_PRIVATE_KEY\"\n" 23 " \"private_key\" : \"TEST_PRIVATE_KEY\"\n"
24 "}\n"; 24 "}\n";
25 25
26 // Helper for Update test. 26 // Helper for Update test.
27 class TestConfigUpdater : public base::RefCountedThreadSafe<TestConfigUpdater> { 27 class TestConfigUpdater : public base::RefCountedThreadSafe<TestConfigUpdater> {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
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') | remoting/host/test_key_pair.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698