| 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 19 matching lines...) Expand all Loading... |
| 30 import optparse | 30 import optparse |
| 31 import sys | 31 import sys |
| 32 import tempfile | 32 import tempfile |
| 33 import unittest | 33 import unittest |
| 34 | 34 |
| 35 from webkitpy.common.system.executive import Executive, ScriptError | 35 from webkitpy.common.system.executive import Executive, ScriptError |
| 36 from webkitpy.common.system import executive_mock | 36 from webkitpy.common.system import executive_mock |
| 37 from webkitpy.common.system.filesystem_mock import MockFileSystem | 37 from webkitpy.common.system.filesystem_mock import MockFileSystem |
| 38 from webkitpy.common.system.outputcapture import OutputCapture | 38 from webkitpy.common.system.outputcapture import OutputCapture |
| 39 from webkitpy.common.system.path import abspath_to_uri | 39 from webkitpy.common.system.path import abspath_to_uri |
| 40 from webkitpy.thirdparty.mock import Mock | |
| 41 from webkitpy.tool.mocktool import MockOptions | 40 from webkitpy.tool.mocktool import MockOptions |
| 42 from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2 | 41 from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2 |
| 43 from webkitpy.common.system.systemhost_mock import MockSystemHost | 42 from webkitpy.common.system.systemhost_mock import MockSystemHost |
| 44 | 43 |
| 45 from webkitpy.layout_tests.port import Port, Driver, DriverOutput | 44 from webkitpy.layout_tests.port import Port, Driver, DriverOutput |
| 46 from webkitpy.layout_tests.port.base import VirtualTestSuite | 45 from webkitpy.layout_tests.port.base import VirtualTestSuite |
| 47 from webkitpy.layout_tests.port.test import add_unit_tests_to_mock_filesystem, T
estPort | 46 from webkitpy.layout_tests.port.test import add_unit_tests_to_mock_filesystem, T
estPort |
| 48 | 47 |
| 49 class PortTest(unittest.TestCase): | 48 class PortTest(unittest.TestCase): |
| 50 def make_port(self, executive=None, with_tests=False, port_name=None, **kwar
gs): | 49 def make_port(self, executive=None, with_tests=False, port_name=None, **kwar
gs): |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 suite = VirtualTestSuite('suite/bar', 'base/foo', ['--args']) | 460 suite = VirtualTestSuite('suite/bar', 'base/foo', ['--args']) |
| 462 self.assertFalse(hasattr(suite, 'name')) | 461 self.assertFalse(hasattr(suite, 'name')) |
| 463 self.assertFalse(hasattr(suite, 'base')) | 462 self.assertFalse(hasattr(suite, 'base')) |
| 464 self.assertFalse(hasattr(suite, 'args')) | 463 self.assertFalse(hasattr(suite, 'args')) |
| 465 | 464 |
| 466 def test_legacy(self): | 465 def test_legacy(self): |
| 467 suite = VirtualTestSuite('suite/bar', 'base/foo', ['--args'], use_legacy
_naming=True) | 466 suite = VirtualTestSuite('suite/bar', 'base/foo', ['--args'], use_legacy
_naming=True) |
| 468 self.assertEqual(suite.name, 'virtual/suite/bar') | 467 self.assertEqual(suite.name, 'virtual/suite/bar') |
| 469 self.assertEqual(suite.base, 'base/foo') | 468 self.assertEqual(suite.base, 'base/foo') |
| 470 self.assertEqual(suite.args, ['--args']) | 469 self.assertEqual(suite.args, ['--args']) |
| OLD | NEW |