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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 | 465 |
466 self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport']) | 466 self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport']) |
467 | 467 |
468 port = TestWebKitPort(port_name="testwebkitport-version") | 468 port = TestWebKitPort(port_name="testwebkitport-version") |
469 self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport',
'testwebkitport-version']) | 469 self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport',
'testwebkitport-version']) |
470 | 470 |
471 port = TestWebKitPort(port_name="testwebkitport-version", | 471 port = TestWebKitPort(port_name="testwebkitport-version", |
472 options=MockOptions(additional_platform_directory=
["internal-testwebkitport"])) | 472 options=MockOptions(additional_platform_directory=
["internal-testwebkitport"])) |
473 self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport',
'testwebkitport-version', 'internal-testwebkitport']) | 473 self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport',
'testwebkitport-version', 'internal-testwebkitport']) |
474 | 474 |
475 def test_root_option(self): | |
476 port = TestWebKitPort() | |
477 port._options = MockOptions(root='/foo') | |
478 self.assertEqual(port._path_to_driver(), "/foo/content_shell") | |
479 | |
480 def test_test_expectations(self): | 475 def test_test_expectations(self): |
481 # Check that we read the expectations file | 476 # Check that we read the expectations file |
482 host = MockSystemHost() | 477 host = MockSystemHost() |
483 host.filesystem.write_text_file('/mock-checkout/LayoutTests/platform/tes
twebkitport/TestExpectations', | 478 host.filesystem.write_text_file('/mock-checkout/LayoutTests/platform/tes
twebkitport/TestExpectations', |
484 'BUG_TESTEXPECTATIONS SKIP : fast/html/article-element.html = FAIL\n
') | 479 'BUG_TESTEXPECTATIONS SKIP : fast/html/article-element.html = FAIL\n
') |
485 port = TestWebKitPort(host=host) | 480 port = TestWebKitPort(host=host) |
486 self.assertEqual(''.join(port.expectations_dict().values()), 'BUG_TESTEX
PECTATIONS SKIP : fast/html/article-element.html = FAIL\n') | 481 self.assertEqual(''.join(port.expectations_dict().values()), 'BUG_TESTEX
PECTATIONS SKIP : fast/html/article-element.html = FAIL\n') |
487 | 482 |
488 def _assert_config_file_for_platform(self, port, platform, config_file): | 483 def _assert_config_file_for_platform(self, port, platform, config_file): |
489 self.assertEqual(port._apache_config_file_name_for_platform(platform), c
onfig_file) | 484 self.assertEqual(port._apache_config_file_name_for_platform(platform), c
onfig_file) |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 saved_environ = os.environ.copy() | 536 saved_environ = os.environ.copy() |
542 try: | 537 try: |
543 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf' | 538 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf' |
544 self.assertEqual(port._path_to_apache_config_file(), '/existing/http
d.conf') | 539 self.assertEqual(port._path_to_apache_config_file(), '/existing/http
d.conf') |
545 finally: | 540 finally: |
546 os.environ = saved_environ.copy() | 541 os.environ = saved_environ.copy() |
547 | 542 |
548 def test_additional_platform_directory(self): | 543 def test_additional_platform_directory(self): |
549 port = self.make_port(options=MockOptions(additional_platform_directory=
['/tmp/foo'])) | 544 port = self.make_port(options=MockOptions(additional_platform_directory=
['/tmp/foo'])) |
550 self.assertEqual(port.baseline_search_path()[0], '/tmp/foo') | 545 self.assertEqual(port.baseline_search_path()[0], '/tmp/foo') |
OLD | NEW |