27 var prop =
"http://songbirdnest.com/data/1.0#cdRipStatus";
30 Cc[
"@songbirdnest.com/Songbird/Properties/Builder/StatusProperty;1"]
31 .createInstance(
Ci.sbIStatusPropertyBuilder);
33 builder.propertyID = prop;
34 builder.labelKey =
"property.cdrip_status";
35 builder.completedLabelKey =
"property.cdrip_completed";
36 builder.failedLabelKey =
"property.cdrip_failed";
37 var pi = builder.get();
46 assertEqual(pi.format(
"3|100"),
"Unable to rip this CD track");
48 var tvpi = pi.QueryInterface(
Ci.sbITreeViewPropertyInfo);
51 assertEqual(tvpi.getProgressMode(
"0|0"),
Ci.nsITreeView.PROGRESS_NONE);
52 assertEqual(tvpi.getProgressMode(
"1|0"),
Ci.nsITreeView.PROGRESS_NORMAL);
53 assertEqual(tvpi.getProgressMode(
"2|0"),
Ci.nsITreeView.PROGRESS_NONE);
54 assertEqual(tvpi.getProgressMode(
"3|0"),
Ci.nsITreeView.PROGRESS_NONE);
function assertEqual(aExpected, aActual, aMessage)
function runTest()
Advanced DataRemote unit tests.