Closed Bug 731663 Opened 12 years ago Closed 12 years ago

Port |Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)| to SeaMonkey

Categories

(SeaMonkey :: Bookmarks & History, defect, P4)

Tracking

(firefox13 fixed, seamonkey2.10 verified)

VERIFIED FIXED
seamonkey2.11
Tracking Status
firefox13 --- fixed
seamonkey2.10 --- verified

People

(Reporter: sgautherie, Assigned: sgautherie)

References

()

Details

Attachments

(4 files, 2 obsolete files)

(Noticed while working on bug 730849.)
Test code is identical, except some nits (see upcoming FF patch).
Test data are rewritten to match SeaMonkey existing test data file.

test_384370.js still passes.
http://mxr.mozilla.org/comm-central/search?string=bookmarks.preplaces.html&case=1&find=%2Ftest
Attachment #601717 - Flags: review?(bugspam.Callek)
testImportedBookmarksToFolder() assumes the menu items come first in the data file.
Is that a rule or a (bad) assumption in the test?

NB: I just noticed that my do_print() should probably be a print(), to match the rest of the file...
Attachment #601728 - Flags: review?(mak77)
(In reply to Serge Gautherie (:sgautherie) from comment #2)
> NB: I just noticed that my do_print() should probably be a print(), to match
> the rest of the file...

But maybe not, afterall.
(In reply to Serge Gautherie (:sgautherie) from comment #2)
> Created attachment 601728 [details] [diff] [review]
> (Bv1-FF) test_bookmarks_html.js: Fix nits, Add a do_print()
> 
> testImportedBookmarksToFolder() assumes the menu items come first in the
> data file.
> Is that a rule or a (bad) assumption in the test?

It is based on the test file it is importing, no magic. The exporter puts the menu first.
That said, this test sucks and is hard to maintain, though it's not something we are willing to rewrite atm, also because hsivonen is working on a js bookmarks importer in bug 482911 that also touches this test and uses it for basic testing.
One day there will be a better one, hopefully in toolkit :)
Comment on attachment 601728 [details] [diff] [review]
(Bv1-FF) test_bookmarks_html.js: Fix nits, Add a do_print()

Review of attachment 601728 [details] [diff] [review]:
-----------------------------------------------------------------

for consistency print() is better, btw I don't care that much.
Attachment #601728 - Flags: review?(mak77) → review+
Bv1-FF, with:
*add a comment about item order.
*use do_print().
*remove a print() which in practice duplicates following do_check_eq() log.
Attachment #601728 - Attachment is obsolete: true
Attachment #601925 - Flags: review?(mak77)
Attachment #601728 - Attachment filename: 731663-FF-nits.diff → 731663-Bv1-FF_nits-print.diff
Attachment #601717 - Flags: review?(jh)
Comment on attachment 601717 [details] [diff] [review]
(Av1-SM)  Port |Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)| to SeaMonkey

I won't be able to give this the attention it deserved any time soon, sorry.
Attachment #601717 - Flags: review?(jh)
Comment on attachment 601925 [details] [diff] [review]
(Bv1a-FF) test_bookmarks_html.js: Fix nits, Add/Use do_print(), Improve documentation
[Checked in: See comment 9]

Review of attachment 601925 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the following fixed

::: browser/components/places/tests/unit/test_bookmarks_html.js
@@ +351,1 @@
>          checkItem(group[t], container.getChild(t));

loops should always be braced, so please don't remove braces from here.
Attachment #601925 - Flags: review?(mak77) → review+
Comment on attachment 601925 [details] [diff] [review]
(Bv1a-FF) test_bookmarks_html.js: Fix nits, Add/Use do_print(), Improve documentation
[Checked in: See comment 9]

https://hg.mozilla.org/mozilla-central/rev/79082093ef50
Bv1a-FF, with comment 8 suggestion(s).
Attachment #601925 - Attachment description: (Bv1a-FF) test_bookmarks_html.js: Fix nits, Add/Use do_print(), Improve documentation → (Bv1a-FF) test_bookmarks_html.js: Fix nits, Add/Use do_print(), Improve documentation [Checked in: See comment 9]
(In reply to Serge Gautherie (:sgautherie) from comment #9)
> https://hg.mozilla.org/mozilla-central/rev/79082093ef50

https://tbpl.mozilla.org/php/getParsedLog.php?id=9827136&tree=Firefox&full=1
Rev3 Fedora 12 mozilla-central opt test xpcshell on 2012-03-05 10:55:14 PST for push 79082093ef50

V.Fixed wrt this FF patch (only).
Attachment #602980 - Flags: review?(iann_bugzilla) → review+
Comment on attachment 602980 [details] [diff] [review]
(Av1a-SM) Port |Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)| to SeaMonkey
[Checked in: See comment 12]

