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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_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/factory_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
index c2846ddf2eaf005105c7c3020036cfe17b3d0e2e..51ffc076b30b61bf341a712076b0f6880bfaca6c 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
@@ -26,18 +26,16 @@
# (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
import unittest
-from webkitpy.tool.mock_tool import MockOptions
from webkitpy.common.host_mock import MockHost
from webkitpy.common.webkit_finder import WebKitFinder
-
from webkitpy.layout_tests.port import android
+from webkitpy.layout_tests.port import factory
from webkitpy.layout_tests.port import linux
from webkitpy.layout_tests.port import mac
from webkitpy.layout_tests.port import win
-from webkitpy.layout_tests.port import factory
-from webkitpy.layout_tests.port import test
class FactoryTest(unittest.TestCase):
@@ -46,7 +44,7 @@ class FactoryTest(unittest.TestCase):
# instead of passing generic "options".
def setUp(self):
- self.webkit_options = MockOptions(pixel_tests=False)
+ self.webkit_options = optparse.Values({'pixel_tests': False})
def assert_port(self, port_name=None, os_name=None, os_version=None, options=None, cls=None):
host = MockHost(os_name=os_name, os_version=os_version)
@@ -86,7 +84,7 @@ class FactoryTest(unittest.TestCase):
files = files or {}
for path, contents in files.items():
host.filesystem.write_text_file(wkf.path_from_chromium_base(path), contents)
- options = MockOptions(target=target, configuration=configuration)
+ options = optparse.Values({'target': target, 'configuration': configuration})
return factory.PortFactory(host).get(options=options)
def test_default_target_and_configuration(self):

Powered by Google App Engine
This is Rietveld 408576698