Closed Bug 757171 Opened 8 years ago Closed 6 years ago

Marionette should gracefully handle navigation attempts that throw exceptions

Categories

(Testing :: Marionette, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jgriffin, Unassigned)

References

Details

(Whiteboard: [good first bug][lang=js][mentor=mdas])

If you call marionette.navigate() with an invalid url, Marionette doesn't catch the exception that the browser throws, and thus hangs.  We should gracefully handle this.

Example:
  marionette.navigate('file://./test/page.html')

Result:
  stdout shows this:  "JavaScript error: , line 0: uncaught exception: An error occurred throwing an exception".  Marionette doesn't catch this exception and so hangs. 

We can fix this by wrapping

  curWindow.location = msg.json.value

in a try/catch block, and returning an appropriate error message.
Depends on: 756577
Blocks: b2g-testing
Whiteboard: [good first bug][lang=js][mentor=mdas]
Seems to work now
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.