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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/servers/apache_http_unittest.py

Issue 135653016: Clean up run-blink-httpd, run-blink-websocketserver, add tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge forward changes Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (C) 2012 Google Inc. All rights reserved. 1 # Copyright (C) 2012 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 def fake_pid(_): 47 def fake_pid(_):
48 host.filesystem.write_text_file('/tmp/WebKit/httpd.pid', '42') 48 host.filesystem.write_text_file('/tmp/WebKit/httpd.pid', '42')
49 return True 49 return True
50 50
51 host = MockHost() 51 host = MockHost()
52 host.executive = MockExecutive(should_log=True) 52 host.executive = MockExecutive(should_log=True)
53 test_port = test.TestPort(host) 53 test_port = test.TestPort(host)
54 host.filesystem.write_text_file(test_port.path_to_apache_config_file(), '') 54 host.filesystem.write_text_file(test_port.path_to_apache_config_file(), '')
55 55
56 server = ApacheHTTP(test_port, "/mock/output_dir", number_of_servers=4) 56 server = ApacheHTTP(test_port, "/mock/output_dir", additional_dirs=[], n umber_of_servers=4)
57 server._check_that_all_ports_are_available = lambda: True 57 server._check_that_all_ports_are_available = lambda: True
58 server._is_server_running_on_all_ports = lambda: True 58 server._is_server_running_on_all_ports = lambda: True
59 server._wait_for_action = fake_pid 59 server._wait_for_action = fake_pid
60 oc = OutputCapture() 60 oc = OutputCapture()
61 try: 61 try:
62 oc.capture_output() 62 oc.capture_output()
63 server.start() 63 server.start()
64 server.stop() 64 server.stop()
65 finally: 65 finally:
66 _, _, logs = oc.restore_output() 66 _, _, logs = oc.restore_output()
67 self.assertIn("StartServers 4", logs) 67 self.assertIn("StartServers 4", logs)
68 self.assertIn("MinSpareServers 4", logs) 68 self.assertIn("MinSpareServers 4", logs)
69 self.assertIn("MaxSpareServers 4", logs) 69 self.assertIn("MaxSpareServers 4", logs)
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/servers/apache_http.py ('k') | Tools/Scripts/webkitpy/layout_tests/servers/cli_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698