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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac_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/mac_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
index fb90b5782548c34707c5efb47a8d1c93a961a87a..2d5260b4325a5112b59504368c5fc100dd2f3567 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
@@ -26,10 +26,10 @@
# (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.layout_tests.port import mac
from webkitpy.layout_tests.port import port_testcase
-from webkitpy.tool.mock_tool import MockOptions
class MacPortTest(port_testcase.PortTestCase):
@@ -48,20 +48,20 @@ class MacPortTest(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/xcodebuild/Release',
'/mock-checkout/out/Release'], '/mock-checkout/xcodebuild/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/xcodebuild/Release')
@@ -74,7 +74,7 @@ class MacPortTest(port_testcase.PortTestCase):
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(dict(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