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

Side by Side Diff: remoting/base/auth_token_util_unittest.cc

Issue 959033004: Remove ClientLogin support from remoting host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/base/auth_token_util.cc ('k') | remoting/base/constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 "remoting/base/auth_token_util.h"
6 #include "remoting/base/constants.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace remoting {
10 namespace {
11
12 TEST(AuthTokenUtilTest, ParseAuthTokenWithService) {
13 std::string auth_token;
14 std::string auth_service;
15
16 ParseAuthTokenWithService("service:token", &auth_token, &auth_service);
17 EXPECT_EQ("token", auth_token);
18 EXPECT_EQ("service", auth_service);
19
20 // Check for legacy support.
21 ParseAuthTokenWithService("token2", &auth_token, &auth_service);
22 EXPECT_EQ("token2", auth_token);
23 EXPECT_EQ(std::string(kChromotingTokenDefaultServiceName), auth_service);
24
25 ParseAuthTokenWithService("just_service:", &auth_token, &auth_service);
26 EXPECT_EQ("", auth_token);
27 EXPECT_EQ("just_service", auth_service);
28
29 ParseAuthTokenWithService("yay:token:has:colons", &auth_token, &auth_service);
30 EXPECT_EQ("token:has:colons", auth_token);
31 EXPECT_EQ("yay", auth_service);
32 }
33
34 } // namespace
35
36 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/base/auth_token_util.cc ('k') | remoting/base/constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698