~smagoun/whoopsie/whoopsie-lp1017637

« back to all changes in this revision

Viewing changes to backend/stats/static/js/yui/tests/loader/tests/server/loader_template.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>Combo Test for {KEY}</title>
5
 
</head>
6
 
<body>
7
 
<h1>Combo Test for {KEY}</h1>
8
 
<script src="/build/yui-base/yui-base-debug.js"></script>
9
 
<script>
10
 
var sendResult = function(d) {
11
 
    if (parent.window && parent.window._yui_result) {
12
 
        parent.window._yui_result(d);
13
 
    } else {
14
 
        console.log('FAILED!!');
15
 
        console.log(d);
16
 
    }
17
 
};
18
 
try {
19
 
    YUI({
20
 
        useBrowserConsole: false,
21
 
        combine: true,
22
 
        comboBase: 'http://127.0.0.1:5000/combo?',
23
 
        root: 'build/'
24
 
    }).use('{KEY_USE}', function(Y) {
25
 
        sendResult({
26
 
            name: '{KEY}',
27
 
            result: Y.Env._missed,
28
 
            err: null
29
 
        });
30
 
    });
31
 
} catch (e) {
32
 
    sendResult({
33
 
        name: '{KEY}',
34
 
        result: [],
35
 
        err: e
36
 
    });
37
 
}
38
 
setTimeout(function() {
39
 
    sendResult({
40
 
        name: '{KEY}',
41
 
        result: [],
42
 
        err: 'Module failed to load, error from timeout'
43
 
    });
44
 
}, 5000);
45
 
window.onerror = function(e) {
46
 
    sendResult({
47
 
        name: '{KEY}',
48
 
        result: [],
49
 
        err: e
50
 
    });
51
 
}
52
 
</script>
53
 
</body>
54
 
</html>