Closed
Bug 608405
Opened 14 years ago
Closed 14 years ago
GroupItem.add should auto remove from previous group
Categories
(Firefox Graveyard :: Panorama, defect, P4)
Firefox Graveyard
Panorama
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 4.0b12
People
(Reporter: iangilman, Assigned: ttaubert)
References
Details
(Whiteboard: [qa-][cleanup][good first bug][API])
Attachments
(1 file, 2 obsolete files)
3.85 KB,
patch
|
Details | Diff | Splinter Review |
We do a pretty good job of making sure we never add a child to a group that's already got another parent, but sometimes it still happens. Might as well auto remove from the previous group when this happens.
Updated•14 years ago
|
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → tim.taubert
Version: unspecified → Trunk
Assignee | ||
Updated•14 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•14 years ago
|
||
What should the arguments for .remove() be that is called in .add()? There is a dontClose e.g. for drag/drop so that group is not closed before its last child is dropped somewhere out of the group. But there will be surely some situation where the group should have been close when removing the last child?
Reporter | ||
Updated•14 years ago
|
Priority: P3 → P4
Reporter | ||
Comment 2•14 years ago
|
||
(In reply to comment #1)
> What should the arguments for .remove() be that is called in .add()? There is a
> dontClose e.g. for drag/drop so that group is not closed before its last child
> is dropped somewhere out of the group. But there will be surely some situation
> where the group should have been close when removing the last child?
Leave options empty when calling remove. This is just a safeguard; we should just stick with the default behavior.
Assignee | ||
Comment 4•14 years ago
|
||
Passed try.
Reporter | ||
Comment 5•14 years ago
|
||
Comment on attachment 507382 [details] [diff] [review]
patch v1
>+ is(tabItem.parent, targetGroup, 'tabItem changed groups');
>+ is(gBrowser.tabs.length, 2, 'there are two tabs');
You should explicitly check to make sure both groups have the correct number of children.
>+ tabItem.close();
>+ sourceGroup.close();
Actually, won't removing the tab from sourceGroup automatically close it? Perhaps also verify that that has happened instead of closing it here.
... and don't forget to test your end state, so you know you left it clean for the next test!
Attachment #507382 -
Flags: review?(ian) → review-
Assignee | ||
Comment 6•14 years ago
|
||
You're absolutely right :)
Attachment #507382 -
Attachment is obsolete: true
Attachment #507572 -
Flags: review?(ian)
Reporter | ||
Comment 7•14 years ago
|
||
Comment on attachment 507572 [details] [diff] [review]
patch v2
Lovely :)
Attachment #507572 -
Flags: review?(ian) → review+
Assignee | ||
Updated•14 years ago
|
Attachment #507572 -
Flags: approval2.0?
Comment 8•14 years ago
|
||
Comment on attachment 507572 [details] [diff] [review]
patch v2
Please fix the license block of the test to use public domain before landing. You won't need to get extra approval for that.
Attachment #507572 -
Flags: approval2.0? → approval2.0+
Assignee | ||
Comment 9•14 years ago
|
||
Old license block replaced with public domain header.
Attachment #507572 -
Attachment is obsolete: true
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 10•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b12
Updated•9 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•