Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/apps/system/test/unit/mock_apps_mgmt.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/system/test/unit/mock_apps_mgmt.js')
-rw-r--r--apps/system/test/unit/mock_apps_mgmt.js64
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);
- }
-};