Closed Bug 488474 Opened 16 years ago Closed 16 years ago

Exceptions throw within test function cause MozMill to stop running and not report failure

Categories

(Testing Graveyard :: Mozmill, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: standard8, Assigned: whimboo)

Details

(Whiteboard: [verified-mozmill-1.2])

Attachments

(1 file)

In the MozMill editor, enter the following function: function test_xyz() { Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIObserver); } now run the editor, status changes to "Running test: test_xyz", doesn't complete. In the error console there is a message: Error: obj[prop] is null Source File: chrome://mozmill/content/output.js Line: 96 I'd expect there to be a test failure marked on the MozMill output i.e. test_xyz failed: Exception.... I'm using svn version of mozmill (432) and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b4pre) Gecko/20090415 Shredder/3.0b3pre
There is no exception thrown. It's just an error. Looks like a bug in Mozmill itself which should be fixed.
We fail in creating a new entry in the output pane here: var createTree = function(obj){ var mainDiv = document.createElement('div'); for (prop in obj){ var newDiv = document.createElement('div'); newDiv.style.position = "relative"; newDiv.style.height = "15px"; newDiv.style.overflow = "hidden"; newDiv.style.width = "95%"; newDiv.style.left = "10px"; => if (obj[prop].length > 50){ newDiv.innerHTML = '<span style="float:right;top:0px;cursor: pointer;" class="ui-icon ui-icon-triangle-1-s"/>'; } newDiv.innerHTML += "<strong>"+prop+"</strong>: "+obj[prop]; mainDiv.appendChild(newDiv); } return mainDiv; }
Mikeal or Adam, can you please have a look at this. Seems like an easy to fix bug.
Priority: -- → P1
Attached patch PatchSplinter Review
We are just trying to access a property with a null value. This exception is not catched. So check for null first.
Attachment #375547 - Flags: review?(mrogers)
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Whiteboard: [mozmill-1.2]
Attachment #375547 - Attachment is patch: true
Attachment #375547 - Attachment mime type: application/octet-stream → text/plain
Attachment #375547 - Flags: review?(mrogers) → review?(adam.christian)
I think I saw mikeal check this into trunk, can we verify and close this.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Attachment #375547 - Flags: review?(adam.christian)
Verified with latest Mozmill trunk.
Status: RESOLVED → VERIFIED
Whiteboard: [mozmill-1.2] → [verified-mozmill-1.2]
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: