Sha256: d01ec4028ca1ba76fd0c64aca9942517f4c780d428032edd096c6fa0f07bf4c3

Contents?: true

Size: 782 Bytes

Versions: 9

Compression:

Stored size: 782 Bytes

Contents

require('Core');
require('foundation/object');

/**
  @namespace Mocks for unit testing
  @author Skip Baney
  @copyright 2006-2008, Sprout Systems, Inc. and contributors.
  @version 0.1
  
  Mock objects provide basic support for unit testing.  Look for subclasses.
  
*/
SC.Mock = {};

/**
* Base DOM event mock
* @extends SC.Object
*/
SC.Mock.DOMEvent = SC.Object.extend(
/** @scope SC.Mock.DOMEvent.prototype */ 
{
  type:    null,
  target:  null,
  stopped: false,
  preventDefault: function() {},
  stopPropagation: function() {}
});

/**
* Mock for key events
* @extends SC.Mock.DOMEvent
*/
SC.Mock.KeyEvent = SC.Mock.DOMEvent.extend(
/** @scope SC.Mock.KeyEvent.prototype */ 
{
  keyCode:  0,
  altKey:   false,
  ctrlKey:  false,
  shiftKey: false,
  metaKey:  false
});

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sproutcore-0.9.10 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.2 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.3 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.5 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.4 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.6 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.8 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.7 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.9 frameworks/sproutcore/foundation/mock.js