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

Side by Side Diff: chrome/browser/budget_service/budget_manager_browsertest.cc

Issue 2957983002: Remove pointless InProcessBrowserTest calls. (Closed)
Patch Set: build Created 3 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/bind_helpers.h" 5 #include "base/bind_helpers.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/budget_service/budget_manager.h" 9 #include "chrome/browser/budget_service/budget_manager.h"
10 #include "chrome/browser/budget_service/budget_manager_factory.h" 10 #include "chrome/browser/budget_service/budget_manager_factory.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 LoadTestPage(); 60 LoadTestPage();
61 budget_manager_ = BudgetManagerFactory::GetForProfile(browser()->profile()); 61 budget_manager_ = BudgetManagerFactory::GetForProfile(browser()->profile());
62 } 62 }
63 63
64 // InProcessBrowserTest: 64 // InProcessBrowserTest:
65 void SetUpCommandLine(base::CommandLine* command_line) override { 65 void SetUpCommandLine(base::CommandLine* command_line) override {
66 // TODO(harkness): Remove switch once Budget API ships. (crbug.com/617971) 66 // TODO(harkness): Remove switch once Budget API ships. (crbug.com/617971)
67 command_line->AppendSwitch( 67 command_line->AppendSwitch(
68 switches::kEnableExperimentalWebPlatformFeatures); 68 switches::kEnableExperimentalWebPlatformFeatures);
69 InProcessBrowserTest::SetUpCommandLine(command_line);
70 } 69 }
71 70
72 // Sets the absolute Site Engagement |score| for the testing origin, assuming 71 // Sets the absolute Site Engagement |score| for the testing origin, assuming
73 // that notification permission has been granted. 72 // that notification permission has been granted.
74 // The |score| must be higher than the bonus points awarded to an origin for 73 // The |score| must be higher than the bonus points awarded to an origin for
75 // having the Notification permission granted. Should be wrapped in the 74 // having the Notification permission granted. Should be wrapped in the
76 // ASSERT_NO_FATAL_FAILURE macro because it contains an ASSERT_GE. 75 // ASSERT_NO_FATAL_FAILURE macro because it contains an ASSERT_GE.
77 void SetSiteEngagementScore(double score) { 76 void SetSiteEngagementScore(double score) {
78 SiteEngagementService* service = 77 SiteEngagementService* service =
79 SiteEngagementService::Get(browser()->profile()); 78 SiteEngagementService::Get(browser()->profile());
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 187
189 ConsumeReservation(); 188 ConsumeReservation();
190 ASSERT_TRUE(success()); 189 ASSERT_TRUE(success());
191 190
192 // One more consume should fail, because all reservations are consumed. 191 // One more consume should fail, because all reservations are consumed.
193 ConsumeReservation(); 192 ConsumeReservation();
194 ASSERT_FALSE(success()); 193 ASSERT_FALSE(success());
195 } 194 }
196 195
197 } // namespace 196 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698