~bcsaller/juju-gui/charmFind

« back to all changes in this revision

Viewing changes to lib/yui/tests/oop/tests/clone.html

  • Committer: kapil.foss at gmail
  • Date: 2012-07-13 18:45:59 UTC
  • Revision ID: kapil.foss@gmail.com-20120713184559-2xl7be17egsrz0c9
reshape

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html>
2
 
<html>
3
 
<head>
4
 
    <title>YUI 3.2.0 Cloning Event kills window.undefined</title>
5
 
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
6
 
</head>
7
 
<body lang="en-US" class="yui3-skin-sam">
8
 
 
9
 
    <h1>Y.clone bug w/ events</h1>
10
 
 
11
 
 
12
 
<!--
13
 
    <script type="text/javascript" src="http://yui.yahooapis.com/combo?3.1.1/build/yui/yui-min.js"></script>
14
 
    -->
15
 
    <script type="text/javascript" src="../../../build/yui/yui-min.js"></script>
16
 
 
17
 
    <script type="text/javascript">
18
 
        YUI({
19
 
            combine: false,
20
 
            filter: "raw"
21
 
        }).use("dump", "test", "node", "event", "console", function(Y) {
22
 
                var ev = Y.on("click", function(e) {
23
 
            //no-op
24
 
            }, "#h1");
25
 
 
26
 
            // var ev = Y.on('fooboo', function(e) { });
27
 
 
28
 
            var r = new Y.Console({
29
 
                verbose : true,
30
 
                newestOnTop : false,
31
 
                height: '600px',
32
 
                width: "500px"
33
 
            }).render();
34
 
 
35
 
            Y.Test.Runner.add(new Y.Test.Case({
36
 
                "window.undefined should start out undefined" : function() {
37
 
                    Y.assert(typeof window.undefined === "undefined");
38
 
                },
39
 
 
40
 
                "window.undefined should still be undefined after cloning an event" : function() {
41
 
                    Y.clone(ev);
42
 
 
43
 
                    Y.log(window.undefined);
44
 
                    Y.assert(typeof window.undefined === "undefined");
45
 
                }
46
 
            })).run();
47
 
        });
48
 
    </script>
49
 
</body>
50
 
</html>
51