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

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

Issue 1783073002: Run auto-formatter on files in webkitpy/layout_tests/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 9 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/server_process_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
index c5f9ba61a5b5e8e0967cd9867268cce175dc209e..4c32ce00756be127a5aa14869e16dd0465d0e52a 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
@@ -38,6 +38,7 @@ from webkitpy.common.system.outputcapture import OutputCapture
class TrivialMockPort(object):
+
def __init__(self):
self.host = MockSystemHost()
self.host.executive.kill_process = lambda x: None
@@ -51,6 +52,7 @@ class TrivialMockPort(object):
class MockFile(object):
+
def __init__(self, server_process):
self._server_process = server_process
self.closed = False
@@ -67,6 +69,7 @@ class MockFile(object):
class MockProc(object):
+
def __init__(self, server_process):
self.stdin = MockFile(server_process)
self.stdout = MockFile(server_process)
@@ -81,6 +84,7 @@ class MockProc(object):
class FakeServerProcess(server_process.ServerProcess):
+
def _start(self):
self._proc = MockProc(self)
self.stdin = self._proc.stdin
@@ -91,8 +95,10 @@ class FakeServerProcess(server_process.ServerProcess):
class TestServerProcess(unittest.TestCase):
+
def test_basic(self):
- cmd = [sys.executable, '-c', 'import sys; import time; time.sleep(0.02); print "stdout"; sys.stdout.flush(); print >>sys.stderr, "stderr"']
+ cmd = [sys.executable, '-c',
+ 'import sys; import time; time.sleep(0.02); print "stdout"; sys.stdout.flush(); print >>sys.stderr, "stderr"']
host = SystemHost()
factory = PortFactory(host)
port = factory.get()
@@ -149,6 +155,7 @@ class TestServerProcess(unittest.TestCase):
class TestQuoteData(unittest.TestCase):
+
def test_plain(self):
qd = server_process.quote_data
self.assertEqual(qd("foo"), ["foo"])

Powered by Google App Engine
This is Rietveld 408576698