~smagoun/whoopsie/whoopsie-lp1017637

« back to all changes in this revision

Viewing changes to backend/stats/static/js/yui/tests/async-queue/tests/test.html

  • 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
 
<!doctype html>
2
 
<html>
3
 
<head>
4
 
    <title>Test Page</title>
5
 
    <style type="text/css">
6
 
        h1 {
7
 
            font: normal 125%/1.4 Arial, sans-serif;
8
 
        }
9
 
        .yui3-skin-sam .yui3-console .yui3-console-content {
10
 
            font-size: 10px;
11
 
            width: 32em;
12
 
        }
13
 
        .yui3-skin-sam .yui3-console .yui3-console-bd {
14
 
            height: 50em;
15
 
        }
16
 
        .yui3-skin-sam .yui3-console-entry-time {
17
 
            display: none;
18
 
        }
19
 
    </style>
20
 
</head>
21
 
<body class="yui3-skin-sam">
22
 
<h1>Tests</h1>
23
 
 
24
 
<script src="../../../build/yui/yui.js"></script>
25
 
<script>
26
 
YUI({
27
 
    filter : 'raw'
28
 
}).use('test','console','async-queue',function (Y) {
29
 
 
30
 
var suite = new Y.Test.Suite("Tests");
31
 
 
32
 
suite.add(new Y.Test.Case({
33
 
    name : "YUI Test infinite loop bug",
34
 
 
35
 
    test_infinite_loop : function () {
36
 
        /*
37
 
        var q = new Y.AsyncQueue(),
38
 
            register = 0,
39
 
            self = this;
40
 
 
41
 
        q.defaults.timeout = 10;
42
 
        q.add({
43
 
            id: 'one',
44
 
            fn: function() {
45
 
                q.pause();
46
 
                register += 1;
47
 
                q.run();
48
 
            }
49
 
        }, {
50
 
            id: 'two',
51
 
            fn: function() {
52
 
                register += 10;
53
 
                self.resume( function () {
54
 
                    //Y.log( register );
55
 
                    Y.Assert.areSame( 11, register );
56
 
                } );
57
 
            },
58
 
            iterations: 1
59
 
        });
60
 
 
61
 
        q.run();
62
 
 
63
 
        this.wait();
64
 
        */
65
 
        /*
66
 
        var self = this,
67
 
            x = new EventTarget( { emitFacade: true } );
68
 
            x.count = 3;
69
 
 
70
 
        x.publish( 'exec', { defaultFn: function () {
71
 
            this.count--;
72
 
            if (this.count) {
73
 
                setTimeout( function () {
74
 
                    x.fire( 'exec' );
75
 
                }, 10 );
76
 
            } else {
77
 
                self.resume( function () {
78
 
                    Y.Assert.isTrue( true );
79
 
                } );
80
 
            }
81
 
        } } );
82
 
        x.fire( 'exec' );
83
 
        
84
 
        this.wait();
85
 
        */
86
 
 
87
 
    }
88
 
}));
89
 
 
90
 
var yconsole = new Y.Console({
91
 
    contentBox:"log",
92
 
    newestOnTop: false,
93
 
    height: '500px'
94
 
}).render();
95
 
 
96
 
//yconsole.hideCategory('info');
97
 
 
98
 
Y.Test.Runner.add(suite);
99
 
 
100
 
Y.Test.Runner.run();
101
 
 
102
 
});
103
 
</script>
104
 
</body>
105
 
</html>