Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug 851292 - Follow up fix for busted tests, r=bustage

  • Loading branch information...
commit 0d240e02eb0c1149d4830091a7405cef029c8bec 1 parent 43f9510
@ahal ahal authored
View
4 mozprofile/mozprofile/permissions.py
@@ -289,7 +289,6 @@ def pac_prefs(self, user_proxy=None):
return preferences for Proxy Auto Config. originally taken from
http://mxr.mozilla.org/mozilla-central/source/build/automation.py.in
"""
- user_proxy = user_proxy or {}
proxy = _DEFAULT_PORTS
# We need to proxy every server but the primary one.
@@ -304,7 +303,8 @@ def pac_prefs(self, user_proxy=None):
proxy[l.scheme] = l.port
# overwrite defaults with user specified proxy
- proxy.update(user_proxy)
+ if isinstance(user_proxy, dict):
+ proxy.update(user_proxy)
# TODO: this should live in a template!
# TODO: So changing the 5th line of the regex below from (\\\\\\\\d+)
View
7 mozprofile/tests/permissions.py
@@ -106,8 +106,11 @@ def test_nw_prefs(self):
origins_decl = "var origins = ['http://mochi.test:8888', 'http://127.0.0.1:80', 'http://127.0.0.1:8888'];"
self.assertTrue(origins_decl in user_prefs[1][1])
- proxy_check = "if (isHttp || isHttps || isWebSocket || isWebSocketSSL) return 'PROXY mochi.test:8888';"
- self.assertTrue(proxy_check in user_prefs[1][1])
+ proxy_check = ("if (isHttp) return 'PROXY mochi.test:8888';",
+ "if (isHttps) return 'PROXY mochi.test:4443';",
+ "if (isWebSocket) return 'PROXY mochi.test:9988';",
+ "if (isWebSocketSSL) return 'PROXY mochi.test:4443';")
+ self.assertTrue(all(c in user_prefs[1][1] for c in proxy_check))
if __name__ == '__main__':
View
2  mozprofile/tests/server_locations.py
@@ -70,7 +70,7 @@ def test_server_locations(self):
self.compare_location(i.next(), 'https', 'test', '80', ['privileged'])
self.compare_location(i.next(), 'http', 'example.org', '80',
['privileged'])
- self.compare_location(i.next(), 'http', 'test1.example.org', '80',
+ self.compare_location(i.next(), 'http', 'test1.example.org', '8888',
['privileged'])
locations.add_host('mozilla.org')
Please sign in to comment.
Something went wrong with that request. Please try again.