33 var SB_PROP_ARTISTNAME =
"http://songbirdnest.com/data/1.0#artistName";
39 onItemAdded:
function(list, item, index) {},
40 onBeforeItemRemoved:
function(list, item, index) {},
41 onAfterItemRemoved:
function(list, item, index) {},
42 onItemUpdated:
function(list, item, properties) {
43 this.properties = properties;
45 onItemMoved:
function(list, fromIndex, toIndex) {},
46 onBeforeListCleared:
function(list, excludeLists) {},
47 onListCleared:
function(list, excludeLists) {},
48 onBatchBegin:
function(list) {},
49 onBatchEnd:
function(list) {}
52 library.addListener(listener,
false);
53 var item = library.createMediaItem(
newURI(
"http://foo.com/foo.mp3"));
55 var
value =
"The Rolling Stones";
56 item.setProperty(SB_PROP_ARTISTNAME, value);
60 var prop = listener.properties.getPropertyAt(0);
64 item.setProperty(SB_PROP_ARTISTNAME,
"The Bealtes");
66 prop = listener.properties.getPropertyAt(0);
70 library.removeListener(listener);
function assertEqual(aExpected, aActual, aMessage)
function runTest()
Test file.
function createLibrary(databaseGuid, databaseLocation)
function newURI(aURLString)