~autra/webapps-applications/deezer

« back to all changes in this revision

Viewing changes to tests/GoogleReader.js

  • Committer: autra
  • Date: 2013-04-11 12:34:24 UTC
  • mfrom: (406.1.108 trunk)
  • Revision ID: autra@autra-optiplex-380-20130411123424-3b0xa9ppaytxx3hr
sync from parent

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
        this._state++;
25
25
    },
26
26
 
27
 
    validateCallLog: function (log) {
 
27
    validateCallLog: function (log, out) {
28
28
        assertEquals('Unity.init', log[0].func, 'Unity.init');
29
29
        assertEquals('Google Reader', log[0].args[0].name, 'Google Reader');
30
30
        assertEquals('Unity.MessagingIndicator.clearIndicators', log[1].func, 'Unity.MessagingIndicator.clearIndicators');
31
 
        assertEquals('Unity.MessagingIndicator.showIndicator', log[2].func, 'Unity.MessagingIndicator.showIndicator');
 
31
 
32
32
        assertEquals('Unity.addAction', log[log.length - 1].func, 'Unity.addAction');
33
33
        assertFalse(log.length < 10);
 
34
 
 
35
        var found = false, i;
 
36
        for (i = 0; i < out.length; i++) {
 
37
            if (out[i] === 'PASS SELF TEST') {
 
38
                found = true;
 
39
            }
 
40
        }
 
41
        assertTrue('PASS SELF TEST', found);
34
42
    },
35
43
 
36
44
    scriptName: 'GoogleReader/GoogleReader.user.js'