 if (!bookmarksFileNew.exists()) bookmarksFileNew.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, 0600); 
 if (bookmarksFileNew.exists()) bookmarksFileNew.remove(false); bookmarksFileNew.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, 0600); 
function run_test() {  // get places import/export service  var importer = Cc["@mozilla.org/browser/places/import-export-service;1"].getService(Ci.nsIPlacesImportExportService);  // get file pointers  var bookmarksFileOld = do_get_file("browser/components/places/tests/unit/bookmarks.preplaces.html");  var bookmarksFileNew = dirSvc.get("ProfD", Ci.nsILocalFile);  bookmarksFileNew.append("bookmarks.exported.html");  // create bookmarks.exported.html if necessary  if (!bookmarksFileNew.exists())    bookmarksFileNew.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, 0600);  if (!bookmarksFileNew.exists())    do_throw("couldn't create file: bookmarks.exported.html");  // Test importing a non-Places canonical bookmarks file.  // 1. import bookmarks.preplaces.html  // 2. run the test-suite  bmsvc.removeFolderChildren(bmsvc.bookmarksRoot);  importer.importHTMLFromFile(bookmarksFileOld);  testCanonicalBookmarks(bmsvc.bookmarksRoot);   // Test exporting a Places canonical bookmarks file.  // 1. export to bookmarks.exported.html  // 2. import bookmarks.exported.html  // 3. run the test-suite  /*  importer.exportHTMLToFile(bookmarksFileNew);  bmsvc.removeFolderChildren(bmsvc.bookmarksRoot);  importer.importHTMLFromFile(bookmarksFileNew);  testCanonicalBookmarks(bmsvc.bookmarksRoot);   */  // 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.bookmarksRoot, "test", bmsvc.DEFAULT_INDEX);  importer.importHTMLFromFileToFolder(bookmarksFileNew, testFolder);  testCanonicalBookmarks(testFolder);   */  /*  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  */  /*  XXX could write another more generic testsuite:  - a function that fetches all descendant nodes of a folder with all non-static    node properties removed, and serializes w/ toSource()  - import a file, get serialization  - export it, re-import, get serialization  - do_check_eq(str1, str2)  */}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/c9ebcce8b95cb170455e9c3bc4ab23f4dda86197/test_bookmarks_html.js/clean/browser/components/places/tests/unit/test_bookmarks_html.js