32 var
url =
"data:application/vnd.mozilla.xul+xml," +
33 "<?xml-stylesheet href='chrome://global/skin' type='text/css'?>" +
34 "<?xml-stylesheet href='chrome://songbird/content/bindings/bindings.css' type='text/css'?>" +
35 "<window xmlns='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'/>";
44 var databaseGUID =
"test_view_selection";
47 const XUL_NS =
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
51 var playlist = document.createElementNS(
XUL_NS,
"sb-playlist");
52 playlist.setAttribute(
"flex",
"1");
53 document.documentElement.appendChild(playlist);
54 playlist.bind(library.createView(),
null);
65 playlist.mediaListView.selection.selectAll();
79 log(
"testSelectAllScrolled");
80 playlist.tree.boxObject.ensureRowIsVisible(library.length - 1);
92 log(
"testSelectSome");
95 var selection = playlist.mediaListView.selection;
97 selection.toggle(library.length - 1);
101 assertTrue(playlist.tree.view.selection.isSelected(library.length - 1));
103 playlist.tree.boxObject.ensureRowIsVisible(0);
111 log(
"testSelectSomeScrolled");
115 assertTrue(playlist.tree.view.selection.isSelected(0));
122 return Cc[
"@songbirdnest.com/Songbird/Properties/MutablePropertyArray;1"]
123 .createInstance(
Ci.sbIMutablePropertyArray);
127 var selection = tree.view.selection;
128 var box = tree.boxObject;
131 for (var
i = box.getFirstVisibleRow();
i < box.getLastVisibleRow();
i++) {
function safeSetTimeout(closure, timeout)
function runTest()
Test that changes in the view's selection are reflected into the tree.
function endWindowTest(e)
function beginWindowTest(url, continueFunction)
function assertTrue(aTest, aMessage)
function assertAllVisibleRowsSelected(tree)
function testSelectAll(library, playlist)
function createPropertyArray()
function createLibrary(databaseGuid, databaseLocation)
function testSelectSome(library, playlist)
function testSelectAllScrolled(library, playlist)
function testSelectSomeScrolled(library, playlist)
_getSelectedPageStyle s i
function continueWindowTest(fn, parameters)