| Index: Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
|
| diff --git a/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
|
| index e17d7a9e762e730dbbd526004f7d2133ab5221c4..0b1db7391737993258a6a42aed67d1cfb5f53356 100644
|
| --- a/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
|
| +++ b/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
|
| @@ -37,7 +37,6 @@ from webkitpy.common.system.systemhost_mock import MockSystemHost
|
| from webkitpy.common.system.outputcapture import OutputCapture
|
|
|
|
|
| -
|
| class TrivialMockPort(object):
|
| def __init__(self):
|
| self.host = MockSystemHost()
|
| @@ -147,3 +146,24 @@ class TestServerProcess(unittest.TestCase):
|
| self.assertTrue(server_process.has_crashed())
|
| self.assertIsNone(server_process._proc)
|
| self.assertEqual(server_process.broken_pipes, [server_process.stdin])
|
| +
|
| +
|
| +class TestQuoteData(unittest.TestCase):
|
| + def test_plain(self):
|
| + qd = server_process.quote_data
|
| + self.assertEqual(qd("foo"), ["foo"])
|
| +
|
| + def test_trailing_spaces(self):
|
| + qd = server_process.quote_data
|
| + self.assertEqual(qd("foo "),
|
| + ["foo\x20\x20"])
|
| +
|
| + def test_newlines(self):
|
| + qd = server_process.quote_data
|
| + self.assertEqual(qd("foo \nbar\n"),
|
| + ["foo\x20\\n", "bar\\n"])
|
| +
|
| + def test_binary_data(self):
|
| + qd = server_process.quote_data
|
| + self.assertEqual(qd("\x00\x01ab"),
|
| + ["\\x00\\x01ab"])
|
|
|