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

Issue 11144022: Add tests for the Notification module (Closed)

Created:
July 18, 2013, 12:10 p.m. by Felix Dahlke
Modified:
July 19, 2013, 2:59 p.m.
Reviewers:
Wladimir Palant
Visibility:
Public.

Description

Add tests for the Notification module

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Test downloading (changes by Wladimir) #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+376 lines, -159 lines) Patch
M chrome/content/common.js View 1 3 chunks +154 lines, -0 lines 0 comments Download
A chrome/content/tests/notification.js View 1 1 chunk +213 lines, -0 lines 2 comments Download
M chrome/content/tests/synchronizer.js View 1 10 chunks +9 lines, -159 lines 2 comments Download

Messages

Total messages: 5
Felix Dahlke
July 18, 2013, 12:12 p.m. (2013-07-18 12:12:09 UTC) #1
Wladimir Palant
All other issues have been addressed in my changes already so it is up to ...
July 19, 2013, 8:18 a.m. (2013-07-19 08:18:29 UTC) #2
Felix Dahlke
http://codereview.adblockplus.org/11144022/diff/3001/chrome/content/tests/notification.js File chrome/content/tests/notification.js (right): http://codereview.adblockplus.org/11144022/diff/3001/chrome/content/tests/notification.js#newcode25 chrome/content/tests/notification.js:25: test("Single notification", 1, function() On 2013/07/19 08:18:29, Wladimir Palant ...
July 19, 2013, 2:30 p.m. (2013-07-19 14:30:40 UTC) #3
Wladimir Palant
http://codereview.adblockplus.org/11144022/diff/6001/chrome/content/tests/notification.js File chrome/content/tests/notification.js (right): http://codereview.adblockplus.org/11144022/diff/6001/chrome/content/tests/notification.js#newcode39 chrome/content/tests/notification.js:39: randomResult = 0.5; On 2013/07/19 14:30:41, Felix H. Dahlke ...
July 19, 2013, 2:58 p.m. (2013-07-19 14:58:49 UTC) #4
Felix Dahlke
July 19, 2013, 2:59 p.m. (2013-07-19 14:59:36 UTC) #5
On 2013/07/19 14:58:49, Wladimir Palant wrote:
>
http://codereview.adblockplus.org/11144022/diff/6001/chrome/content/tests/not...
> File chrome/content/tests/notification.js (right):
> 
>
http://codereview.adblockplus.org/11144022/diff/6001/chrome/content/tests/not...
> chrome/content/tests/notification.js:39: randomResult = 0.5;
> On 2013/07/19 14:30:41, Felix H. Dahlke wrote:
> > This seems redundant, looks like randomResult is always 0.5 anyway.
> 
> Actually, the point here is to reset randomResult for each single test, no
> matter whether its value is changed. I actually mean to add a test that will
> change randomResult to test that the download interval is correct.
> 
>
http://codereview.adblockplus.org/11144022/diff/6001/chrome/content/tests/syn...
> File chrome/content/tests/synchronizer.js (right):
> 
>
http://codereview.adblockplus.org/11144022/diff/6001/chrome/content/tests/syn...
> chrome/content/tests/synchronizer.js:27: randomResult = 0.5;
> On 2013/07/19 14:30:41, Felix H. Dahlke wrote:
> > As in notification.js - it looks like this is always 0.5 to begin with.
> 
> Not really, one of the tests changes it - and this makes sure that each test
can
> rely on its value being 0.5 unless it changes the value explicitly.

Oh, didn't notice. Well, LGTM then :)

Powered by Google App Engine
This is Rietveld