Merge pull request #11672 from edx/raees/chrome-bokchoy-test-cancelling-redirects

Fixed test_cancelling_redirects failing on Chrome
This commit is contained in:
raeeschachar
2016-02-29 11:28:25 +05:00

View File

@@ -42,9 +42,13 @@ class OAuth2PermissionDelegationTests(WebAppTest):
assert self.oauth_page.visit()
self.oauth_page.cancel()
# This redirects to an invalid URI.
query = self._qs(self.browser.current_url)
self.assertEqual('access_denied', query['error'])
# This redirects to an invalid URI. For chrome verify title, current_url otherwise
if self.browser.name == 'chrome':
query = self._qs(self.browser.title)
self.assertIn('access_denied', query['error'])
else:
query = self._qs(self.browser.current_url)
self.assertIn('access_denied', query['error'])
def test_accepting_redirects(self):
"""