Closed Bug 757171 Opened 12 years ago Closed 10 years ago

Marionette should gracefully handle navigation attempts that throw exceptions

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

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: 10 years ago
Resolution: --- → WONTFIX
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.