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

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

Issue 2192403002: Remove MockOptions, and replace all usages of it with optparse.Values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
index fb09b1bfe1f800864eb9226f9249b01558a961ec..9b3e792a3a4aa67e33779a9167cb0c3263e16c39 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
@@ -26,11 +26,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import optparse
+
from webkitpy.common.system import executive_mock
from webkitpy.common.system.systemhost_mock import MockSystemHost
from webkitpy.layout_tests.port import linux
from webkitpy.layout_tests.port import port_testcase
-from webkitpy.tool.mock_tool import MockOptions
class LinuxPortTest(port_testcase.PortTestCase):
@@ -86,16 +87,16 @@ class LinuxPortTest(port_testcase.PortTestCase):
def test_build_path(self):
# Test that optional paths are used regardless of whether they exist.
- options = MockOptions(configuration='Release', build_directory='/foo')
+ options = optparse.Values({'configuration': 'Release', 'build_directory': '/foo'})
self.assert_build_path(options, ['/mock-checkout/out/Release'], '/foo/Release')
# Test that optional relative paths are returned unmodified.
- options = MockOptions(configuration='Release', build_directory='foo')
+ options = optparse.Values({'configuration': 'Release', 'build_directory': 'foo'})
self.assert_build_path(options, ['/mock-checkout/out/Release'], 'foo/Release')
def test_driver_name_option(self):
self.assertTrue(self.make_port()._path_to_driver().endswith('content_shell'))
- self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver'))._path_to_driver().endswith('OtherDriver'))
+ self.assertTrue(self.make_port(options=optparse.Values({'driver_name': 'OtherDriver'}))._path_to_driver().endswith('OtherDriver'))
def test_path_to_image_diff(self):
self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/image_diff')

Powered by Google App Engine
This is Rietveld 408576698