Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/apps/system/test/unit/mock_applications.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/system/test/unit/mock_applications.js')
-rw-r--r--apps/system/test/unit/mock_applications.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/apps/system/test/unit/mock_applications.js b/apps/system/test/unit/mock_applications.js
new file mode 100644
index 0000000..8b3e765
--- /dev/null
+++ b/apps/system/test/unit/mock_applications.js
@@ -0,0 +1,26 @@
+var MockApplications = (function() {
+ var mockApps = {};
+
+ function getByManifestURL(url) {
+ return mockApps[url];
+ }
+
+ function mRegisterMockApp(mockApp) {
+ mockApps[mockApp.manifestURL] = mockApp;
+ }
+
+ function mUnregisterMockApp(mockApp) {
+ mockApps[mockApp.manifestURL] = null;
+ }
+
+ function mTeardown() {
+ mockApps = {};
+ }
+
+ return {
+ getByManifestURL: getByManifestURL,
+ mRegisterMockApp: mRegisterMockApp,
+ mUnregisterMockApp: mUnregisterMockApp,
+ mTeardown: mTeardown
+ };
+})();