33 Components.utils.import(
"resource://app/jsmodules/sbProperties.jsm");
34 Components.utils.import(
"resource://app/jsmodules/sbLibraryUtils.jsm");
40 var view = list.createView();
44 [SBProperties.artistName, [
"AC/DC"]]
48 view.searchConstraint =
search;
53 [SBProperties.trackName, [
"Shoot",
"Thrill"]],
56 view.searchConstraint =
search;
59 view.searchConstraint =
null;
65 [SBProperties.artistName, [
"AC/DC"]],
66 [SBProperties.albumName, [
"AC/DC"]]
69 [SBProperties.artistName, [
"Thrill"]],
70 [SBProperties.trackName, [
"Thrill"]]
75 view.searchConstraint =
search;
76 fail(
"did not throw");
84 [SBProperties.artistName, [
"AC/DC"]],
85 [SBProperties.trackName, [
"foo"]],
86 [SBProperties.albumName, [
"foo"]]
89 [SBProperties.artistName, [
"Thrill"]],
90 [SBProperties.trackName, [
"Thrill"]],
91 [SBProperties.albumName, [
"Thrill"]]
96 view.searchConstraint =
search;
97 fail(
"did not throw");
104 list = library.getMediaItem(
"7e8dcc95-7a1d-4bb3-9b14-d4906a9952cb");
105 view = list.createView();
108 [SBProperties.artistName, [
"AC/DC"]]
111 view.searchConstraint =
search;
114 view.searchConstraint =
null;
125 var view = library.createView();
126 var cfs = view.cascadeFilterSet;
128 cfs.appendSearch([
"*"], 1);
129 var searchArray = searchTerm.split(
" ");
130 cfs.set(0, searchArray, searchArray.length);
135 return Cc[
"@songbirdnest.com/Songbird/Properties/MutablePropertyArray;1"]
136 .createInstance(
Ci.sbIMutablePropertyArray);
function createPropertyArray()
function assertEqual(aExpected, aActual, aMessage)
function searchBoxTest(searchTerm, resultViewLength)
function search(aFolderId, aSearchStr, aExpectedScopeButtonId)
function createLibrary(databaseGuid, databaseLocation)
Javascript wrappers for common library tasks.
function runTest()
Test file.