Bug 1105082 - Send the correct error when attempting to navigate with marionette in chrome scope.;r=ato

This commit is contained in:
Chris Manchester 2014-11-26 16:25:55 -05:00
parent 251f0db29a
commit 2acd46c0aa
2 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,8 @@ class TestNavigate(MarionetteTestCase):
def test_navigate_chrome_error(self):
with self.marionette.using_context("chrome"):
self.assertRaises(MarionetteException, self.marionette.navigate, "about:blank")
self.assertRaisesRegexp(MarionetteException, "Cannot navigate in chrome context",
self.marionette.navigate, "about:blank")
def test_getUrl(self):
test_html = self.marionette.absolute_url("test.html")

View File

@ -1211,7 +1211,7 @@ MarionetteServerConnection.prototype = {
// TODO: Error codes need to be refined as a part of bug 1100545 and
// bug 945729.
if (appName == "Firefox") {
sendError("Cannot navigate in chrome context", 13, null, command_id);
this.sendError("Cannot navigate in chrome context", 13, null, command_id);
return;
}