~ubuntu-branches/ubuntu/raring/maas/raring-updates

« back to all changes in this revision

Viewing changes to src/maasserver/static/jslibs/yui/3.4.1/tests/classnamemanager/tests/classnamemanager.html

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2012-07-03 17:42:37 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20120703174237-p8l0keuuznfg721k
Tags: 0.1+bzr709+dfsg-0ubuntu1
* New Upstream release
* debian/control:
  - Depends on python-celery, python-tempita, libjs-yui3-{full,min},
    libjs-raphael
* debian/maas.install:
  - Install apiclient, celeryconfig.py, maas-import-pxe-files, preseeds_v2.
  - Update to install various files from chroot, rather tha manually copy
    them from the source.
* debian/maas.links: symlink celeryconfig.py
* debian/maas.maas-celery.upstart: Add job.
* debian/rules:
  - Install celery upstart job.
  - Do not install jslibs as packages are now used.
  - Drop copying of maas_local_settings_sample.py as source now ships
    a maas_local_settings.py
* debian/patches:
  - 04-maas-http-fix.patch: Drop. Merged upstream.
  - 01-fix-database-settings.patch: Refreshed.
  - 99_enums_js.patch: Added until creation of enum.js / build process
    is fixed.
* debian/maas.postinst: Update bzr version to correctly handle upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
 
<html>
3
 
<head>
4
 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
 
        <title>YUI ClassNameManager Tests</title>
6
 
    <script src="../../../build/yui/yui.js" type="text/javascript"></script>
7
 
    <style type="text/css">
8
 
        #console .yui3-console-entry {
9
 
            padding:2px;
10
 
            margin:0px;
11
 
            min-height:0;
12
 
        }
13
 
 
14
 
        #console .yui3-console-entry-fail .yui3-console-entry-cat {
15
 
            background-color:red;
16
 
        }
17
 
 
18
 
        #console .yui3-console-entry-pass .yui3-console-entry-cat {
19
 
            background-color:green;
20
 
        }
21
 
 
22
 
        #console .yui3-console-entry-perf .yui3-console-entry-cat {
23
 
            background-color:blue;
24
 
        }
25
 
 
26
 
        #console {
27
 
            position:static;
28
 
        }
29
 
 
30
 
        html, body {
31
 
            height:100%;
32
 
        }
33
 
    </style>
34
 
    
35
 
</head>
36
 
<body class="yui3-skin-sam">
37
 
<script type="text/javascript">
38
 
        YUI({
39
 
        useBrowserConsole:false,
40
 
        filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'min'
41
 
    }).use("test", "classnamemanager", "console", function(Y) {
42
 
 
43
 
            var testClassNameManager = new Y.Test.Case({
44
 
 
45
 
            name: "ClassNameManager Tests",
46
 
 
47
 
            testSingleSection: function() {
48
 
                                Y.Assert.areEqual(Y.ClassNameManager.getClassName("menuitem"), "yui3-menuitem");
49
 
            },
50
 
            
51
 
            testSingleSectionNoPrefix: function() {
52
 
                Y.Assert.areEqual(Y.ClassNameManager.getClassName("menuitem", true), "menuitem");
53
 
            },
54
 
            
55
 
            testMoreThanOneSection : function() {
56
 
                                Y.Assert.areEqual(Y.ClassNameManager.getClassName("menuitem", "active"), "yui3-menuitem-active");
57
 
            },
58
 
 
59
 
            testMoreThanOneSectionNoPrefix : function() {
60
 
                Y.Assert.areEqual(Y.ClassNameManager.getClassName("menuitem", "active", true), "menuitem-active");
61
 
            }
62
 
        });
63
 
 
64
 
        var suite = new Y.Test.Suite("ClassNameManager Tests");
65
 
        suite.add(new Y.Test.Case(testClassNameManager));
66
 
 
67
 
        Y.Test.Runner.setName("ClassNameManager Tests");
68
 
        Y.Test.Runner.add(suite);
69
 
        Y.Test.Runner.disableLogging();
70
 
        Y.Test.Runner.run();
71
 
        
72
 
        var console;
73
 
        
74
 
        Y.one("#btnRun").set("disabled", false).on("click", function() {
75
 
            if (!console) {
76
 
                console = new Y.Console({
77
 
                    id:"console",
78
 
                    width:"100%",
79
 
                    height:"90%",
80
 
                    verbose : false,
81
 
                    printTimeout: 0,
82
 
                    newestOnTop : false,
83
 
                    entryTemplate: '<pre class="{entry_class} {cat_class} {src_class}">'+
84
 
                            '<span class="{entry_cat_class}">{label}</span>'+
85
 
                            '<span class="{entry_content_class}">{message}</span>'+
86
 
                    '</pre>'
87
 
                }).render();
88
 
            }
89
 
    
90
 
            Y.Test.Runner.enableLogging();
91
 
            Y.Test.Runner.run();
92
 
        });
93
 
        });
94
 
</script>
95
 
<p><input type="button" value="Run Tests" id="btnRun" disabled=true></p>
96
 
</body>
97
 
</html>