Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/tests/notification.js

Issue 5079671569907712: Issue 2659 - Adjust initial notification download delay (Closed)
Patch Set: Created June 10, 2015, 4:02 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/tests/notification.js
===================================================================
--- a/chrome/content/tests/notification.js
+++ b/chrome/content/tests/notification.js
@@ -296,34 +296,35 @@
test("Expiration interval", function()
{
+ let initialDelay = 1 / 60;
let tests = [
{
randomResult: 0.5,
- requests: [0.2, 24.2, 48.2]
+ requests: [initialDelay, initialDelay + 24, initialDelay + 48]
},
{
randomResult: 0, // Changes interval by factor 0.8 (19.2 hours)
- requests: [0.2, 20.2, 40.2]
+ requests: [initialDelay, initialDelay + 20, initialDelay + 40]
},
{
randomResult: 1, // Changes interval by factor 1.2 (28.8 hours)
- requests: [0.2, 29.2, 58.2]
+ requests: [initialDelay, initialDelay + 29, initialDelay + 58]
},
{
randomResult: 0.25, // Changes interval by factor 0.9 (21.6 hours)
- requests: [0.2, 22.2, 44.2]
+ requests: [initialDelay, initialDelay + 22, initialDelay + 44]
},
{
randomResult: 0.5,
- skipAfter: 5.2,
+ skipAfter: initialDelay + 5,
skip: 10, // Short break should not increase soft expiration
- requests: [0.2, 24.2]
+ requests: [initialDelay, initialDelay + 24]
},
{
randomResult: 0.5,
- skipAfter: 5.2,
+ skipAfter: initialDelay + 5,
skip: 30, // Long break should increase soft expiration, hitting hard expiration
- requests: [0.2, 48.2]
+ requests: [initialDelay, initialDelay + 48]
}
];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld