| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
|
| index c14803152a39946d9a83aa289ea79159dfe6c843..fb09b1bfe1f800864eb9226f9249b01558a961ec 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
|
| @@ -26,8 +26,6 @@
|
| # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -import os
|
| -
|
| from webkitpy.common.system import executive_mock
|
| from webkitpy.common.system.systemhost_mock import MockSystemHost
|
| from webkitpy.layout_tests.port import linux
|
| @@ -42,13 +40,6 @@ class LinuxPortTest(port_testcase.PortTestCase):
|
| full_port_name = 'linux-trusty'
|
| port_maker = linux.LinuxPort
|
|
|
| - def setUp(self):
|
| - # TODO(qyearsley): Remove this when crbug.com/627887 is fixed.
|
| - self.original_environ = os.environ.copy()
|
| -
|
| - def tearDown(self):
|
| - os.environ = self.original_environ
|
| -
|
| def assert_version_properties(self, port_name, os_version, expected_name,
|
| expected_version,
|
| driver_file_output=None):
|
| @@ -110,19 +101,18 @@ class LinuxPortTest(port_testcase.PortTestCase):
|
| self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/image_diff')
|
|
|
| def test_dummy_home_dir_is_created_and_cleaned_up(self):
|
| - original_home = '/home/user'
|
| - os.environ['HOME'] = original_home
|
| port = self.make_port()
|
| + port.host.environ['HOME'] = '/home/user'
|
| port._filesystem.files['/home/user/.Xauthority'] = ''
|
|
|
| # Set up the test run; the temporary home directory should be set up.
|
| port.setup_test_run()
|
| - temp_home_dir = os.environ['HOME']
|
| - self.assertNotEqual(temp_home_dir, original_home)
|
| + temp_home_dir = port.host.environ['HOME']
|
| + self.assertNotEqual(temp_home_dir, '/home/user')
|
| self.assertTrue(port._filesystem.isdir(temp_home_dir))
|
| self.assertTrue(port._filesystem.isfile(port._filesystem.join(temp_home_dir, '.Xauthority')))
|
|
|
| # Clean up; HOME should be reset and the temp dir should be cleaned up.
|
| port.clean_up_test_run()
|
| - self.assertEqual(os.environ.get('HOME'), original_home)
|
| + self.assertEqual(port.host.environ['HOME'], '/home/user')
|
| self.assertFalse(port._filesystem.exists(temp_home_dir))
|
|
|