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

Side by Side Diff: chrome/browser/history/visit_filter_unittest.cc

Issue 12212048: Linux/ChromeOS Chromium style checker cleanup, chrome/browser edition. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/history/visit_filter.h" 5 #include "chrome/browser/history/visit_filter.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 10 matching lines...) Expand all
21 21
22 } // namespace 22 } // namespace
23 23
24 namespace history { 24 namespace history {
25 25
26 class VisitFilterTest : public testing::Test { 26 class VisitFilterTest : public testing::Test {
27 public: 27 public:
28 VisitFilterTest(); 28 VisitFilterTest();
29 29
30 protected: 30 protected:
31 void SetUp(); 31 virtual void SetUp();
32 void TearDown(); 32 virtual void TearDown();
33 }; 33 };
34 34
35 VisitFilterTest::VisitFilterTest() { 35 VisitFilterTest::VisitFilterTest() {
36 } 36 }
37 37
38 void VisitFilterTest::SetUp() { 38 void VisitFilterTest::SetUp() {
39 } 39 }
40 40
41 void VisitFilterTest::TearDown() { 41 void VisitFilterTest::TearDown() {
42 } 42 }
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 visit.visit_time = filter_time - base::TimeDelta::FromDays(7); 305 visit.visit_time = filter_time - base::TimeDelta::FromDays(7);
306 EXPECT_DOUBLE_EQ(0.5, filter.GetVisitScore(visit)); 306 EXPECT_DOUBLE_EQ(0.5, filter.GetVisitScore(visit));
307 // One standard deviation of decay, plus the staleness factor. 307 // One standard deviation of decay, plus the staleness factor.
308 visit.visit_time = filter_time - base::TimeDelta::FromDays(7) - 308 visit.visit_time = filter_time - base::TimeDelta::FromDays(7) -
309 base::TimeDelta::FromHours(1); 309 base::TimeDelta::FromHours(1);
310 EXPECT_DOUBLE_EQ(exp(-0.5) * one_week_one_hour_staleness, 310 EXPECT_DOUBLE_EQ(exp(-0.5) * one_week_one_hour_staleness,
311 filter.GetVisitScore(visit)); 311 filter.GetVisitScore(visit));
312 } 312 }
313 313
314 } // namespace history 314 } // namespace history
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698