~smagoun/whoopsie/whoopsie-lp1017637

« back to all changes in this revision

Viewing changes to backend/stats/static/js/yui/tests/io/tests/js/transport-tests.js

  • Committer: Evan Dandrea
  • Date: 2012-05-09 05:53:45 UTC
  • Revision ID: evan.dandrea@canonical.com-20120509055345-z2j41tmcbf4as5uf
The backend now lives in lp:daisy and the website (errors.ubuntu.com) now lives in lp:errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
YUI.add('transport-tests', function(Y) {
2
 
 
3
 
    var suite = new Y.Test.Suite('Transport Tests');
4
 
 
5
 
    Y.io.transport( { id:'flash', src:'../../../build/io-xdr/io.swf' } );
6
 
    Y.IO.transports.iframe = function() { return {}; };
7
 
 
8
 
    suite.add(new Y.Test.Case({
9
 
        name: 'Flash Transport Test',
10
 
        'test': function() {
11
 
            Y.Assert.isObject(Y.IO.transports.flash);
12
 
        }
13
 
    }));
14
 
 
15
 
    suite.add(new Y.Test.Case({
16
 
        name: 'iframe Transport Test',
17
 
        'test': function() {
18
 
            Y.Assert.isObject(Y.IO.transports.iframe);
19
 
        }
20
 
    }));
21
 
 
22
 
    suite.add(new Y.Test.Case({
23
 
        name: 'Native Transport Test',
24
 
        'test': function() {
25
 
            var io = new Y.IO(),
26
 
                o = io._create({ xdr: { use:'native' } });
27
 
 
28
 
            if (Y.UA.ie) {
29
 
                Y.Assert.isTrue(o.notify);
30
 
            }
31
 
            else {
32
 
                Y.Assert.isFalse(o.notify);
33
 
            }
34
 
        }
35
 
    }));
36
 
 
37
 
    Y.Test.Runner.add(suite);
38
 
 
39
 
});