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

Side by Side Diff: content/common/origin_trials/trial_token_unittest.cc

Issue 1742053002: Move trial token code to content/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "content/renderer/origin_trials/trial_token.h" 5 #include "content/common/origin_trials/trial_token.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_piece.h" 9 #include "base/strings/string_piece.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "base/test/simple_test_clock.h" 11 #include "base/test/simple_test_clock.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 #include "url/gurl.h" 14 #include "url/gurl.h"
15 15
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 EXPECT_FALSE(token->IsValid(base::Time::FromDoubleT(kValidTimestamp), 234 EXPECT_FALSE(token->IsValid(base::Time::FromDoubleT(kValidTimestamp),
235 incorrect_public_key())); 235 incorrect_public_key()));
236 } 236 }
237 237
238 TEST_F(TrialTokenTest, ValidateWhenNotExpired) { 238 TEST_F(TrialTokenTest, ValidateWhenNotExpired) {
239 scoped_ptr<TrialToken> token = TrialToken::Parse(kSampleToken); 239 scoped_ptr<TrialToken> token = TrialToken::Parse(kSampleToken);
240 ASSERT_TRUE(token); 240 ASSERT_TRUE(token);
241 } 241 }
242 242
243 } // namespace content 243 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698