Closed Bug 415060 Opened 16 years ago Closed 16 years ago

menu.appendItem and .insertItemAt should return the new menuitem

Categories

(Toolkit :: XUL Widgets, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sevenfurnace, Assigned: sevenfurnace)

References

Details

Attachments

(1 file, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008013103 Minefield/3.0b3pre

According to nsIDOMXULContainerElement.idl, appendItem and insertItemAt return nsIDOMXULElement, but on latest trunk, these method return nothing.

Reproducible: Always
Version: unspecified → Trunk
Version: Trunk → unspecified
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → Trunk
Attached patch patch (obsolete) — Splinter Review
the patch looks ok
Attachment #300983 - Flags: review?(neil)
Attachment #300983 - Flags: review?(neil) → review+
Assignee: nobody → sevenfurnace
Drivers: this is a simple, no-risk API correctness fix for the patch landed in bug 372552.

Surkov: can we get the testcase from bug 372552 (attachment 259102 [details]) landed, and add a test for this bug to it?
Blocks: 372552
Status: NEW → ASSIGNED
(In reply to comment #3)

> Surkov: can we get the testcase from bug 372552 (attachment 259102 [details]) landed, and
> add a test for this bug to it?
> 

I'll put mochitest under content/tests/widgets
Attached patch mochitest (obsolete) — Splinter Review
Attachment #301245 - Flags: review?(neil)
Comment on attachment 301245 [details] [diff] [review]
mochitest

Looks good, but use the 'is' function instead of 'ok'.

As in:
  is(menu.itemCount, 2, "blah blah");

Also, use consistent spacing around the parentheses.
Attachment #301245 - Flags: review?(neil) → review+
Attached patch combined patchSplinter Review
Attachment #300983 - Attachment is obsolete: true
Attachment #301245 - Attachment is obsolete: true
Attachment #301269 - Flags: approval1.9?
Attachment #300983 - Flags: approval1.9?
Comment on attachment 301269 [details] [diff] [review]
combined patch

a1.9+=damons
Attachment #301269 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
checked in
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.