~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/event-custom/tests/src/event-custom-base-node.js

  • 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
 
suite = new Y.Test.Suite("Node as EventTarget, and NodeList API");
2
 
 
3
 
suite.add(new Y.Test.Case({
4
 
    name: "node as EventTarget"
5
 
 
6
 
    // custom events
7
 
    // synth events
8
 
 
9
 
}));
10
 
 
11
 
suite.add(new Y.Test.Case({
12
 
    name: "nodelist.on once, onceAfter, detach, detachAll, etc"
13
 
 
14
 
}));
15
 
 
16
 
suite.add(new Y.Test.Case({
17
 
    name: "node.publish",
18
 
 
19
 
    test_node_publish: function() {
20
 
        var node = Y.one('#adiv');
21
 
 
22
 
        var preventCount = 0, heard = 0;
23
 
        node.publish('foo1', {
24
 
            emitFacade: true,
25
 
            // should only be called once
26
 
            preventedFn: function() {
27
 
                preventCount++;
28
 
                Y.Assert.isTrue(this instanceof Y.Node);
29
 
            }
30
 
        });
31
 
 
32
 
        node.on('foo1', function(e) {
33
 
            Y.Assert.areEqual('faking foo', e.type);
34
 
            Y.Assert.areEqual('foo1', e._type);
35
 
            heard++;
36
 
            e.preventDefault();
37
 
        });
38
 
 
39
 
        node.on('foo1', function(e) {
40
 
            heard++;
41
 
            e.preventDefault();
42
 
        });
43
 
 
44
 
        node.fire('foo1', {
45
 
            type: 'faking foo'
46
 
        });
47
 
 
48
 
        Y.Assert.areEqual(1, preventCount);
49
 
        Y.Assert.areEqual(2, heard);
50
 
    }
51
 
}));
52
 
 
53
 
Y.Test.Runner.add(suite);