| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py
|
| index 89ef5ff257aed9f068ed7488db050fce4505e89a..07953dbb5a9e36d54691687ff9e08421979fa9b2 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py
|
| @@ -26,12 +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 outputcapture
|
| from webkitpy.common.system.executive_mock import MockExecutive
|
| -from webkitpy.common.system.filesystem_mock import MockFileSystem
|
| from webkitpy.layout_tests.port import port_testcase
|
| from webkitpy.layout_tests.port import win
|
| -from webkitpy.tool.mock_tool import MockOptions
|
|
|
|
|
| class WinPortTest(port_testcase.PortTestCase):
|
| @@ -56,7 +56,7 @@ class WinPortTest(port_testcase.PortTestCase):
|
| self.assertEqual(env['CYGWIN_PATH'], '/mock-checkout/third_party/cygwin/bin')
|
|
|
| def test_setup_environ_for_server_register_cygwin(self):
|
| - port = self.make_port(options=MockOptions(register_cygwin=True, results_directory='/'))
|
| + port = self.make_port(options=optparse.Values({'register_cygwin': True, 'results_directory': '/'}))
|
| port._executive = MockExecutive(should_log=True)
|
| expected_logs = "MOCK run_command: ['/mock-checkout/third_party/cygwin/setup_mount.bat'], cwd=None\n"
|
| output = outputcapture.OutputCapture()
|
| @@ -112,19 +112,19 @@ class WinPortTest(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')
|
|
|
| # Test that we prefer the legacy dir over the new dir.
|
| - options = MockOptions(configuration='Release', build_directory=None)
|
| + options = optparse.Values({'configuration': 'Release', 'build_directory': None})
|
| self.assert_build_path(options, ['/mock-checkout/build/Release', '/mock-checkout/out'], '/mock-checkout/build/Release')
|
|
|
| def test_build_path_timestamps(self):
|
| - options = MockOptions(configuration='Release', build_directory=None)
|
| + options = optparse.Values({'configuration': 'Release', 'build_directory': None})
|
| port = self.make_port(options=options)
|
| port.host.filesystem.maybe_make_directory('/mock-checkout/out/Release')
|
| port.host.filesystem.maybe_make_directory('/mock-checkout/build/Release')
|
| @@ -140,8 +140,8 @@ class WinPortTest(port_testcase.PortTestCase):
|
|
|
| def test_driver_name_option(self):
|
| self.assertTrue(self.make_port()._path_to_driver().endswith('content_shell.exe'))
|
| - self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver')
|
| - )._path_to_driver().endswith('OtherDriver.exe'))
|
| + self.assertTrue(
|
| + self.make_port(options=optparse.Values({'driver_name': 'OtherDriver'}))._path_to_driver().endswith('OtherDriver.exe'))
|
|
|
| def test_path_to_image_diff(self):
|
| self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/image_diff.exe')
|
|
|