Make arguments of run-benchmark more user friendly
[WebKit-https.git] / Tools / Scripts / webkitpy / benchmark_runner / browser_driver / browser_driver_factory.py
index b998b4f77eb1233cef3c02b0f8cfcb35b85d466a..a140ec07f3991b7ee5f5bd687fa83f59db32977e 100644 (file)
@@ -14,3 +14,15 @@ driverFileName = 'browser_drivers.json'
 class BrowserDriverFactory(GenericFactory):
 
     products = loadJSONFromFile(os.path.join(os.path.dirname(__file__), driverFileName))
+
+    @classmethod
+    def available_platforms(cls):
+        return cls.products.keys()
+
+    @classmethod
+    def available_browsers(cls):
+        browsers = []
+        for platform in cls.products.values():
+            for browser in platform:
+                browsers.append(browser)
+        return browsers