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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/client_util_unittest.cc
===================================================================
--- remoting/client/client_util_unittest.cc (revision 0)
+++ remoting/client/client_util_unittest.cc (revision 0)
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/logging.h"
+#include "base/scoped_ptr.h"
+#include "remoting/client/client_config.h"
+#include "remoting/client/client_util.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace remoting {
+
+// TODO(ajwong): Once ChromotingPlugin stablizes a little more, come up with
+// sane unittests.
+class ClientUtilTest : public testing::Test {
+ protected:
+ virtual void SetUp() {
+ }
+};
+
+TEST_F(ClientUtilTest, GetLoginInfoFromUrlParams) {
+ const char url[] = "chromotocol://hostid?user=auser&auth=someauth&jid=ajid";
+ std::string user_id;
+ std::string auth_token;
+ std::string host_jid;
+ ClientConfig config;
+
+ ASSERT_TRUE(
+ GetLoginInfoFromUrlParams(url, &config));
+
+ EXPECT_EQ("auser", config.username());
+ EXPECT_EQ("someauth", config.auth_token());
+ EXPECT_EQ("ajid", config.host_jid());
+}
+
+} // namespace remoting
Property changes on: remoting/client/client_util_unittest.cc
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698