33 var databaseGUID =
"test_guidarray_length";
35 var listId = library.QueryInterface(
Ci.sbILocalDatabaseLibrary).getMediaItemIdForGuid(
"7e8dcc95-7a1d-4bb3-9b14-d4906a9952cb");
38 var
array =
Cc[
"@songbirdnest.com/Songbird/Library/LocalDatabase/GUIDArray;1"]
39 .createInstance(
Ci.sbILocalDatabaseGUIDArray);
40 array.databaseGUID = databaseGUID;
42 library.QueryInterface(
Ci.sbILocalDatabaseLibrary).propertyCache;
46 array.baseTable =
"media_items";
47 array.addSort(
"http://songbirdnest.com/data/1.0#albumName",
true);
53 array.addFilter(
"http://songbirdnest.com/data/1.0#albumName",
58 array.addFilter(
"http://songbirdnest.com/data/1.0#artistName",
63 array.addFilter(
"http://songbirdnest.com/data/1.0#trackName",
70 array.addFilter(
"http://songbirdnest.com/data/1.0#contentURL",
72 "file:///home/steve/That%20Jim.mp3",
73 "file:///home/steve/You%20Shook%20Me%20All%20Night%20Long.mp3"]),
77 array.addFilter(
"http://songbirdnest.com/data/1.0#contentLength",
84 array.addFilter(
"http://songbirdnest.com/data/1.0#contentURL",
86 "file:///home/steve/That%20Jim.mp3",
87 "file:///home/steve/You%20Shook%20Me%20All%20Night%20Long.mp3"]),
89 array.addFilter(
"http://songbirdnest.com/data/1.0#artistName",
96 array.addFilter(
"http://songbirdnest.com/data/1.0#artistName",
101 array.clearFilters();
104 array.addFilter(
"http://songbirdnest.com/data/1.0#artistName",
107 array.addFilter(
"http://songbirdnest.com/data/1.0#trackName",
111 array.clearFilters();
114 array.baseTable =
"simple_media_lists";
115 array.baseConstraintColumn =
"media_item_id";
116 array.baseConstraintValue = listId;
122 array.addFilter(
"http://songbirdnest.com/data/1.0#artistName",
127 array.addFilter(
"http://songbirdnest.com/data/1.0#albumName",
131 array.clearFilters();
134 array.addFilter(
"http://songbirdnest.com/data/1.0#contentURL",
136 "file:///home/steve/Take%20on%20Me.mp3",
137 "file:///home/steve/You%20Shook%20Me%20All%20Night%20Long.mp3",
138 "file:///home/steve/Train%20of%20Thought.mp3"]),
142 array.addFilter(
"http://songbirdnest.com/data/1.0#contentLength",
146 array.clearFilters();
149 array.addFilter(
"http://songbirdnest.com/data/1.0#contentURL",
151 "file:///home/steve/Take%20on%20Me.mp3",
152 "file:///home/steve/You%20Shook%20Me%20All%20Night%20Long.mp3",
153 "file:///home/steve/Train%20of%20Thought.mp3"]),
155 array.addFilter(
"http://songbirdnest.com/data/1.0#albumName",
159 array.clearFilters();
162 array.addFilter(
"http://songbirdnest.com/data/1.0#artistName",
168 array.addFilter(
"http://songbirdnest.com/data/1.0#albumName",
172 array.clearFilters();
175 array.addFilter(
"http://songbirdnest.com/data/1.0#artistName",
178 array.addFilter(
"http://songbirdnest.com/data/1.0#trackName",
182 array.clearFilters();
function assertEqual(aExpected, aActual, aMessage)
function runTest()
Test file.
function createLibrary(databaseGuid, databaseLocation)
function StringArrayEnumerator(aArray)