~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/dom/tests/dom-region-test.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
 
YUI.add('dom-region-test', function(Y) {
2
 
    var Assert = Y.Assert;
3
 
        ArrayAssert = Y.ArrayAssert;
4
 
 
5
 
    Y.Test.Runner.add(new Y.Test.Case({
6
 
        name: 'Y.DOM.region',
7
 
 
8
 
        'should return a region containing the correct data': function() {
9
 
            var node = document.body,
10
 
                r = Y.DOM.region(node),
11
 
                xy = Y.DOM.getXY(node);
12
 
 
13
 
            Assert.areEqual(node.offsetWidth, r.width);
14
 
            Assert.areEqual(node.offsetHeight, r.height);
15
 
 
16
 
            Assert.areEqual(xy[0], r.left);
17
 
            Assert.areEqual(xy[1], r.top);
18
 
            
19
 
            Assert.areEqual(node.offsetWidth + xy[0], r.right);
20
 
            Assert.areEqual(node.offsetHeight + xy[1], r.bottom);
21
 
            
22
 
            Assert.areEqual(xy[0], r[0]);
23
 
            Assert.areEqual(xy[1], r[1]);
24
 
        },
25
 
 
26
 
        'should return false for bad input': function() {
27
 
            Assert.isFalse(Y.DOM.region());
28
 
            Assert.isFalse(Y.DOM.region(document));
29
 
        }
30
 
    }));
31
 
}, '@VERSION@' ,{requires:['dom-screen', 'test']});