~ubuntu-branches/ubuntu/precise/maas/precise-updates

« back to all changes in this revision

Viewing changes to src/maasserver/static/jslibs/yui/3.4.1/tests/io/tests/timeoutabort.html

Tags: 1.2+bzr1373+dfsg-0ubuntu1~12.04.4
* SECURITY UPDATE: failure to authenticate downloaded content (LP: #1039513)
  - debian/patches/CVE-2013-1058.patch: Authenticate downloaded files with
    GnuPG and MD5SUM files. Thanks to Julian Edwards.
  - CVE-2013-1058
* SECURITY UPDATE: configuration options may be loaded from current working
  directory (LP: #1158425)
  - debian/patches/CVE-2013-1057-1-2.patch: Do not load configuration
    options from the current working directory. Thanks to Julian Edwards.
  - CVE-2013-1057

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!doctype html>
2
 
<html>
3
 
<head>
4
 
<title>YUI IO Timeout and Abort Tests</title>
5
 
</head>
6
 
 
7
 
<body class="yui3-skin-sam">
8
 
<h1>IO Timeout and Abort Tests</h1>
9
 
 
10
 
<script type="text/javascript" src="../../../build/yui/yui.js"></script>
11
 
<script type="text/javascript">
12
 
 
13
 
(function() {
14
 
    YUI({
15
 
        base: "../../../build/",
16
 
        filter: "debug",
17
 
        logExclude: {
18
 
            attribute: true,
19
 
            dom: true,
20
 
            node: true,
21
 
            event: true,
22
 
            base: true,
23
 
            widget: true,
24
 
            selector: true,
25
 
            io:true
26
 
        },
27
 
        useConsole: true
28
 
    }).use("test", "console", "io-base", function(Y) {
29
 
 
30
 
        var console = new Y.Console().render(),
31
 
                        io = new Y.IO();
32
 
 
33
 
                function timeout(id, o) {
34
 
                        Y.Assert.areSame(0, o.status);
35
 
                        Y.Assert.areSame('timeout', o.statusText);
36
 
                }
37
 
 
38
 
                function abort(id, o) {
39
 
                        Y.Assert.areSame(0, o.status);
40
 
                        Y.Assert.areSame('abort', o.statusText);
41
 
                }
42
 
 
43
 
                cfg1 = {
44
 
                        on: {
45
 
                                complete: timeout,
46
 
                                failure: timeout
47
 
                         }
48
 
                };
49
 
 
50
 
                cfg2 = {
51
 
                        on: {
52
 
                                complete: abort,
53
 
                                failure: abort
54
 
                         }
55
 
                };
56
 
 
57
 
        var io_timeout = new Y.Test.Case({
58
 
            name: 'Timeout Test',
59
 
            'test': function() {
60
 
                                io._evt('complete', { id: 0,  e: 'timeout' }, cfg1);
61
 
            }
62
 
        });
63
 
 
64
 
        var io_abort = new Y.Test.Case({
65
 
            name: 'Abort Test',
66
 
            'test': function() {
67
 
                                io._evt('complete', { id: 1, e: 'abort' }, cfg2);
68
 
            }
69
 
        });
70
 
 
71
 
        Y.Test.Runner.add(io_timeout);
72
 
        Y.Test.Runner.add(io_abort);
73
 
        Y.Test.Runner.run();
74
 
});
75
 
})();
76
 
</script>
77
 
</body>
78
 
</html>