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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py

Issue 2037743002: Support converting utf-16 files when importing w3c tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Support converting utf-16 files when importing w3c tests. Created 4 years, 7 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 | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_converter.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py
index 3c060ff91aacce46bb128a4c651ca8612bfd6ca6..07c174be7135ebdf3a50070782a6d8655754946b 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py
@@ -33,7 +33,9 @@ from webkitpy.common.host import Host
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.webkit_finder import WebKitFinder
from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
-from webkitpy.w3c.test_converter import _W3CTestConverter
+from webkitpy.w3c.test_converter import _W3CTestConverter, convert_for_webkit
+from webkitpy.common.system.systemhost_mock import MockSystemHost
+from webkitpy.common.system.filesystem_mock import MockFileSystem
DUMMY_FILENAME = 'dummy.html'
DUMMY_PATH = 'dummy/testharness/path'
@@ -310,3 +312,16 @@ CONTENT OF TEST
index -= 1
return (test_properties, html)
+
+ def test_convert_for_webkit_with_non_utf8(self):
+ files = {'/file': 'e\x87[P',
+ '/mock-checkout/third_party/WebKit/Source/core/css/CSSProperties.in': '', }
+ host = MockSystemHost(filesystem=MockFileSystem(files=files))
+ convert_for_webkit('', '/file', '', host)
+
+ # This test passes if no Exception is raised
+ def test_convert_for_webkit_with_utf8(self):
+ files = {'/file': 'foo',
+ '/mock-checkout/third_party/WebKit/Source/core/css/CSSProperties.in': '', }
+ host = MockSystemHost(filesystem=MockFileSystem(files=files))
+ convert_for_webkit('', '/file', '', host)
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_converter.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698