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

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

Issue 1680873002: [Experimental Framework] Move trial token code to renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add boringssl dependency to content/renderer/ Created 4 years, 10 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/common/origin_trials/trial_token.h" 5 #include "content/renderer/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_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/test/simple_test_clock.h" 10 #include "base/test/simple_test_clock.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace content { 14 namespace content {
15 15
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // Signature will be invalid if tested against the real public key 183 // Signature will be invalid if tested against the real public key
184 EXPECT_FALSE(token->IsValid(base::Time::FromDoubleT(kValidTimestamp))); 184 EXPECT_FALSE(token->IsValid(base::Time::FromDoubleT(kValidTimestamp)));
185 } 185 }
186 186
187 TEST_F(TrialTokenTest, ValidateWhenNotExpired) { 187 TEST_F(TrialTokenTest, ValidateWhenNotExpired) {
188 scoped_ptr<TrialToken> token = TrialToken::Parse(kSampleToken); 188 scoped_ptr<TrialToken> token = TrialToken::Parse(kSampleToken);
189 ASSERT_TRUE(token); 189 ASSERT_TRUE(token);
190 } 190 }
191 191
192 } // namespace content 192 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/origin_trials/trial_token.cc ('k') | content/renderer/origin_trials/trial_token_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698