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

Unified Diff: chrome/browser/push_messaging/push_messaging_browsertest.cc

Issue 2620393002: Refactor budget computation to be more tuneable. (Closed)
Patch Set: Formatting Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/push_messaging/push_messaging_browsertest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_browsertest.cc b/chrome/browser/push_messaging/push_messaging_browsertest.cc
index f8fe753d19c94102389120056adfd68accf804fc..82e77be62c92be93b2315b0233b4327274fe23e5 100644
--- a/chrome/browser/push_messaging/push_messaging_browsertest.cc
+++ b/chrome/browser/push_messaging/push_messaging_browsertest.cc
@@ -1217,9 +1217,10 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
content::WebContents* web_contents =
GetBrowser()->tab_strip_model()->GetActiveWebContents();
- // Set the site engagement score for the site. Setting it to 4 means it should
- // have enough budget for two non-shown notification, which cost 2 each.
- SetSiteEngagementScore(web_contents->GetURL(), 4.0);
+ // Set the site engagement score for the site. Setting it to 10 means it
+ // should have a budget of 4, enough for two non-shown notification, which
+ // cost 2 each.
Peter Beverloo 2017/01/12 14:40:04 I'd love to be able to use constants for this. Can
harkness 2017/01/12 17:44:15 I think that's a great idea, and I will absolutely
+ SetSiteEngagementScore(web_contents->GetURL(), 10.0);
// If the site is visible in an active tab, we should not force a notification
// to be shown. Try it twice, since we allow one mistake per 10 push events.

Powered by Google App Engine
This is Rietveld 408576698