Error: "subject.body is undefined" when using controller.waitForPageLoad()

VERIFIED FIXED

Status

Testing Graveyard
Mozmill
--
major
VERIFIED FIXED
9 years ago
a year ago

People

(Reporter: whimboo, Assigned: Adam Christian)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
Created attachment 356993 [details]
MozMill test

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090113 Minefield/3.2a1pre and latest MozMill trunk 

When I run the attached simple MozMill test the following error is shown and the test is aborted.

Error: subject.body is undefined
Source File: file:///Volumes/Daten/mozilla/profiles/mozmill/extensions/mozmill@mozilla.com/resource/modules/controller.js
Line: 84

That blocks me in writing tests. Adam, can you please have a look at this? Is it something we can have for a 1.0 maintenance release?
(Assignee)

Comment 1

9 years ago
Committed revision 290,291. The first argument is supposed to be a document object, so the way you were using it was actually incorrect but I think this will be a pretty common problem, so I just added some code to check if the first arg passed in is a number, if so use that as the timeout and default to the active tab. If you see this same error again in the future, the only way to get it now is by passing a bad document as the first arg to the function. Please ping Mikeal if you would like bug fix release pushed.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
I was going to say "make sure you update the API docs" and then I realized we don't have proper API docs for the Controller right now.

I'll write it up this week.
(Reporter)

Comment 3

9 years ago
Oh, haven't known that. By reading the current doc on cgc that wasn't explained. Thanks for fixing that. Works like a charm.
Assignee: nobody → adam.christian
Status: RESOLVED → VERIFIED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.