setBoolPref("browser.places.createdDefaultQueries", true); 
setBoolPref("browser.places.createdSmartBookmarks", true); 
function run_test() {  // get places import/export service  var importer = Cc["@mozilla.org/browser/places/import-export-service;1"].getService(Ci.nsIPlacesImportExportService);  // avoid creating the places smart folder during tests  Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch).  setBoolPref("browser.places.createdDefaultQueries", true);  // file pointer to legacy bookmarks file  var bookmarksFileOld = do_get_file("browser/components/places/tests/unit/bookmarks.preplaces.html");  // file pointer to a new places-exported bookmarks file  var bookmarksFileNew = dirSvc.get("ProfD", Ci.nsILocalFile);  bookmarksFileNew.append("bookmarks.exported.html");  // create bookmarks.exported.html  if (bookmarksFileNew.exists())    bookmarksFileNew.remove(false);  bookmarksFileNew.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, 0600);  if (!bookmarksFileNew.exists())    do_throw("couldn't create file: bookmarks.exported.html");  // Test importing a pre-Places canonical bookmarks file.  // 1. import bookmarks.preplaces.html  // 2. run the test-suite  // Note: we do not empty the db before this import to catch bugs like 380999  try {    importer.importHTMLFromFile(bookmarksFileOld, true);  } catch(ex) { do_throw("couldn't import legacy bookmarks file: " + ex); }  testCanonicalBookmarks(bmsvc.bookmarksMenuFolder);  // Test exporting a Places canonical bookmarks file.  // 1. export to bookmarks.exported.html  // 2. empty bookmarks db  // 3. import bookmarks.exported.html  // 4. run the test-suite  try {    importer.exportHTMLToFile(bookmarksFileNew);  } catch(ex) { do_throw("couldn't export to file: " + ex); }  bmsvc.removeFolderChildren(bmsvc.bookmarksMenuFolder);  bmsvc.removeFolderChildren(bmsvc.toolbarFolder);  try {    importer.importHTMLFromFile(bookmarksFileNew, true);  } catch(ex) { do_throw("couldn't import the exported file: " + ex); }  testCanonicalBookmarks(bmsvc.bookmarksMenuFolder);   /*  // XXX import-to-folder tests disabled due to bug 363634  // Test importing a pre-Places canonical bookmarks file to a specific folder.  // 1. create a new folder  // 2. import bookmarks.preplaces.html to that folder  // 3. run the test-suite  var testFolder = bmsvc.createFolder(bmsvc.bookmarksMenuFolder, "test-import", bmsvc.DEFAULT_INDEX);  try {    importer.importHTMLFromFileToFolder(bookmarksFileOld, testFolder, false);  } catch(ex) { do_throw("couldn't import the exported file to folder: " + ex); }  testCanonicalBookmarks(testFolder);  bmsvc.removeFolder(testFolder);  // Test importing a Places canonical bookmarks file to a specific folder.  // 1. create a new folder  // 2. import bookmarks.exported.html to that folder  // 3. run the test-suite  var testFolder = bmsvc.createFolder(bmsvc.bookmarksMenuFolder, "test-import", bmsvc.DEFAULT_INDEX);  try {    importer.importHTMLFromFileToFolder(bookmarksFileNew, testFolder, false);  } catch(ex) { do_throw("couldn't import the exported file to folder: " + ex); }  testCanonicalBookmarks(testFolder);   bmsvc.removeFolder(testFolder);  // XXX Disabled due to bug 381129 - separators will be duplicated on re-import  // Test importing the exported bookmarks.html file *on top of* the existing  // bookmarks. This tests import of IDs. If we support IDs correctly, there  // should be no difference after the import.  // 1. empty bookmarks db  // 2. import the exported bookmarks file  // 3. export to file  // 3. import the exported bookmarks file  // 4. run the test-suite  bmsvc.removeFolderChildren(bmsvc.bookmarksMenuFolder);  try {    importer.importHTMLFromFile(bookmarksFileNew, true);  } catch(ex) { do_throw("couldn't import the exported file: " + ex); }  try {    importer.exportHTMLToFile(bookmarksFileNew);  } catch(ex) { do_throw("couldn't export to file: " + ex); }  try {    importer.importHTMLFromFile(bookmarksFileNew, true);  } catch(ex) { do_throw("couldn't import the exported file: " + ex); }  testCanonicalBookmarks(bmsvc.bookmarksMenuFolder);  */  /*  XXX if there are new fields we add to the bookmarks HTML format  then test them here  Test importing a Places canonical bookmarks file  1. empty the bookmarks datastore  2. import bookmarks.places.html  3. run the test-suite  4. run the additional-test-suite  */}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/f7beac18095740bfc3b6dec530b9412da967f754/test_bookmarks_html.js/buggy/browser/components/places/tests/unit/test_bookmarks_html.js