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

Unified Diff: content/common/origin_trials/trial_token_validator_unittest.cc

Issue 1858763003: Change origin trial token format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up API, clarify difference between token text and payload, clean up tests, and fix use of pub… Created 4 years, 8 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: content/common/origin_trials/trial_token_validator_unittest.cc
diff --git a/content/common/origin_trials/trial_token_validator_unittest.cc b/content/common/origin_trials/trial_token_validator_unittest.cc
index 9a2d27cf6a0a487c046b28cf00a512f5f7d3fee2..50b4fd57ba88b2c803852feba1c8ffe965234e34 100644
--- a/content/common/origin_trials/trial_token_validator_unittest.cc
+++ b/content/common/origin_trials/trial_token_validator_unittest.cc
@@ -48,8 +48,10 @@ const uint8_t kTestPublicKey2[] = {
// TODO(iclelland): This token expires in 2033. Update it or find a way
// to autogenerate it before then.
const char kSampleToken[] =
- "1|w694328Rl8l2vd96nkbAumpwvOOnvhWTj9/pfBRkvcWMDAsmiMEhZGEPzdBRy5Yao6il5qC"
- "OyS6Ah7uuHf7JAQ==|https://valid.example.com|Frobulate|2000000000";
+ "AQ6Xx5NT42b46tmZ7Mfd/U/qcM8l/+9gIOSXj1EUbUQ1uMmHQxJOKwU57f3kXdds"
+ "PtLMMOsKMHG8OPtF4HrEqQsAAABZeyJvcmlnaW4iOiAiaHR0cHM6Ly92YWxpZC5l"
+ "eGFtcGxlLmNvbTo0NDMiLCAiZmVhdHVyZSI6ICJGcm9idWxhdGUiLCAiZXhwaXJ5"
+ "IjogMjAwMDAwMDAwMH0=";
// The token should be valid for this origin and for this feature.
const char kAppropriateOrigin[] = "https://valid.example.com";
@@ -61,13 +63,17 @@ const char kInsecureOrigin[] = "http://valid.example.com";
// Well-formed trial token with an invalid signature.
const char kInvalidSignatureToken[] =
- "1|CO8hDne98QeFeOJ0DbRZCBN3uE0nyaPgaLlkYhSWnbRoDfEAg+TXELaYfQPfEvKYFauBg/h"
- "nxmba765hz0mXMc==|https://valid.example.com|Frobulate|2000000000";
+ "AQ6Xx5NT42b46tmZ7Mfd/U/qcM8l/+9gIOSXj1EUbUQ1uMmHQxJOKwU57f3kXdds"
+ "JgVz4lvNSyEw+r5/UlpGHQQAAABZeyJvcmlnaW4iOiAiaHR0cHM6Ly92YWxpZC5l"
+ "eGFtcGxlLmNvbTo0NDMiLCAiZmVhdHVyZSI6ICJGcm9idWxhdGUiLCAiZXhwaXJ5"
+ "IjogMTAwMDAwMDAwMH0=";
// Well-formed, but expired, trial token. (Expired in 2001)
const char kExpiredToken[] =
- "1|Vtzq/H0qMxsMXPThIgGEvI13d3Fd8K3W11/0E+FrJJXqBpx6n/dFkeFkEUsPaP3KeT8PCPF"
- "1zpZ7kVgWYRLpAA==|https://valid.example.com|Frobulate|1000000000";
+ "AVChEbwX8yTgZZ1ut0oWd8g/3Y8YBZp7R8SmqXv4HNGsl5b5rSON4Kizc9LdiJi0"
+ "JgVz4lvNSyEw+r5/UlpGHQQAAABZeyJvcmlnaW4iOiAiaHR0cHM6Ly92YWxpZC5l"
+ "eGFtcGxlLmNvbTo0NDMiLCAiZmVhdHVyZSI6ICJGcm9idWxhdGUiLCAiZXhwaXJ5"
+ "IjogMTAwMDAwMDAwMH0=";
const char kUnparsableToken[] = "abcde";

Powered by Google App Engine
This is Rietveld 408576698