~autra/webapps-applications/deezer

« back to all changes in this revision

Viewing changes to tests/LinkedIn.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
        }
25
25
    },
26
26
 
27
 
    validateCallLog: function (log) {
 
27
    validateCallLog: function (log, out) {
28
28
        assertEquals('Unity.init', log[0].func, 'Unity.init');
29
 
        assertEquals('Unity.Launcher.addAction', log[1].func, 'Unity.Launcher.addAction');
30
 
        assertEquals('Unity.addAction', log[2].func, 'Unity.addAction');
31
 
        var i, found = false;
32
 
        for (i = 0; i < log.length; i++) {
33
 
            if (log[i].func === 'Unity.MessagingIndicator.showIndicator') {
 
29
        assertEquals('Unity.MessagingIndicator.clearIndicators', log[1].func, 'Unity.MessagingIndicator.clearIndicators');
 
30
        assertEquals('Unity.Launcher.addAction', log[2].func, 'Unity.Launcher.addAction');
 
31
 
 
32
        // at least one
 
33
        assertEquals('Unity.addAction', log[3].func, 'Unity.addAction');
 
34
 
 
35
        // validate self test results
 
36
        var found = false, i;
 
37
        for (i = 0; i < out.length; i++) {
 
38
            if (out[i] === 'PASS SELF TEST') {
34
39
                found = true;
35
40
            }
36
41
        }
37
 
        assertTrue('Unity.MessagingIndicator.showIndicator', found);
 
42
        assertTrue('PASS SELF TEST', found);
38
43
    },
39
44
 
40
45
    scriptName: 'LinkedIn/LinkedIn.user.js'