Support the legacy "newsstandAvailable" property
This commit is contained in:
Родитель
743672bb53
Коммит
727854410f
|
@ -68,6 +68,13 @@ Notification.prototype = {
|
|||
if (typeof value == "boolean" || value === undefined) {
|
||||
this._contentAvailable = value;
|
||||
}
|
||||
},
|
||||
|
||||
get newsstandAvailable() {
|
||||
return this.contentAvailable;
|
||||
},
|
||||
set newsstandAvailable(value) {
|
||||
this.contentAvailable = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -118,6 +118,18 @@ describe("Notification", function() {
|
|||
note.contentAvailable = "true";
|
||||
expect(note.contentAvailable).to.be.undefined;
|
||||
});
|
||||
|
||||
describe("newsstand-available property", function() {
|
||||
it("sets the content available flag", function() {
|
||||
note.newsstandAvailable = true;
|
||||
expect(note.contentAvailable).to.equal(true);
|
||||
});
|
||||
|
||||
it("returns the content-available flag", function() {
|
||||
note.contentAvailable = false;
|
||||
expect(note.newsstandAvailable).to.equal(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче