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

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

Issue 23093014: reformat run-webkit-tests --driver-logging output to show ctrl chars. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@eof_crlf
Patch Set: Created 7 years, 4 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: 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"])

Powered by Google App Engine
This is Rietveld 408576698