Publish Vulpes Preview 15 sources for desktop, Android and Tundra

Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

View file

@ -0,0 +1,63 @@
'use strict';
/* exported MockNotificationScreen */
var MockNotificationScreen = {
wasMethodCalled: {},
mockMethods: [
'addUnreadNotification',
'removeUnreadNotification',
'updateNotificationIndicator',
'addNotification',
'removeNotification'
],
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(param) {
this.methodCalled(methodName);
if (methodName == 'addNotification' && this.mCallback) {
this.mCallback(param);
}
if (methodName == 'addNotification' ||
methodName == 'removeNotification') {
return {
addEventListener: function() {},
removeEventListener: function() {},
//
// Actual parent node: <div id="desktop-notifications-container">
//
// This dummy parent node is used to pass the null check in
// CaptivePortal::dismissNotification() in captive_portal.js.
//
parentNode: document.createElement('div')
};
}
};
}, 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();