| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 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 15 matching lines...) Expand all Loading... |
| 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | 28 |
| 29 import unittest2 as unittest | 29 import unittest2 as unittest |
| 30 | 30 |
| 31 from webkitpy.common.system import logtesting | 31 from webkitpy.common.system import logtesting |
| 32 from webkitpy.common.system.executive_mock import MockExecutive2 | 32 from webkitpy.common.system.executive_mock import MockExecutive2 |
| 33 from webkitpy.common.system.systemhost_mock import MockSystemHost | 33 from webkitpy.common.system.systemhost_mock import MockSystemHost |
| 34 from webkitpy.tool.mocktool import MockOptions | 34 from webkitpy.tool.mocktool import MockOptions |
| 35 | 35 |
| 36 import chromium_android | 36 import android |
| 37 import linux | 37 import linux |
| 38 import mac | 38 import mac |
| 39 import win | 39 import win |
| 40 | 40 |
| 41 from webkitpy.layout_tests.models.test_configuration import TestConfiguration | 41 from webkitpy.layout_tests.models.test_configuration import TestConfiguration |
| 42 from webkitpy.layout_tests.port import port_testcase | 42 from webkitpy.layout_tests.port import port_testcase |
| 43 | 43 |
| 44 | 44 |
| 45 class ChromiumPortTestCase(port_testcase.PortTestCase): | 45 class ChromiumPortTestCase(port_testcase.PortTestCase): |
| 46 | 46 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 class TestMacPort(mac.MacPort): | 92 class TestMacPort(mac.MacPort): |
| 93 def __init__(self, options=None): | 93 def __init__(self, options=None): |
| 94 options = options or MockOptions() | 94 options = options or MockOptions() |
| 95 mac.MacPort.__init__(self, MockSystemHost(os_name='mac', os_version=
'leopard'), 'mac-leopard', options=options) | 95 mac.MacPort.__init__(self, MockSystemHost(os_name='mac', os_version=
'leopard'), 'mac-leopard', options=options) |
| 96 | 96 |
| 97 def default_configuration(self): | 97 def default_configuration(self): |
| 98 self.default_configuration_called = True | 98 self.default_configuration_called = True |
| 99 return 'default' | 99 return 'default' |
| 100 | 100 |
| 101 class TestAndroidPort(chromium_android.ChromiumAndroidPort): | 101 class TestAndroidPort(android.AndroidPort): |
| 102 def __init__(self, options=None): | 102 def __init__(self, options=None): |
| 103 options = options or MockOptions() | 103 options = options or MockOptions() |
| 104 chromium_android.ChromiumAndroidPort.__init__(self, MockSystemHost(o
s_name='android', os_version='icecreamsandwich'), 'chromium-android', options=op
tions) | 104 android.AndroidPort.__init__(self, MockSystemHost(os_name='android',
os_version='icecreamsandwich'), 'android', options=options) |
| 105 | 105 |
| 106 def default_configuration(self): | 106 def default_configuration(self): |
| 107 self.default_configuration_called = True | 107 self.default_configuration_called = True |
| 108 return 'default' | 108 return 'default' |
| 109 | 109 |
| 110 class TestLinuxPort(linux.LinuxPort): | 110 class TestLinuxPort(linux.LinuxPort): |
| 111 def __init__(self, options=None): | 111 def __init__(self, options=None): |
| 112 options = options or MockOptions() | 112 options = options or MockOptions() |
| 113 linux.LinuxPort.__init__(self, MockSystemHost(os_name='linux', os_ve
rsion='lucid'), 'linux-x86', options=options) | 113 linux.LinuxPort.__init__(self, MockSystemHost(os_name='linux', os_ve
rsion='lucid'), 'linux-x86', options=options) |
| 114 | 114 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 209 |
| 210 # Failure | 210 # Failure |
| 211 port._executive = MockExecutive2(exit_code=1, | 211 port._executive = MockExecutive2(exit_code=1, |
| 212 output='testing output failure') | 212 output='testing output failure') |
| 213 self.assertFalse(port.check_sys_deps(needs_http=False)) | 213 self.assertFalse(port.check_sys_deps(needs_http=False)) |
| 214 self.assertLog([ | 214 self.assertLog([ |
| 215 'ERROR: System dependencies check failed.\n', | 215 'ERROR: System dependencies check failed.\n', |
| 216 'ERROR: To override, invoke with --nocheck-sys-deps\n', | 216 'ERROR: To override, invoke with --nocheck-sys-deps\n', |
| 217 'ERROR: \n', | 217 'ERROR: \n', |
| 218 'ERROR: testing output failure\n']) | 218 'ERROR: testing output failure\n']) |
| OLD | NEW |