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

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

Issue 479633002: Remove several unneeded modules from webkitpy.common. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « Tools/Scripts/webkitpy/common/thread/threadedmessagequeue_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
index 7ce4ada495647ef616d62ffd69e8e6db9c1b0122..681434df48bbc8285c1da8d7d4b8113d2f79526a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
@@ -28,10 +28,10 @@
"""Unit tests for MockDRT."""
+import io
import sys
import unittest
-from webkitpy.common import newstringio
from webkitpy.common.system.systemhost_mock import MockSystemHost
from webkitpy.layout_tests.port import mock_drt
from webkitpy.layout_tests.port import port_testcase
@@ -127,9 +127,9 @@ class MockDRTTest(unittest.TestCase):
pixel_tests, expected_checksum, drt_output, drt_input=None, expected_text=expected_text)
args = ['--dump-render-tree', '--platform', port_name, '-']
- stdin = newstringio.StringIO(drt_input)
- stdout = newstringio.StringIO()
- stderr = newstringio.StringIO()
+ stdin = io.BytesIO(drt_input)
+ stdout = io.BytesIO()
+ stderr = io.BytesIO()
options, args = mock_drt.parse_options(args)
drt = self.make_drt(options, args, host, stdin, stdout, stderr)
@@ -137,17 +137,15 @@ class MockDRTTest(unittest.TestCase):
self.assertEqual(res, 0)
- # We use the StringIO.buflist here instead of getvalue() because
- # the StringIO might be a mix of unicode/ascii and 8-bit strings.
- self.assertEqual(stdout.buflist, drt_output)
+ self.assertEqual(stdout.getvalue(), ''.join(drt_output))
self.assertEqual(stderr.getvalue(), '#EOF\n')
def test_main(self):
host = MockSystemHost()
test.add_unit_tests_to_mock_filesystem(host.filesystem)
- stdin = newstringio.StringIO()
- stdout = newstringio.StringIO()
- stderr = newstringio.StringIO()
+ stdin = io.BytesIO()
+ stdout = io.BytesIO()
+ stderr = io.BytesIO()
res = mock_drt.main(['--dump-render-tree', '--platform', 'test', '-'],
host, stdin, stdout, stderr)
self.assertEqual(res, 0)
« no previous file with comments | « Tools/Scripts/webkitpy/common/thread/threadedmessagequeue_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698