Sha256: 9a0440416da648c8196bf720fa428f0b8c46c5aad2c7bb50ba41a321e4291315

Contents?: true

Size: 782 Bytes

Versions: 13

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

13 entries across 13 versions & 1 rubygems

Version Path
sproutcore-0.9.12 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.11 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.15 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.14 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.13 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.18 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.19 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.17 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.16 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.23 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.21 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.20 frameworks/sproutcore/foundation/mock.js
sproutcore-0.9.22 frameworks/sproutcore/foundation/mock.js