~autra/webapps-applications/deezer

« back to all changes in this revision

Viewing changes to tests/Twitter.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:
31
31
        this._state++;
32
32
    },
33
33
 
34
 
    validateCallLog: function (log) {
 
34
    validateCallLog: function (log, out) {
35
35
        assertEquals('Unity.init', log[0].func, 'Unity.init');
36
36
        assertEquals('Twitter', log[0].args[0].name, 'Twitter');
37
37
        assertFalse('Login', !log[2].args[0].login);
38
 
        assertEquals('Unity.MessagingIndicator.showIndicator', log[3].func, 'Unity.MessagingIndicator.showIndicator');
 
38
 
 
39
        var found = false, i;
 
40
        for (i = 0; i < out.length; i++) {
 
41
            if (out[i] === 'PASS SELF TEST') {
 
42
                found = true;
 
43
            }
 
44
        }
 
45
        assertTrue('PASS SELF TEST', found);
39
46
    },
40
47
 
41
48
    scriptName: 'Twitter/Twitter.user.js'