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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/port/factory.py

Issue 398543005: Revert of Modifications to layout test framework so that it can work with browser_tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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: Tools/Scripts/webkitpy/layout_tests/port/factory.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory.py b/Tools/Scripts/webkitpy/layout_tests/port/factory.py
index 8703ddf3d3e612488820f5b68293557da895d2c7..db2144ba2c03d6948db46d38da0bc8bcfef759ab 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/factory.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/factory.py
@@ -104,22 +104,13 @@
if port_name == 'chromium':
port_name = self._host.platform.os_name
- if 'browser_test' in port_name:
- module_name, class_name = port_name.rsplit('.', 1)
+ for port_class in self.PORT_CLASSES:
+ module_name, class_name = port_class.rsplit('.', 1)
module = __import__(module_name, globals(), locals(), [], -1)
- port_class_name = module.get_port_class_name(class_name)
- if port_class_name != None:
- cls = module.__dict__[port_class_name]
- port_name = cls.determine_full_port_name(self._host, options, class_name)
+ cls = module.__dict__[class_name]
+ if port_name.startswith(cls.port_name):
+ port_name = cls.determine_full_port_name(self._host, options, port_name)
return cls(self._host, port_name, options=options, **kwargs)
- else:
- for port_class in self.PORT_CLASSES:
- module_name, class_name = port_class.rsplit('.', 1)
- module = __import__(module_name, globals(), locals(), [], -1)
- cls = module.__dict__[class_name]
- if port_name.startswith(cls.port_name):
- port_name = cls.determine_full_port_name(self._host, options, port_name)
- return cls(self._host, port_name, options=options, **kwargs)
raise NotImplementedError('unsupported platform: "%s"' % port_name)
def all_port_names(self, platform=None):
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py ('k') | Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698