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

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

Issue 2861047: Refactor the client code. Move all x11-related code into X11View and create... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "base/scoped_ptr.h"
7 #include "remoting/client/client_config.h"
8 #include "remoting/client/client_util.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 namespace remoting {
12
13 // TODO(ajwong): Once ChromotingPlugin stablizes a little more, come up with
14 // sane unittests.
15 class ClientUtilTest : public testing::Test {
16 protected:
17 virtual void SetUp() {
18 }
19 };
20
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(
29 GetLoginInfoFromUrlParams(url, &config));
30
31 EXPECT_EQ("auser", config.username());
32 EXPECT_EQ("someauth", config.auth_token());
33 EXPECT_EQ("ajid", config.host_jid());
34 }
35
36 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698