blob: 8813a3bd2f7a24e88c1a05e03e389e91f6edec33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
var MockStatusBar = {
notificationsCount: null,
wasMethodCalled: {},
methodCalled: function msb_methodCalled(name) {
this.wasMethodCalled[name] =
this.wasMethodCalled[name] ? this.wasMethodCalled[name]++ : 1;
},
updateNotification: function(count) {
var number = new Number(count);
this.notificationsCount = number.toString();
this.methodCalled('updateNotification');
},
updateNotificationUnread: function(unread) {
this.mNotificationUnread = unread;
},
mNotificationUnread: false,
mTeardown: function teardown() {
this.notificationsCount = null;
this.mNotificationsUpdated = false;
this.mNotificationUnread = false;
this.wasMethodCalled = {};
},
incSystemDownloads: function msb_incSystemDownloads() {
this.methodCalled('incSystemDownloads');
},
decSystemDownloads: function msb_decSystemDownloads() {
this.methodCalled('decSystemDownloads');
}
};
|