Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1059)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
index 2678701145f43a0a83dad191602ccfaee9206805..84a66f3881ec4feb25e015d90ac2b09c1ef7e91f 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
@@ -78,6 +78,7 @@ class FakePrinter(object):
class PortTestCase(unittest.TestCase):
+
"""Tests that all Port implementations must pass."""
HTTP_PORTS = (8000, 8080, 8443)
WEBSOCKET_PORTS = (8880,)
@@ -173,7 +174,7 @@ class PortTestCase(unittest.TestCase):
test_socket = socket.socket()
test_socket.connect((host, port))
self.fail()
- except IOError, e:
+ except IOError as e:
self.assertTrue(e.errno in (errno.ECONNREFUSED, errno.ECONNRESET))
finally:
test_socket.close()
@@ -183,7 +184,7 @@ class PortTestCase(unittest.TestCase):
try:
test_socket = socket.socket()
test_socket.connect((host, port))
- except IOError, e:
+ except IOError as e:
self.fail('failed to connect to %s:%d' % (host, port))
finally:
test_socket.close()
@@ -232,7 +233,7 @@ class PortTestCase(unittest.TestCase):
exception_raised = False
try:
port.diff_image("EXPECTED", "ACTUAL")
- except ValueError, e:
+ except ValueError as e:
exception_raised = True
self.assertFalse(exception_raised)

Powered by Google App Engine
This is Rietveld 408576698