B2G/gecko/toolkit/components/places/tests/head_common.js
/**
 * Creates a bookmarks.html file in the profile folder from a given source file.
 *
 * @param aFilename
 *        Name of the file to copy to the profile folder.  This file must
 *        exist in the directory that contains the test files.
 *
 * @return nsIFile object for the file.
 */
Creates a bookmarks.html file in the profile folder from a given source file.
@param aFilename
Name of the file to copy to the profile folder.  This file must
exist in the directory that contains the test files.

@return nsIFile object for the file.
Creates a bookmarks . html file in the profile folder from a given source file . @param aFilename Name of the file to copy to the profile folder . This file must exist in the directory that contains the test files . @return nsIFile object for the file .
function create_bookmarks_html(aFilename) {
  if (!aFilename)
    do_throw("you must pass a filename to create_bookmarks_html function");
  remove_bookmarks_html();
  let bookmarksHTMLFile = gTestDir.clone();
  bookmarksHTMLFile.append(aFilename);
  do_check_true(bookmarksHTMLFile.exists());
  bookmarksHTMLFile.copyTo(gProfD, FILENAME_BOOKMARKS_HTML);
  let profileBookmarksHTMLFile = gProfD.clone();
  profileBookmarksHTMLFile.append(FILENAME_BOOKMARKS_HTML);
  do_check_true(profileBookmarksHTMLFile.exists());
  return profileBookmarksHTMLFile;
}
function create_bookmarks_html ( aFilename ) { if ( ! aFilename ) do_throw ( "you must pass a filename to create_bookmarks_html function" ) ; remove_bookmarks_html ( ) ; let bookmarksHTMLFile = gTestDir . clone ( ) ; bookmarksHTMLFile . append ( aFilename ) ; do_check_true ( bookmarksHTMLFile . exists ( ) ) ; bookmarksHTMLFile . copyTo ( gProfD , FILENAME_BOOKMARKS_HTML ) ; let profileBookmarksHTMLFile = gProfD . clone ( ) ; profileBookmarksHTMLFile . append ( FILENAME_BOOKMARKS_HTML ) ; do_check_true ( profileBookmarksHTMLFile . exists ( ) ) ; return profileBookmarksHTMLFile ; }
Creates a bookmarks.html file in the profile folder from a given source file.
Creates a bookmarks . html file in the profile folder from a given source file .