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

Side by Side Diff: chrome/browser/engagement/site_engagement_service_unittest.cc

Issue 2317993003: //chrome/browser and //components A-E: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 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 "chrome/browser/engagement/site_engagement_service.h" 5 #include "chrome/browser/engagement/site_engagement_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/scoped_temp_dir.h" 9 #include "base/files/scoped_temp_dir.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 base::RunLoop run_loop_; 140 base::RunLoop run_loop_;
141 141
142 DISALLOW_COPY_AND_ASSIGN(ObserverTester); 142 DISALLOW_COPY_AND_ASSIGN(ObserverTester);
143 }; 143 };
144 144
145 class SiteEngagementServiceTest : public ChromeRenderViewHostTestHarness { 145 class SiteEngagementServiceTest : public ChromeRenderViewHostTestHarness {
146 public: 146 public:
147 void SetUp() override { 147 void SetUp() override {
148 ChromeRenderViewHostTestHarness::SetUp(); 148 ChromeRenderViewHostTestHarness::SetUp();
149 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 149 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
150 g_temp_history_dir = temp_dir_.path(); 150 g_temp_history_dir = temp_dir_.GetPath();
151 HistoryServiceFactory::GetInstance()->SetTestingFactory( 151 HistoryServiceFactory::GetInstance()->SetTestingFactory(
152 profile(), &BuildTestHistoryService); 152 profile(), &BuildTestHistoryService);
153 SiteEngagementScore::SetParamValuesForTesting(); 153 SiteEngagementScore::SetParamValuesForTesting();
154 } 154 }
155 155
156 void NavigateWithTransitionAndExpectHigherScore( 156 void NavigateWithTransitionAndExpectHigherScore(
157 SiteEngagementService* service, 157 SiteEngagementService* service,
158 const GURL& url, 158 const GURL& url,
159 ui::PageTransition transition) { 159 ui::PageTransition transition) {
160 double prev_score = service->GetScore(url); 160 double prev_score = service->GetScore(url);
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 1507
1508 service->AddPoints(url3, 2); 1508 service->AddPoints(url3, 2);
1509 EXPECT_EQ(1, incognito_service->GetScore(url3)); 1509 EXPECT_EQ(1, incognito_service->GetScore(url3));
1510 EXPECT_EQ(2, service->GetScore(url3)); 1510 EXPECT_EQ(2, service->GetScore(url3));
1511 1511
1512 EXPECT_EQ(0, incognito_service->GetScore(url4)); 1512 EXPECT_EQ(0, incognito_service->GetScore(url4));
1513 service->AddPoints(url4, 2); 1513 service->AddPoints(url4, 2);
1514 EXPECT_EQ(2, incognito_service->GetScore(url4)); 1514 EXPECT_EQ(2, incognito_service->GetScore(url4));
1515 EXPECT_EQ(2, service->GetScore(url4)); 1515 EXPECT_EQ(2, service->GetScore(url4));
1516 } 1516 }
OLDNEW
« no previous file with comments | « chrome/browser/download/save_page_browsertest.cc ('k') | chrome/common/component_flash_hint_file_linux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698