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

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

Issue 2680863007: Refactoring: Remove trivial uses of OutputCapture. (Closed)
Patch Set: Rebased Created 3 years, 10 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/tool/commands/optimize_baselines_unittest.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 bafafd81f8bee3cb3e0b738de0b3fc160607c443..2f4deea3ed04166085e44867e5f98df9a4f822ed 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
@@ -29,7 +29,6 @@ import re
import unittest
from webkitpy.common.host import Host
-from webkitpy.common.system.output_capture import OutputCapture
from webkitpy.common.webkit_finder import WebKitFinder
from webkitpy.w3c.test_converter import _W3CTestConverter, convert_for_webkit
from webkitpy.common.system.system_host_mock import MockSystemHost
@@ -79,14 +78,9 @@ CONTENT OF TEST
"""
converter = _W3CTestConverter(DUMMY_PATH, DUMMY_FILENAME, None)
- oc = OutputCapture()
- oc.capture_output()
- try:
- converter.feed(test_html)
- converter.close()
- converted = converter.output()
- finally:
- oc.restore_output()
+ converter.feed(test_html)
+ converter.close()
+ converted = converter.output()
self.verify_no_conversion_happened(converted, test_html)
@@ -112,14 +106,9 @@ CONTENT OF TEST
converter = _W3CTestConverter(fake_dir_path, DUMMY_FILENAME, None)
test_content = self.generate_test_content(converter.prefixed_properties, 1, test_html)
- oc = OutputCapture()
- oc.capture_output()
- try:
- converter.feed(test_content[1])
- converter.close()
- converted = converter.output()
- finally:
- oc.restore_output()
+ converter.feed(test_content[1])
+ converter.close()
+ converted = converter.output()
self.verify_conversion_happened(converted)
self.verify_prefixed_properties(converted, test_content[0])
@@ -199,14 +188,9 @@ CONTENT OF TEST
converter = _W3CTestConverter(DUMMY_PATH, DUMMY_FILENAME, None)
test_content = self.generate_test_content(converter.prefixed_properties, 4, test_html)
- oc = OutputCapture()
- oc.capture_output()
- try:
- converter.feed(test_content[1])
- converter.close()
- converted = converter.output()
- finally:
- oc.restore_output()
+ converter.feed(test_content[1])
+ converter.close()
+ converted = converter.output()
self.verify_conversion_happened(converted)
self.verify_prefixed_properties(converted, test_content[0])
@@ -231,15 +215,9 @@ CONTENT OF TEST
}
converter = _W3CTestConverter(DUMMY_PATH, DUMMY_FILENAME, test_reference_support_info)
- oc = OutputCapture()
- oc.capture_output()
-
- try:
- converter.feed(test_html)
- converter.close()
- converted = converter.output()
- finally:
- oc.restore_output()
+ converter.feed(test_html)
+ converter.close()
+ converted = converter.output()
self.verify_conversion_happened(converted)
self.verify_reference_relative_paths(converted, test_reference_support_info)
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/optimize_baselines_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698