OLD | NEW |
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 Loading... |
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 |
OLD | NEW |