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

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

Issue 2629113005: [Android] Stop using universal_newlines in the layout tests server constructor. (Closed)
Patch Set: explain the pylint disable Created 3 years, 11 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 | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py
index 5f6d18f7ff961e20c178dbc59dd08f1b4dc65c26..600d879d456ca2379d88cc9798ec0a1f06919e8b 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py
@@ -512,14 +512,8 @@ class AndroidPort(base.Port):
@staticmethod
def _android_server_process_constructor(port, server_name, cmd_line, env=None, more_logging=False):
- # We need universal_newlines=True, because 'adb shell' for some unknown reason
- # does newline conversion of unix-style LF into win-style CRLF (and we need
- # to convert that back). This can cause headaches elsewhere because
- # server_process' stdout and stderr are now unicode file-like objects,
- # not binary file-like objects like all of the other ports are.
- # FIXME: crbug.com/496983.
return server_process.ServerProcess(port, server_name, cmd_line, env,
- universal_newlines=True, treat_no_data_as_crash=True, more_logging=more_logging)
+ treat_no_data_as_crash=True, more_logging=more_logging)
class AndroidPerf(SingleFileOutputProfiler):
@@ -887,14 +881,8 @@ class ChromiumAndroidDriver(driver.Driver):
self._device.serial,
stack)
- # The parent method expects stdout and stderr to be byte streams, but
- # since adb shell does newline conversion, we used universal_newlines
- # when launching the processes, and hence our stdout and stderr are
- # text objects that need to be encoded back into bytes.
return super(ChromiumAndroidDriver, self)._get_crash_log(
- stdout.encode('utf8', 'replace'),
- stderr.encode('utf8', 'replace'),
- newer_than)
+ stdout, stderr, newer_than)
def cmd_line(self, pixel_tests, per_test_args):
# The returned command line is used to start _server_process. In our case, it's an interactive 'adb shell'.
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698