1 # Copyright (C) 2010 Google Inc. All rights reserved. 2 # 3 # Redistribution and use in source and binary forms, with or without 4 # modification, are permitted provided that the following conditions are 5 # met: 6 # 7 # * Redistributions of source code must retain the above copyright 8 # notice, this list of conditions and the following disclaimer. 9 # * Redistributions in binary form must reproduce the above 10 # copyright notice, this list of conditions and the following disclaimer 11 # in the documentation and/or other materials provided with the 12 # distribution. 13 # * Neither the Google name nor the names of its 14 # contributors may be used to endorse or promote products derived from 15 # this software without specific prior written permission. 16 # 17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 29 """WebKit Win implementation of the Port interface.""" 30 31 import logging 32 33 from webkitpy.layout_tests.port.webkit import WebKitPort 34 35 _log = logging.getLogger("webkitpy.layout_tests.port.win") 36 37 38 class WinPort(WebKitPort): 39 """WebKit Win implementation of the Port class.""" 40 41 def __init__(self, port_name=None, **kwargs): 42 port_name = port_name or 'win' 43 WebKitPort.__init__(self, port_name=port_name, **kwargs) 44 self._version = 'win7' 45 self._operating_system = 'win' 46 47 def baseline_search_path(self): 48 # Based on code from old-run-webkit-tests expectedDirectoryForTest() 49 port_names = ["win", "mac-snowleopard", "mac"] 50 return map(self._webkit_baseline_path, port_names) 51 52 def _tests_for_other_platforms(self): 53 # FIXME: This list could be dynamic based on platform name and 54 # pushed into base.Port. 55 # This really need to be automated. 56 return [ 57 "platform/chromium", 58 "platform/gtk", 59 "platform/qt", 60 "platform/mac", 61 ] 62 63 def _path_to_apache_config_file(self): 64 return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', 65 'cygwin-httpd.conf') 66 67 def _shut_down_http_server(self, server_pid): 68 """Shut down the httpd web server. Blocks until it's fully 69 shut down. 70 71 Args: 72 server_pid: The process ID of the running server. 73 """ 74 # Looks like we ignore server_pid. 75 # Copy/pasted from chromium-win. 76 self._executive.kill_all("httpd.exe") 77