Closed Bug 585732 Opened 14 years ago Closed 14 years ago

Make Mozmill-test testAddBookmarkToMenu local

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: u279076, Assigned: aaronmt)

References

Details

(Whiteboard: [litmus-data])

Attachments

(2 files, 1 obsolete file)

Module: testBookmarks/testAddBookmarkToMenu.js
Test-page: Use any 1 page from test-files/layout/mozilla*
Blocks: 579965
Assignee: nobody → aaron.train
Attached patch Patch v1.0 - (default) (obsolete) — Splinter Review
cleanup + converts test to local data

Couple other things for future fixing: 
1. This test is broken due to Omnijar packaging changes, and is looked at in bug 592411
2. The first comment XXX about a unique name, looks like the type does this
3. The second comment XXX, bookmarks go under unsorted, so it seems like the way it uses the API now would be better to use - do you still want this?

Henrik, feedback?
Attachment #473557 - Flags: review?(anthony.s.hughes)
Attachment #473557 - Flags: review?(anthony.s.hughes) → feedback?(anthony.s.hughes)
Comment on attachment 473557 [details] [diff] [review]
Patch v1.0 - (default)

Based on your last comment I think you wanted feedback from Henrik.  Switching the flag.
Attachment #473557 - Flags: feedback?(anthony.s.hughes) → feedback?(hskupin)
Or just take the changes to local-data in this bug and address any other issues in another bug.
Comment on attachment 473557 [details] [diff] [review]
Patch v1.0 - (default)

>-const gDelay = 0;
>+const TIMEOUT = 2000;

Please make it 5000 as we have everywhere else.

> var testAddBookmarkToBookmarksMenu = function() {
>-  var uri = UtilsAPI.createURI("http://www.mozilla.org");
>-
>   // Fail if the URI is already bookmarked
>   controller.assertJS("subject.isBookmarked == false",
>-                      {isBookmarked: PlacesAPI.bookmarksService.isBookmarked(uri)});
>+                      {isBookmarked: PlacesAPI.bookmarksService.
>+                                     isBookmarked(LOCAL_TEST_PAGE)});

This is wrong and will fail. isBookmarked expects an nsIURI instance and no string.

>   // XXX: We should give a unique name too when controller.type will send oninput events (bug 474667)

Yeah. We probably forgot to remove the comment.

>   // XXX: Until we can't check via a menu click, call the Places API function for now (bug 474486)

Please file a follow-up for that. With the dynamic menus we can check this now. Otherwise only do the local test data changes.
Attachment #473557 - Flags: feedback?(hskupin) → feedback+
Attachment #473557 - Flags: feedback+ → feedback-
Addresses comments from comment #4
Attachment #473557 - Attachment is obsolete: true
Attachment #474801 - Flags: review?(anthony.s.hughes)
Anthony, would you be able to get the initial review in? Note from comment #0 this test is broken due to Omnijar packaging changes, and is looked at in bug 592411
Status: NEW → ASSIGNED
Attachment #474801 - Flags: review?(hskupin)
Attachment #474801 - Flags: review?(anthony.s.hughes)
Attachment #474801 - Flags: review+
Comment on attachment 474801 [details] [diff] [review]
Patch v1.1 - (default)

>   controller.assertJS("subject.isBookmarked == false",
>-                      {isBookmarked: PlacesAPI.bookmarksService.isBookmarked(uri)});
>+                      {isBookmarked: PlacesAPI.bookmarksService.
>+                                     isBookmarked(uri)});

*snip*

>   controller.assertJS("subject.isBookmarkInBookmarksMenu == true",
>-                      {isBookmarkInBookmarksMenu: PlacesAPI.isBookmarkInFolder(uri, PlacesAPI.bookmarksService.bookmarksMenuFolder)});
>+                      {isBookmarkInBookmarksMenu: PlacesAPI.isBookmarkInFolder(uri, 
>+                                                  PlacesAPI.bookmarksService.bookmarksMenuFolder)});

Please fix the indentation in both cases. With that r=me.
Attachment #474801 - Flags: review?(hskupin) → review+
Keywords: checkin-needed
Attachment #478268 - Flags: review+
(In reply to comment #8)
> Created attachment 478268 [details] [diff] [review]
> Patch v1.2 - (default) + [indent fix]

Landed:
http://hg.mozilla.org/qa/mozmill-tests/rev/5b52ea883f05 [default]
http://hg.mozilla.org/qa/mozmill-tests/rev/ec883a6d0e4a [mozilla1.9.2]
http://hg.mozilla.org/qa/mozmill-tests/rev/4836e7aef32c [mozilla1.9.1]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Move of Mozmill Test related project bugs to newly created components. You can
filter out those emails by using "Mozmill-Tests-to-MozillaQA" as criteria.
Product: Testing → Mozilla QA
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: