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_apps_mgmt.js | |
parent | b5b9e95e2f4c8ab19cef000c82fcfc0625c52666 (diff) |
Diffstat (limited to 'apps/system/test/unit/mock_apps_mgmt.js')
-rw-r--r-- | apps/system/test/unit/mock_apps_mgmt.js | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/apps/system/test/unit/mock_apps_mgmt.js b/apps/system/test/unit/mock_apps_mgmt.js deleted file mode 100644 index 948ef02..0000000 --- a/apps/system/test/unit/mock_apps_mgmt.js +++ /dev/null @@ -1,64 +0,0 @@ -var MockAppsMgmt = { - getAll: function mam_getAll() { - var request = {}; - - setTimeout((function nextTick() { - if (request.onsuccess) { - var evt = { - target: { - result: this.mApps - } - }; - request.onsuccess(evt); - if (this.mNext) { - this.mNext(); - } - } - }).bind(this)); - - return request; - }, - - applyDownload: function mam_applyDownload(app) { - this.mLastAppApplied = app; - }, - - mApps: [], - mLastAppApplied: null, - mNext: null, - mTeardown: function mam_mTeardown() { - this.mLastAppApplied = null; - this.mApps = []; - this.mNext = null; - }, - - mTriggerOninstall: function mam_mTriggerOninstall(app) { - if (this.oninstall) { - var evt = { - application: app - }; - this.oninstall(evt); - } - - var evt = document.createEvent('CustomEvent'); - evt.initCustomEvent('applicationinstall', - true, false, - { application: app }); - window.dispatchEvent(evt); - }, - - mTriggerOnuninstall: function mam_mTriggerOnuninstall(app) { - if (this.onuninstall) { - var evt = { - application: app - }; - this.onuninstall(evt); - } - - var evt = document.createEvent('CustomEvent'); - evt.initCustomEvent('applicationuninstall', - true, false, - { application: app }); - window.dispatchEvent(evt); - } -}; |