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

Side by Side Diff: components/domain_reliability/util_unittest.cc

Issue 267633002: Domain Reliability: Don't send proxy address, other fixes (Closed) Base URL: http://git.chromium.org/chromium/src.git@domrel_security
Patch Set: Include https://codereview.chromium.org/271593002/ Created 6 years, 7 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
« no previous file with comments | « components/domain_reliability/uploader_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/domain_reliability/util.h" 5 #include "components/domain_reliability/util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "components/domain_reliability/test_util.h" 8 #include "components/domain_reliability/test_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace domain_reliability {
12 namespace {
13
11 using base::TimeDelta; 14 using base::TimeDelta;
12 using base::TimeTicks; 15 using base::TimeTicks;
13 16
14 namespace domain_reliability {
15
16 class DomainReliabilityMockTimeTest : public testing::Test { 17 class DomainReliabilityMockTimeTest : public testing::Test {
17 protected: 18 protected:
18 MockTime time_; 19 MockTime time_;
19 }; 20 };
20 21
21 TEST_F(DomainReliabilityMockTimeTest, Create) { 22 TEST_F(DomainReliabilityMockTimeTest, Create) {
22 } 23 }
23 24
24 TEST_F(DomainReliabilityMockTimeTest, NowAndAdvance) { 25 TEST_F(DomainReliabilityMockTimeTest, NowAndAdvance) {
25 const TimeDelta delta = TimeDelta::FromSeconds(1); 26 const TimeDelta delta = TimeDelta::FromSeconds(1);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 delta, 114 delta,
114 callback.callback())); 115 callback.callback()));
115 time_.Advance(delta); 116 time_.Advance(delta);
116 EXPECT_FALSE(callback.called()); 117 EXPECT_FALSE(callback.called());
117 EXPECT_TRUE(timer->IsRunning()); 118 EXPECT_TRUE(timer->IsRunning());
118 time_.Advance(delta); 119 time_.Advance(delta);
119 EXPECT_TRUE(callback.called()); 120 EXPECT_TRUE(callback.called());
120 EXPECT_FALSE(timer->IsRunning()); 121 EXPECT_FALSE(timer->IsRunning());
121 } 122 }
122 123
124 } // namespace
123 } // namespace domain_reliability 125 } // namespace domain_reliability
OLDNEW
« no previous file with comments | « components/domain_reliability/uploader_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698