Sha256: 90087537c82d6c5c59929ab6db262d316197e17ae951adb123f435c1e2bcd9ad

Contents?: true

Size: 1.65 KB

Versions: 24

Compression:

Stored size: 1.65 KB

Contents

/**
 * @author thatcher
 */
var global_scope=this;

(function(Q){

    Q.describe('Window Basic Properties',{

        before:function(){
            //setup
        },
        after:function(){
            //tear down
        }    
        
    }).should('provide the required w3c interfaces', function(){

        expect(19);
        ok(window,              'window');
        ok(self,                'self');
        ok(top,                 'top');
        ok(parent,              'parent');
        ok(window.toString(),   '[object Window]');
        
        //these values are usually the empty string ''
        //so we just verify the property is available
        ok('name' in window,            'name');
        ok('status' in window,          'status');
        ok('closed' in window,          'closed');
        ok('defaultStatus' in window,   'defaultStatus');
        ok('length' in window,          'length');
        ok('opener' in window,          'opener');
        
        ok(frames,              'frames');
        ok(open,                'open');
        ok(close,               'close');
        ok(innerHeight,         'innerHeight');
        ok(outerHeight,         'outerHeight');
        ok(outerWidth,          'outerWidth');
        ok(screenX,             'screenX');
        ok(screenY,             'screenY');

        
    }).should('have the expected values', function(){
        
        equals( window, global_scope,   'window is the global scope "this"');
        equals( window, self,           'self is an alias for window');
        equals( window, top,            'top is an alias for window when the window is not in a frame');

    });
    
})(QUnit);

Version data entries

24 entries across 24 versions & 4 rubygems

Version Path
envjs19-0.3.8.20101029121421 test/specs/window/window.js
envjs-0.3.8 test/specs/window/window.js
envjs-0.3.7 test/specs/window/window.js
envjs-0.3.6 test/specs/window/window.js
envjs-0.3.5 test/specs/window/window.js
envjs-0.3.4 test/specs/window/window.js
envjs-0.3.3 test/specs/window/window.js
envjs-0.3.2 test/specs/window/window.js
envjs-0.3.1 test/specs/window/window.js
envjs-0.3.0 test/specs/window/window.js
envjs-0.2.0 test/specs/window/window.js
envjs-0.1.7 test/specs/window/window.js
envjs-0.1.6 test/specs/window/window.js
envjs-0.1.5 test/specs/window/window.js
envjs-0.1.4 test/specs/window/window.js
envjs-0.1.3 test/specs/window/window.js
harmony-0.5.1 vendor/envjs/test/specs/window/window.js
harmony-0.5 vendor/envjs/test/specs/window/window.js
envjs-0.1.2 test/specs/window/window.js
envjs-0.1.1 test/specs/window/window.js