Closed
Bug 515435
Opened 15 years ago
Closed 14 years ago
Remove "Get Bookmark Add-ons" from default bookmarks
Categories
(Firefox :: Bookmarks & History, defect)
Firefox
Bookmarks & History
Tracking
()
VERIFIED
FIXED
Firefox 3.7a5
People
(Reporter: whimboo, Assigned: u88484)
Details
Attachments
(1 file, 7 obsolete files)
16.00 KB,
patch
|
Details | Diff | Splinter Review |
Given by bug 498320 Beltzner pointed out that we should remove this entry from the default bookmarks.
Comment 2•14 years ago
|
||
Thanks Kurt, yes that'd be great!
I didn't update the two tests because they state " <!-- This is an automatically generated file. It will be read and overwritten. DO NOT EDIT! -->" I wasn't sure if that meant locally or not.
Comment 4•14 years ago
|
||
i guess this code could go away http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/src/nsPlacesImportExportService.cpp#1185 also the " <!-- This is an automatically generated file. It will be read and overwritten. DO NOT EDIT! -->" should be part of any bookmarks.html, thus it's not the test file that is generated automatically, but any bookmarks.html. I think test files should be edited and tests run to check they are passing.
Comment 5•14 years ago
|
||
Comment on attachment 441203 [details]
Patch
Can you run this through the tryserver? I'm betting some unit tests in /browser depend on this being there, and will need updating.
Which are the tests you're referring to?
And please request review from l10n@moz as well, if the test run looks good.
(In reply to comment #4) > i guess this code could go away > http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/src/nsPlacesImportExportService.cpp#1185 > Done > also the " <!-- This is an > automatically generated file. It will be read and overwritten. DO NOT EDIT! > -->" should be part of any bookmarks.html, thus it's not the test file that is > generated automatically, but any bookmarks.html. > I think test files should be edited and tests run to check they are passing. Done.
Attachment #441203 -
Attachment is obsolete: true
Attachment #441210 -
Flags: review?(dietrich)
Attachment #441203 -
Flags: review?(dietrich)
Attachment #441210 -
Flags: review?(l10n)
Comment 7•14 years ago
|
||
i did a first push to the tryserver. actually i think i have to ask KaiRo if Seamonkey could still need the <hr> removal code.
Comment 8•14 years ago
|
||
yeah there is some test in need of updating TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_384370.js | test failed (with xpcshell return code: 0), see following log: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_384370.js | 2 == 4 - See following stack: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_457441-import-export-corrupt-bookmarks-html.js | test failed (with xpcshell return code: 0), see following log: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_457441-import-export-corrupt-bookmarks-html.js | 2 == 4 - See following stack: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_bookmarks_html.js | test failed (with xpcshell return code: 0), see following log: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_bookmarks_html.js | 2 == 4 - See following stack: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_browserGlue_smartBookmarks.js | test failed (with xpcshell return code: 0), see following log: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_browserGlue_smartBookmarks.js | 5 == 6 - See following stack:
Comment 9•14 years ago
|
||
(In reply to comment #7) > actually i think i have to ask KaiRo if Seamonkey could still need the <hr> > removal code. The default SeaMonkey 2.0 bookmarks.html files only have one single separator in the whole file, and that one is at the end of the list (I guess to separate personally added bookmarks from the defaults). I haven't checked older versions, but our prime interest is that import from SeaMonkey 2.0 works nicely once we introduce places-driven bookmarks in the 2.1 (1.9.3-based) series.
Assignee | ||
Comment 10•14 years ago
|
||
(In reply to comment #8) > yeah there is some test in need of updating > Updated tests. Thanks for your help!
Attachment #441496 -
Flags: review?(dietrich)
Attachment #441496 -
Flags: review?(l10n)
Attachment #441210 -
Attachment is obsolete: true
Attachment #441210 -
Flags: review?(l10n)
Attachment #441210 -
Flags: review?(dietrich)
Comment 11•14 years ago
|
||
looks goot at first glance, will push to try along the day.
Comment 12•14 years ago
|
||
Comment on attachment 441496 [details]
Patch v3
looks ok from an l10n pov.
Attachment #441496 -
Flags: review?(l10n) → review+
Comment 13•14 years ago
|
||
Comment on attachment 441496 [details] Patch v3 still some error: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_384370.js | test failed (with xpcshell return code: 3), see following log: TEST-UNEXPECTED-FAIL | (xpcshell/head.js) | ReferenceError: countFolderChildren is not defined - See following stack: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_457441-import-export-corrupt-bookmarks-html.js | test failed (with xpcshell return code: 3), see following log: TEST-UNEXPECTED-FAIL | (xpcshell/head.js) | ReferenceError: countFolderChildren is not defined - See following stack: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_bookmarks_html.js | test failed (with xpcshell return code: 3), see following log: TEST-UNEXPECTED-FAIL | (xpcshell/head.js) | ReferenceError: countFolderChildren is not defined - See following stack: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_browserGlue_smartBookmarks.js | test failed (with xpcshell return code: 0), see following log: TEST-UNEXPECTED-FAIL | /builds/slave/sendchange-linux-unittest/mozilla/objdir/_tests/xpcshell/test_browser_places/unit/test_browserGlue_smartBookmarks.js | 5 == 4 - See following stack: >diff --git a/browser/components/places/tests/unit/test_384370.js b/browser/components/places/tests/unit/test_384370.js >--- a/browser/components/places/tests/unit/test_384370.js >+++ b/browser/components/places/tests/unit/test_384370.js >@@ -156,17 +156,18 @@ function testCanonicalBookmarks() { > var query = PlacesUtils.history.getNewQuery(); > query.setFolders([PlacesUtils.bookmarks.bookmarksMenuFolder], 1); > var result = PlacesUtils.history.executeQuery(query, PlacesUtils.history.getNewQueryOptions()); > var rootNode = result.root; > rootNode.containerOpen = true; > > // 6-2: the toolbar contents are imported to the places-toolbar folder, > // the separator above it is removed. >- do_check_eq(rootNode.childCount, 4); >+ do_check_eq(countFolderChildren(bs.bookmarksMenuFolder), >+ DEFAULT_BOOKMARKS_ON_MENU + 1); hm, i'm unsure why you changed this to countFolderChildren(), that method does not exist, you should not change rootNode.childCount >diff --git a/browser/components/places/tests/unit/test_457441-import-export-corrupt-bookmarks-html.js b/browser/components/places/tests/unit/test_457441-import-export-corrupt-bookmarks-html.js >- do_check_eq(rootNode.childCount, 4); >+ do_check_eq(countFolderChildren(bs.bookmarksMenuFolder), >+ DEFAULT_BOOKMARKS_ON_MENU + 1); same >diff --git a/browser/components/places/tests/unit/test_bookmarks_html.js b/browser/components/places/tests/unit/test_bookmarks_html.js >- do_check_eq(rootNode.childCount, 4); >+ do_check_eq(countFolderChildren(bs.bookmarksMenuFolder), >+ DEFAULT_BOOKMARKS_ON_MENU + 1); same About smartBookmarks.js failure, looks like now there are 2 separators before Mozilla Firefox folder, one is the separator that is after Toolbar folder in the bookmarks.inc file, the other one is the separator created by smart bookmarks. Since FX2 support has been dropped i guess we don't need anymore the <HR> separating toolbar from firefox-heading in bookmarks.html.in and we must remove it -> <HR> <DT><H3 ID="rdf:#$ZvPhC3">@firefox_heading@</H3> also this code in browserGlue should be smarter: http://mxr.mozilla.org/mozilla-central/source/browser/components/nsBrowserGlue.js#1175 1173 if (smartBookmarksCurrentVersion == 0 && 1174 smartBookmarkItemIds.length == 0) 1175 bmsvc.insertSeparator(bmsvc.bookmarksMenuFolder, bookmarksMenuIndex); should be: if (smartBookmarksCurrentVersion == 0 && smartBookmarkItemIds.length == 0) { let id = bmsvc.getIdForItemAt(bmsvc.bookmarksMenuFolder, bookmarksMenuIndex); // Don't add a separator if the menu was empty or there is one already. if (id != -1 && bmsvc.getItemType(id) != bmsvc.TYPE_SEPARATOR) bmsvc.insertSeparator(bmsvc.bookmarksMenuFolder, bookmarksMenuIndex); }
Attachment #441496 -
Flags: review?(dietrich) → review-
Assignee | ||
Comment 14•14 years ago
|
||
Addresses review comments
Attachment #441807 -
Flags: review?(mak77)
Assignee | ||
Comment 15•14 years ago
|
||
Addresses reviews. Last patch had tabs and a extra white line
Attachment #441496 -
Attachment is obsolete: true
Attachment #441807 -
Attachment is obsolete: true
Attachment #441809 -
Flags: review?(mak77)
Attachment #441807 -
Flags: review?(mak77)
Comment 16•14 years ago
|
||
Comment on attachment 441809 [details] [diff] [review] Patch v5 >diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js >+ smartBookmarkItemIds.length == 0) { >+ let id = bmsvc.getIdForItemAt(bmsvc.bookmarksMenuFolder, >+ boomkarksMenuIndex); >+ // Don't add a separator if the menu was empty or there is one already wrong indentation, end comment with a period please. >diff --git a/browser/components/places/tests/unit/test_384370.js b/browser/components/places/tests/unit/test_384370.js >--- a/browser/components/places/tests/unit/test_384370.js >+++ b/browser/components/places/tests/unit/test_384370.js >@@ -155,17 +155,18 @@ function testCanonicalBookmarks() { > var query = PlacesUtils.history.getNewQuery(); > query.setFolders([PlacesUtils.bookmarks.bookmarksMenuFolder], 1); > var result = PlacesUtils.history.executeQuery(query, PlacesUtils.history.getNewQueryOptions()); > var rootNode = result.root; > rootNode.containerOpen = true; > > // 6-2: the toolbar contents are imported to the places-toolbar folder, > // the separator above it is removed. >- do_check_eq(rootNode.childCount, 4); >+ do_check_eq(rootNode.childCount(bs.bookmarksMenuFolder), this should only be rootNode.childCount, it's a property not a method so, it does not need to be changed from what it was same for all tests
Attachment #441809 -
Flags: review?(mak77) → review-
Assignee | ||
Comment 17•14 years ago
|
||
Attachment #441809 -
Attachment is obsolete: true
Attachment #441815 -
Flags: review?(mak77)
Assignee | ||
Comment 18•14 years ago
|
||
Attachment #441815 -
Attachment is obsolete: true
Attachment #441831 -
Flags: review?(mak77)
Attachment #441815 -
Flags: review?(mak77)
Comment 19•14 years ago
|
||
Comment on attachment 441831 [details] [diff] [review] Patch v7 looks good, passes tests locally.
Attachment #441831 -
Flags: review?(mak77) → review+
Keywords: checkin-needed
Comment 20•14 years ago
|
||
there is a typo boomkarksMenuIndex should be bookmarksMenuIndex i've fixed this locally, and i'll take care of pushing.
Comment 22•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/95a6812fa815
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a5
Updated•14 years ago
|
Flags: in-testsuite+
Reporter | ||
Comment 23•14 years ago
|
||
Verified fixed with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a6pre) Gecko/20100620 Minefield/3.7a6pre Litmus test which has been updated: https://litmus.mozilla.org/show_test.cgi?id=10033
Status: RESOLVED → VERIFIED
Flags: in-litmus+
You need to log in
before you can comment on or make changes to this bug.
Description
•