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

Side by Side Diff: remoting/client/plugin/chromoting_plugin_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
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/plugin/chromoting_plugin.h" 7 #include "remoting/client/plugin/chromoting_plugin.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 // TODO(ajwong): Once ChromotingPlugin stablizes a little more, come up with 12 // TODO(ajwong): Once ChromotingPlugin stablizes a little more, come up with
13 // sane unittests. 13 // sane unittests.
14 class ChromotingPluginTest : public testing::Test { 14 class ChromotingPluginTest : public testing::Test {
15 protected: 15 protected:
16 virtual void SetUp() { 16 virtual void SetUp() {
17 } 17 }
18 }; 18 };
19 19
20 TEST_F(ChromotingPluginTest, ParseUrl) {
21 const char url[] = "chromotocol://hostid?user=auser&auth=someauth&jid=ajid";
22 std::string user_id;
23 std::string auth_token;
24 std::string host_jid;
25 ASSERT_TRUE(
26 ChromotingPlugin::ParseUrl(url, &user_id, &auth_token, &host_jid));
27
28 EXPECT_EQ("auser", user_id);
29 EXPECT_EQ("someauth", auth_token);
30 EXPECT_EQ("ajid", host_jid);
31 }
32
33 } // namespace remoting 20 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698