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

Side by Side Diff: remoting/client/client_util_unittest.cc

Issue 3064009: Initial scriptable object implementation. (Closed)
Patch Set: Fix alpha's style nits. Created 10 years, 5 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/client/client_util.cc ('k') | remoting/client/plugin/chromoting_plugin.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/logging.h" 5 #include "base/logging.h"
6 #include "base/scoped_ptr.h" 6 #include "base/scoped_ptr.h"
7 #include "remoting/client/client_config.h" 7 #include "remoting/client/client_config.h"
8 #include "remoting/client/client_util.h" 8 #include "remoting/client/client_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace remoting { 11 namespace remoting {
12 12
13 // TODO(ajwong): Once ChromotingPlugin stablizes a little more, come up with 13 // TODO(ajwong): Fill this out.
14 // sane unittests.
15 class ClientUtilTest : public testing::Test { 14 class ClientUtilTest : public testing::Test {
16 protected: 15 protected:
17 virtual void SetUp() { 16 virtual void SetUp() {
18 } 17 }
19 }; 18 };
20 19
21 TEST_F(ClientUtilTest, GetLoginInfoFromUrlParams) {
22 const char url[] = "chromotocol://hostid?user=auser&auth=someauth&jid=ajid";
23 std::string user_id;
24 std::string auth_token;
25 std::string host_jid;
26 ClientConfig config;
27
28 ASSERT_TRUE(GetLoginInfoFromUrlParams(url, &config));
29
30 EXPECT_EQ("auser", config.username);
31 EXPECT_EQ("someauth", config.auth_token);
32 EXPECT_EQ("ajid", config.host_jid);
33 }
34
35 } // namespace remoting 20 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/client_util.cc ('k') | remoting/client/plugin/chromoting_plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698