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

Side by Side Diff: remoting/host/setup/oauth_helper_unittest.cc

Issue 1547473005: Switch to standard integer types in remoting/host/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/host/setup/oauth_helper.h" 5 #include "remoting/host/setup/oauth_helper.h"
6 6
7 #include <stddef.h>
8
7 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
8 10
9 namespace { 11 namespace {
10 12
11 std::string Replace(const std::string& s, const std::string& old_substr, 13 std::string Replace(const std::string& s, const std::string& old_substr,
12 const std::string& new_substr) { 14 const std::string& new_substr) {
13 size_t pos = s.find(old_substr); 15 size_t pos = s.find(old_substr);
14 if (pos == std::string::npos) { 16 if (pos == std::string::npos) {
15 return s; 17 return s;
16 } 18 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 ASSERT_EQ("", GetOauthCodeInUrl(url, GetTestRedirectUrl())); 68 ASSERT_EQ("", GetOauthCodeInUrl(url, GetTestRedirectUrl()));
67 } 69 }
68 70
69 TEST(OauthHelperTest, TestBadHost) { 71 TEST(OauthHelperTest, TestBadHost) {
70 std::string url = GetTestRedirectUrl() + "?code=Dummy"; 72 std::string url = GetTestRedirectUrl() + "?code=Dummy";
71 url = Replace(url, "google", "goggle"); 73 url = Replace(url, "google", "goggle");
72 ASSERT_EQ("", GetOauthCodeInUrl(url, GetTestRedirectUrl())); 74 ASSERT_EQ("", GetOauthCodeInUrl(url, GetTestRedirectUrl()));
73 } 75 }
74 76
75 } // namespace remoting 77 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/setup/me2me_native_messaging_host_unittest.cc ('k') | remoting/host/setup/pin_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698