Cross Reference: /yui3/src/yui/tests/usestar.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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>YUI Use Tests</title>
</head>
<body class="yui3-skin-sam">
<h1>Namespace Tests</h1>
<p><input type="button" value="Run Tests" id="btnRun" disabled="true" /></p>
<script type="text/javascript" src="/build/yui/yui-debug.js"></script>
<script type="text/javascript" src="/build/oop/oop.js"></script>
<script type="text/javascript" src="/build/event-custom/event-custom.js"></script>
<script type="text/javascript" src="/build/dom/dom.js"></script>
<script type="text/javascript" src="/build/event/event.js"></script>
<script type="text/javascript" src="/build/node/node.js"></script>
<script type="text/javascript" src="/build/json/json.js"></script>
<script type="text/javascript" src="/build/pluginhost/pluginhost.js"></script>
<script type="text/javascript" src="/build/substitute/substitute.js"></script>
<script type="text/javascript" src="/build/event-simulate/event-simulate.js"></script>
<script type="text/javascript" src="/build/test/test.js"></script>
<script type="text/javascript">
(function() {
YUI({
logExclude: {Dom: true, Selector: true, Node: true, attribute: true, base: true, event: true, widget: true}
}).use("test", function(Y) {
var count = 0, testUse;
YUI().use("*", function(Y2) {
Y.log('Use * entry');
count++;
testUse = new Y2.Test.Case({
name: "Usestar tests",
test_use_star: function () {
// Loader should not have been pulled in if dependencies are right
Y2.Assert.isUndefined(Y2.Loader);
}
});
});
YUI({
bootstrap: false
}).use("test", "blahblah", function(Y3) {
// Y.log('Use missing');
count++;
testUse = new Y.Test.Case({
name: "Usestar tests",
test_missing_message: function () {
}
});
});
Y.Test.Runner.add(testUse);
Y.Test.Runner.run();
testRan = new Y.Test.Case({
name: "ran tests",
test_ran: function () {
// tests to make sure the use('*') callback executed
Y.Assert.areEqual(2, count);
}
});
Y.Test.Runner.add(testRan);
Y.Test.Runner.run();
});
})();
</script>
</body>
</html>