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

Unified Diff: webkit/tools/layout_tests/layout_package/http_server_base.py

Issue 545145: Move the layout test scripts into a 'webkitpy' subdirectory in preparation... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: try to de-confuse svn and the try bots Created 10 years, 11 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: webkit/tools/layout_tests/layout_package/http_server_base.py
===================================================================
--- webkit/tools/layout_tests/layout_package/http_server_base.py (revision 36724)
+++ webkit/tools/layout_tests/layout_package/http_server_base.py (working copy)
@@ -1,42 +0,0 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Base class with common routines between the Apache and Lighttpd servers."""
-
-import logging
-import time
-import urllib
-
-
-class HttpServerBase(object):
-
- def WaitForAction(self, action):
- """Repeat the action for 20 seconds or until it succeeds. Returns
- whether it succeeded."""
- start_time = time.time()
- while time.time() - start_time < 20:
- if action():
- return True
- time.sleep(1)
-
- return False
-
- def IsServerRunningOnAllPorts(self):
- """Returns whether the server is running on all the desired ports."""
- for mapping in self.mappings:
- if 'sslcert' in mapping:
- http_suffix = 's'
- else:
- http_suffix = ''
-
- url = 'http%s://127.0.0.1:%d/' % (http_suffix, mapping['port'])
-
- try:
- response = urllib.urlopen(url)
- logging.debug("Server running at %s" % url)
- except IOError:
- logging.debug("Server NOT running at %s" % url)
- return False
-
- return True

Powered by Google App Engine
This is Rietveld 408576698