From 285907cb5654a3aaa54de45908f90fd28603826a Mon Sep 17 00:00:00 2001 From: "mozilla.mano@sent.com" Date: Mon, 19 Nov 2007 19:33:19 -0800 Subject: [PATCH] Fix test_bookmarks_html failure from bug 387746. --- .../places/src/nsPlacesImportExportService.cpp | 1 + .../places/tests/unit/bookmarks.preplaces.html | 15 +++++++-------- .../places/tests/unit/test_bookmarks_html.js | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/browser/components/places/src/nsPlacesImportExportService.cpp b/browser/components/places/src/nsPlacesImportExportService.cpp index 5195efdc9ac7..87ec5d0440b2 100644 --- a/browser/components/places/src/nsPlacesImportExportService.cpp +++ b/browser/components/places/src/nsPlacesImportExportService.cpp @@ -1224,6 +1224,7 @@ BookmarkContentSink::NewFrame() if (!mFrames.AppendElement(BookmarkImportFrame(ourID))) return NS_ERROR_OUT_OF_MEMORY; + frame.mPreviousId = ourID; return NS_OK; } diff --git a/browser/components/places/tests/unit/bookmarks.preplaces.html b/browser/components/places/tests/unit/bookmarks.preplaces.html index 811a4ed8dfa5..c7bae8a1c26d 100644 --- a/browser/components/places/tests/unit/bookmarks.preplaces.html +++ b/browser/components/places/tests/unit/bookmarks.preplaces.html @@ -9,14 +9,6 @@

Get Bookmark Add-ons
-

Bookmarks Toolbar Folder

-
Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar -

-

Getting Started -
Latest Headlines -
Livemark test comment -

-


Mozilla Firefox

Help and Tutorials @@ -33,5 +25,12 @@
test microsummary
test microsummary --> +
+

Bookmarks Toolbar Folder

+
Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar +

+

Getting Started +
Latest Headlines +
Livemark test comment

diff --git a/browser/components/places/tests/unit/test_bookmarks_html.js b/browser/components/places/tests/unit/test_bookmarks_html.js index 54cf16157387..e98467c93889 100644 --- a/browser/components/places/tests/unit/test_bookmarks_html.js +++ b/browser/components/places/tests/unit/test_bookmarks_html.js @@ -109,7 +109,7 @@ function run_test() { try { importer.importHTMLFromFile(bookmarksFileOld, true); } catch(ex) { do_throw("couldn't import legacy bookmarks file: " + ex); } - testCanonicalBookmarks(bmsvc.bookmarksMenuFolder); + testCanonicalBookmarks(bmsvc.bookmarksMenuFolder); // Test exporting a Places canonical bookmarks file. // 1. export to bookmarks.exported.html @@ -120,6 +120,7 @@ function run_test() { 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); }