WebKit Bugzilla
Attachment 356400 Details for
Bug 192260
: webkitpy: Support unicode in MeteredStream
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192260-20181203132107.patch (text/plain), 2.83 KB, created by
Jonathan Bedard
on 2018-12-03 13:21:07 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jonathan Bedard
Created:
2018-12-03 13:21:07 PST
Size:
2.83 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 238796) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2018-12-03 Jonathan Bedard <jbedard@apple.com> >+ >+ webkitpy: Support unicode in MeteredStream >+ https://bugs.webkit.org/show_bug.cgi?id=192260 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ It's possible that the test runner returns unicode characters to be logged when >+ running layout tests. >+ >+ * Scripts/webkitpy/layout_tests/views/metered_stream.py: >+ (MeteredStream.write): Print message without attempting to encode/decode it. >+ * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py: >+ (RegularTest.test_unicode): >+ > 2018-12-03 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOSMac] Unable to upload non-image files using drag and drop in WKWebView >Index: Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py >=================================================================== >--- Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py (revision 238796) >+++ Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py (working copy) >@@ -104,12 +104,10 @@ class MeteredStream(object): > now_tuple = time.localtime(now) > timestamp_string = '%02d:%02d:%02d.%03d %d ' % (now_tuple.tm_hour, now_tuple.tm_min, now_tuple.tm_sec, int((now * 1000) % 1000), pid) > >- if self._isatty and not self._verbose: >- msg = '{}{}'.format(timestamp_string, txt) >- else: >- msg = '{}{}'.format(timestamp_string, self._ensure_newline(txt)) >+ if not self._isatty or self._verbose: >+ txt = self._ensure_newline(txt) > >- self._stream.write(msg) >+ self._stream.write(timestamp_string + txt) > > def writeln(self, txt, now=None, pid=None): > self.write(self._ensure_newline(txt), now, pid) >Index: Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py >=================================================================== >--- Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py (revision 238796) >+++ Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py (working copy) >@@ -1,3 +1,5 @@ >+# -*- coding: utf-8 -*- >+ > # Copyright (C) 2010, 2012 Google Inc. All rights reserved. > # > # Redistribution and use in source and binary forms, with or without >@@ -108,6 +110,13 @@ class RegularTest(unittest.TestCase): > self.logger.info('foo %s %d', 'bar', 2) > self.assertEqual(self.buflist, ['foo bar 2\n']) > >+ def test_unicode(self): >+ self.logger.info(u'\u2713') >+ self.assertEqual(self.buflist[-1][-2:], u'\u2713\n') >+ >+ self.logger.info('âexampleâ') >+ self.assertEqual(self.buflist[-1][-14:], 'âexampleâ\n') >+ > > class TtyTest(RegularTest): > verbose = False
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192260
:
356246
|
356255
| 356400