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
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly<script type="text/javascript" src="/build/yui/yui.js"></script>
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly<p><select id="testSelector"></select> <input type="button" value="Run Test" id="btnRun" disabled=true></p>
c77d701a41f1b77424b988c2e63f2a8e6829c7e6Luke Smith filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'min',
c77d701a41f1b77424b988c2e63f2a8e6829c7e6Luke Smith allowRollup: false,
c77d701a41f1b77424b988c2e63f2a8e6829c7e6Luke Smith useBrowserConsole: false
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly }).use("console", "profiler", "dump", "datasource", function(Y) {
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly // Set up the page
4922efa846185f8503d58aa880150b2fdc6a8db4Jenny Donnelly var BTNRUN = Y.one("#btnRun"),
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly myConsole = new Y.Console().render();
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly BTNRUN.set("disabled", false);
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly Y.on("click", function(e){
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly Y.namespace("example").Perf = function() {
4922efa846185f8503d58aa880150b2fdc6a8db4Jenny Donnelly var selectNode = Y.one("#testSelector"),
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly allTests = [];
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly init: function() {
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly this.register("Test DataSource.Local", function() {
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly source: ["a","b","c","d"]
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly success: function(o) {},
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly failure: function(e) {}
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly while(i++<100) {
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly var optionEl = document.createElement("option");
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly optionEl.innerHTML = "Test " + index + ": " + testName;
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly var whichTest = selectNode.get("selectedIndex");
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly Y.log("Starting Test " + whichTest, "info", "perf");
6e89f0a006cdbb50151504b3107096e365136687Jenny Han Donnelly Y.log("Test " + whichTest + " completed", "info", "perf");