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

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

Issue 17320009: Remove the 'http_lock' and 'file_lock' code from webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix merge again Created 7 years, 6 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/manager_unittest.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py b/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
index 4a8154878bb722586e80786239a7e0c291530806..ccdd4feaaf9e9d3ac1afbbb8762cc945b087111a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
@@ -75,6 +75,56 @@ class ManagerTest(unittest.TestCase):
manager = get_manager()
self.assertTrue(manager.needs_servers(['http\\tests\\mime']))
+ def test_servers_started(self):
+ def get_manager(port):
+ manager = Manager(port, options=MockOptions(http=True, max_locked_shards=1), printer=Mock())
+ return manager
+
+ def start_http_server(number_of_servers=None):
+ self.http_started = True
+
+ def start_websocket_server():
+ self.websocket_started = True
+
+ def stop_http_server():
+ self.http_stopped = True
+
+ def stop_websocket_server():
+ self.websocket_stopped = True
+
+ host = MockHost()
+ port = host.port_factory.get('test-mac-leopard')
+ port.start_http_server = start_http_server
+ port.start_websocket_server = start_websocket_server
+ port.stop_http_server = stop_http_server
+ port.stop_websocket_server = stop_websocket_server
+
+ self.http_started = self.http_stopped = self.websocket_started = self.websocket_stopped = False
+ manager = get_manager(port)
+ manager._start_servers(['http/tests/foo.html'])
+ self.assertEqual(self.http_started, True)
+ self.assertEqual(self.websocket_started, False)
+ manager._stop_servers()
+ self.assertEqual(self.http_stopped, True)
+ self.assertEqual(self.websocket_stopped, False)
+
+ self.http_started = self.http_stopped = self.websocket_started = self.websocket_stopped = False
+ manager._start_servers(['http/tests/websocket/foo.html'])
+ self.assertEqual(self.http_started, True)
+ self.assertEqual(self.websocket_started, True)
+ manager._stop_servers()
+ self.assertEqual(self.http_stopped, True)
+ self.assertEqual(self.websocket_stopped, True)
+
+ self.http_started = self.http_stopped = self.websocket_started = self.websocket_stopped = False
+ manager._start_servers(['fast/html/foo.html'])
+ self.assertEqual(self.http_started, False)
+ self.assertEqual(self.websocket_started, False)
+ manager._stop_servers()
+ self.assertEqual(self.http_stopped, False)
+ self.assertEqual(self.websocket_stopped, False)
+
+
def test_look_for_new_crash_logs(self):
def get_manager():
host = MockHost()
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/controllers/manager.py ('k') | Tools/Scripts/webkitpy/layout_tests/port/base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698