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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py

Issue 1161863003: Add an additional content_shell per worker for running virtual tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@virtual_reference_flags
Patch Set: Add integration test for virtual tests with default reference args Created 5 years, 7 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/controllers/layout_test_runner_unittest.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
index 9ce796af34bf816f026c458cf44749839f2d8c57..6bdd7597dfcc271cf07a785f1e19befef69ab70d 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
@@ -32,7 +32,7 @@ import unittest
from webkitpy.common.host_mock import MockHost
from webkitpy.common.system.systemhost_mock import MockSystemHost
from webkitpy.layout_tests import run_webkit_tests
-from webkitpy.layout_tests.controllers.layout_test_runner import LayoutTestRunner, Sharder, TestRunInterruptedException
+from webkitpy.layout_tests.controllers.layout_test_runner import DriverHandler, LayoutTestRunner, Sharder, TestRunInterruptedException
from webkitpy.layout_tests.models import test_expectations
from webkitpy.layout_tests.models import test_failures
from webkitpy.layout_tests.models.test_run_results import TestRunResults
@@ -156,6 +156,36 @@ class LayoutTestRunnerTests(unittest.TestCase):
self.assertEqual(1, run_results.unexpected)
+class DriverHandlerTests(unittest.TestCase):
+ def _create_driver_handler(self):
+ port = TestPort(MockSystemHost())
+ return DriverHandler("test_driver", 1, "test_worker", port)
+
+ def test_init(self):
+ self.assertFalse(self._create_driver_handler().driver)
+
+ def test_prepare(self):
+ driver_handler = self._create_driver_handler()
+ driver_handler.prepare()
+ self.assertTrue(driver_handler.driver)
+
+ def test_is_prepared(self):
+ driver_handler = self._create_driver_handler()
+ self.assertFalse(driver_handler.is_prepared())
+ driver_handler.prepare()
+ self.assertTrue(driver_handler.is_prepared())
+ driver_handler.kill()
+ self.assertFalse(driver_handler.is_prepared())
+
+ def test_kill(self):
+ driver_handler = self._create_driver_handler()
+ driver_handler.kill()
+ self.assertFalse(driver_handler.driver)
+ driver_handler.prepare()
+ driver_handler.kill()
+ self.assertFalse(driver_handler.driver)
+
+
class SharderTests(unittest.TestCase):
test_list = [

Powered by Google App Engine
This is Rietveld 408576698