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"]) |