http://hg.mozilla.org/comm-central/rev/d0057605218c
Av1a-SM unbitrotted.
Attachment #602980 - Attachment description: (Av1a-SM) Port |Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)| to SeaMonkey → (Av1a-SM) Port |Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)| to SeaMonkey [Checked in: See comment 12]
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: seamonkey2.10 → seamonkey2.11
Comment on attachment 602980 [details] [diff] [review]
(Av1a-SM) Port |Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)| to SeaMonkey
[Checked in: See comment 12]

[Approval Request Comment]
Needed to land bug 730849 on top of it.
Attachment #602980 - Flags: approval-comm-aurora?
(In reply to Serge Gautherie (:sgautherie) from comment #12)
> http://hg.mozilla.org/comm-central/rev/d0057605218c
> Av1a-SM unbitrotted.

Though this passes locally on old
[Mozilla/5.0 (Windows NT 5.0; rv:13.0a1) Gecko/20120201 Firefox/13.0a1 SeaMonkey/2.10a1] (nightly, 2012-02-01-00-30-09-comm-central-trunk)

it caused
{
TEST-UNEXPECTED-FAIL | xpcshell/head.js | [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIAnnotationService.getItemAnnotation]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: e:/builds/slave/test/build/xpcshell/tests/suite/common/places/tests/unit/test_bookmarks_html.js :: checkItem :: line 334"  data: no]
}
on our boxes.

Nonetheless, I want to land bug 730849 patch Bv1 to fully resync' this test, before addressing any issue that might remain after that.
(In reply to Serge Gautherie (:sgautherie) from comment #14)
> Nonetheless, I want to land bug 730849 patch Bv1 to fully resync' this test,
> before addressing any issue that might remain after that.

That patch did fix this (regression) error :-)

V.Fixed
Status: RESOLVED → VERIFIED
Comment on attachment 602980 [details] [diff] [review]
(Av1a-SM) Port |Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)| to SeaMonkey
[Checked in: See comment 12]

test only. a=me
Attachment #602980 - Flags: approval-comm-aurora? → approval-comm-aurora+
Keywords: checkin-needed
Whiteboard: [c-n: d0057605218c to c-a]
Hrm fails to apply on aurora:

Justin@ORION /d/sources/comm-aurora
$ hg qpush
applying 731663-Av1a-SM_rewrite-test.diff
patching file suite/common/places/tests/unit/test_bookmarks_html.js
Hunk #1 FAILED at 9
1 out of 1 hunks FAILED -- saving rejects to file suite/common/places/tests/unit/test_bookmarks_html
.js.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working dir
errors during apply, please fix and refresh 731663-Av1a-SM_rewrite-test.diff
(In reply to Justin Wood (:Callek) from comment #17)
> Hrm fails to apply on aurora:

That's because bug 736547 landed on c-c out of order...
Whiteboard: [c-n: d0057605218c to c-a] → [c-n: Av1b-SM-a210 to c-a]
Comment on attachment 615487 [details] [diff] [review]
(Av1b-SM-a210) Port |Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)| to SeaMonkey [Checkin: Comment 19]

http://hg.mozilla.org/releases/comm-aurora/rev/aa57d84a566c
Attachment #615487 - Attachment description: (Av1b-SM-a210) Port |Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)| to SeaMonkey → (Av1b-SM-a210) Port |Bug 593566 - Bookmarks with blank name are wrongly exported (broken codepage symbols in the exported file)| to SeaMonkey [Checkin: Comment 19]
Keywords: checkin-needed
Whiteboard: [c-n: Av1b-SM-a210 to c-a]
seamonkey2.10: verified, though/as it caused the same/expected/to-be-fixed test failure.
Keywords: checkin-needed
Whiteboard: [c-n: Cv1-SM-a210 to c-a]
Comment on attachment 616001 [details] [diff] [review]
(Cv1-SM-a210) Typo fix for patch Av1b-SM-a210 [Checkin: Comment 22]

http://hg.mozilla.org/releases/comm-aurora/rev/6dbd42c774c3
Attachment #616001 - Attachment description: (Cv1-SM-a210) Typo fix for patch Av1b-SM-a210 → (Cv1-SM-a210) Typo fix for patch Av1b-SM-a210 [Checkin: Comment 22]
Keywords: checkin-needed
Whiteboard: [c-n: Cv1-SM-a210 to c-a]
(In reply to Serge Gautherie (:sgautherie) from comment #20)
> seamonkey2.10: verified, though/as it caused the same/expected/to-be-fixed
> test failure.

Bug 730849 comment 17: failure is now fixed.
You need to log in before you can comment on or make changes to this bug.