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