 testFolder.containerOpen = false; rootNode.containerOpen = false; } catch(ex) { do_throw("bookmarks query tests failed: " + ex); } 
 var livemark = toolbar.getChild(1);  do_check_eq("Latest Headlines", livemark.title);  do_check_true(livemarksvc.isLivemark(livemark.itemId));  do_check_eq("http: livemarksvc.getSiteURI(livemark.itemId).spec);  do_check_eq("http: livemarksvc.getFeedURI(livemark.itemId).spec);  toolbar.containerOpen = false;   var testFolder = rootNode.getChild(5); do_check_eq(testFolder.type, testFolder.RESULT_TYPE_FOLDER); do_check_eq(testFolder.title, "test"); testFolder = testFolder.QueryInterface(Ci.nsINavHistoryQueryResultNode); do_check_eq(testFolder.hasChildren, true);  do_check_true(annosvc.itemHasAnnotation(testFolder.itemId, DESCRIPTION_ANNO)); do_check_eq("folder test comment", annosvc.getItemAnnotationString(testFolder.itemId, DESCRIPTION_ANNO));  testFolder.containerOpen = true; var cc = testFolder.childCount;   do_check_eq(cc, 1);   var testBookmark1 = testFolder.getChild(0);  do_check_eq("http:  do_check_eq("test post keyword", testBookmark1.title);  do_check_eq("test", bmsvc.getKeywordForBookmark(testBookmark1.itemId));  do_check_true(annosvc.itemHasAnnotation(testBookmark1.itemId, LOAD_IN_SIDEBAR_ANNO));    var pageURI = iosvc.newURI(testBookmark1.uri, "", null); do_check_true(annosvc.pageHasAnnotation(pageURI, POST_DATA_ANNO)); do_check_eq("hidden1%3Dbar&text1%3D%25s", annosvc.getPageAnnotationString(pageURI, POST_DATA_ANNO));   do_check_true(annosvc.itemHasAnnotation(testBookmark1.itemId, DESCRIPTION_ANNO)); do_check_eq("item description", annosvc.getItemAnnotationString(testBookmark1.itemId, DESCRIPTION_ANNO));  /*   var testBookmark2 = testFolder.getChild(1);  do_check_eq("http:  do_check_eq("test microsummary", testBookmark2.title);  var micsum = mssvc.getMicrosummary(testBookmark2.itemId); if (!micsum) do_throw("Could not import microsummary");  var generator = micsum.generator; do_check_eq("urn:source:http:  */  testFolder.containerOpen = false; rootNode.containerOpen = false; 
function testCanonicalBookmarks(aFolder) {  // query to see if the deleted folder and items have been imported  try {    var query = histsvc.getNewQuery();    query.setFolders([bmsvc.bookmarksRoot], 1);    var result = histsvc.executeQuery(query, histsvc.getNewQueryOptions());    var rootNode = result.root;    rootNode.containerOpen = true;    // get test folder    var testFolder = rootNode.getChild(3);    do_check_eq(testFolder.type, testFolder.RESULT_TYPE_FOLDER);    do_check_eq(testFolder.title, "test");    testFolder = testFolder.QueryInterface(Ci.nsINavHistoryQueryResultNode);    do_check_eq(testFolder.hasChildren, true);    // folder description    do_check_true(annosvc.itemHasAnnotation(testFolder.itemId,                                            DESCRIPTION_ANNO));    do_check_eq("folder test comment",                annosvc.getItemAnnotationString(testFolder.itemId,                                                DESCRIPTION_ANNO));    // open test folder, and test the children     testFolder.containerOpen = true;    var cc = testFolder.childCount;    // XXX Bug 380468    // do_check_eq(cc, 2);    do_check_eq(cc, 1);    // test bookmark 1    var testBookmark1 = testFolder.getChild(0);    // url    do_check_eq("http://test/post", testBookmark1.uri);    // title    do_check_eq("test post keyword", testBookmark1.title);    // keyword    do_check_eq("test", bmsvc.getKeywordForBookmark(testBookmark1.itemId));    // sidebar    // add date     // last modified    // post data    // last charset     // description     do_check_true(annosvc.itemHasAnnotation(testBookmark1.itemId,                                            DESCRIPTION_ANNO));    do_check_eq("item description",                annosvc.getItemAnnotationString(testBookmark1.itemId,                                                DESCRIPTION_ANNO));    /*    // XXX Bug 380468    // test bookmark 2    var testBookmark2 = testFolder.getChild(1);    // url    do_check_eq("http://test/micsum", testBookmark2.uri);    // title    do_check_eq("test microsummary", testBookmark2.title);    // check that it's a microsummary    var micsum = mssvc.getMicrosummary(testBookmark2.itemId);    if (!micsum)      do_throw("Could not import microsummary");    // check generator uri    var generator = micsum.generator;    do_check_eq("urn:source:http://dietrich.ganx4.com/mozilla/test-microsummary.xml", generator.uri.spec);    // expiration and generated title can change, so don't test them    */    // clean up    testFolder.containerOpen = false;    rootNode.containerOpen = false;  }  catch(ex) {    do_throw("bookmarks query tests failed: " + ex);  }}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/c9ebcce8b95cb170455e9c3bc4ab23f4dda86197/test_bookmarks_html.js/buggy/browser/components/places/tests/unit/test_bookmarks_html.js