| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 "google_apis/gaia/oauth_request_signer.h" | 5 #include "google_apis/gaia/oauth_request_signer.h" |
| 6 | 6 |
| 7 #include "googleurl/src/gurl.h" | |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "url/gurl.h" |
| 9 | 9 |
| 10 // This value is used to seed the PRNG at the beginning of a sequence of | 10 // This value is used to seed the PRNG at the beginning of a sequence of |
| 11 // operations to produce a repeatable sequence. | 11 // operations to produce a repeatable sequence. |
| 12 #define RANDOM_SEED (0x69E3C47D) | 12 #define RANDOM_SEED (0x69E3C47D) |
| 13 | 13 |
| 14 TEST(OAuthRequestSignerTest, Encode) { | 14 TEST(OAuthRequestSignerTest, Encode) { |
| 15 ASSERT_EQ(OAuthRequestSigner::Encode("ABCDEFGHIJKLMNOPQRSTUVWXYZ" | 15 ASSERT_EQ(OAuthRequestSigner::Encode("ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| 16 "abcdefghijklmnopqrstuvwxyz" | 16 "abcdefghijklmnopqrstuvwxyz" |
| 17 "0123456789" | 17 "0123456789" |
| 18 "-._~"), | 18 "-._~"), |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 "oauth_nonce=\"2oiE_aHdk5qRTz0L9C8Lq0g\", " | 314 "oauth_nonce=\"2oiE_aHdk5qRTz0L9C8Lq0g\", " |
| 315 "oauth_signature=\"PFqDTaiyey1UObcvOyI4Ng2HXW0%3D\", " | 315 "oauth_signature=\"PFqDTaiyey1UObcvOyI4Ng2HXW0%3D\", " |
| 316 "oauth_signature_method=\"HMAC-SHA1\", " | 316 "oauth_signature_method=\"HMAC-SHA1\", " |
| 317 "oauth_timestamp=\"1308152953\", " | 317 "oauth_timestamp=\"1308152953\", " |
| 318 "oauth_token=\"4%2FVGY0MsQadcmO8VnCv9gnhoEooq1v\", " | 318 "oauth_token=\"4%2FVGY0MsQadcmO8VnCv9gnhoEooq1v\", " |
| 319 "oauth_version=\"1.0\", " | 319 "oauth_version=\"1.0\", " |
| 320 "scope=\"https%3A%2F%2Faccounts.google.com%2FOAuthLogin\", " | 320 "scope=\"https%3A%2F%2Faccounts.google.com%2FOAuthLogin\", " |
| 321 "xaouth_display_name=\"Chromium\"", | 321 "xaouth_display_name=\"Chromium\"", |
| 322 signed_text); | 322 signed_text); |
| 323 } | 323 } |
| OLD | NEW |