diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-02-06 16:36:20 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-02-06 16:36:20 (GMT) |
commit | 66dae0ccbc23f4df612711a2e61fadd9b15feb91 (patch) | |
tree | a069ef55f4d97b6419f38d8ce86eb19f5cc1f1e7 /apps/system/test/unit/mock_notification_screen.js | |
parent | b5b9e95e2f4c8ab19cef000c82fcfc0625c52666 (diff) |
Diffstat (limited to 'apps/system/test/unit/mock_notification_screen.js')
-rw-r--r-- | apps/system/test/unit/mock_notification_screen.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/apps/system/test/unit/mock_notification_screen.js b/apps/system/test/unit/mock_notification_screen.js deleted file mode 100644 index 2c88a90..0000000 --- a/apps/system/test/unit/mock_notification_screen.js +++ /dev/null @@ -1,38 +0,0 @@ -var MockNotificationScreen = { - wasMethodCalled: {}, - - mockMethods: [ - 'incExternalNotifications', - 'decExternalNotifications', - 'updateStatusBarIcon' - ], - - mockPopulate: function mockPopulate() { - this.mockMethods.forEach(function(methodName) { - // we could probably put this method outside if we had a closure - this[methodName] = function mns_method() { - this.methodCalled(methodName); - }; - }, this); - }, - - init: function mns_init() { - this.wasMethodCalled = {}; - this.mockMethods.forEach(function(methodName) { - this[methodName].wasCalled = false; - }, this); - }, - - methodCalled: function mns_methodCalled(name) { - this.wasMethodCalled[name] = - this.wasMethodCalled[name] ? this.wasMethodCalled[name]++ : 1; - this[name].wasCalled = true; - }, - - mTeardown: function mns_mTeardown() { - this.init(); - } -}; - -MockNotificationScreen.mockPopulate(); - |