Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py

Issue 15790007: Fix webkitpy unittests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
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): 475 def test_root_option(self):
476 port = TestWebKitPort() 476 port = TestWebKitPort()
477 port._options = MockOptions(root='/foo') 477 port._options = MockOptions(root='/foo')
478 self.assertEqual(port._path_to_driver(), "/foo/DumpRenderTree") 478 self.assertEqual(port._path_to_driver(), "/foo/content_shell")
479 479
480 def test_test_expectations(self): 480 def test_test_expectations(self):
481 # Check that we read the expectations file 481 # Check that we read the expectations file
482 host = MockSystemHost() 482 host = MockSystemHost()
483 host.filesystem.write_text_file('/mock-checkout/LayoutTests/platform/tes twebkitport/TestExpectations', 483 host.filesystem.write_text_file('/mock-checkout/LayoutTests/platform/tes twebkitport/TestExpectations',
484 'BUG_TESTEXPECTATIONS SKIP : fast/html/article-element.html = FAIL\n ') 484 'BUG_TESTEXPECTATIONS SKIP : fast/html/article-element.html = FAIL\n ')
485 port = TestWebKitPort(host=host) 485 port = TestWebKitPort(host=host)
486 self.assertEqual(''.join(port.expectations_dict().values()), 'BUG_TESTEX PECTATIONS SKIP : fast/html/article-element.html = FAIL\n') 486 self.assertEqual(''.join(port.expectations_dict().values()), 'BUG_TESTEX PECTATIONS SKIP : fast/html/article-element.html = FAIL\n')
487 487
488 def _assert_config_file_for_platform(self, port, platform, config_file): 488 def _assert_config_file_for_platform(self, port, platform, config_file):
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 saved_environ = os.environ.copy() 541 saved_environ = os.environ.copy()
542 try: 542 try:
543 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf' 543 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf'
544 self.assertEqual(port._path_to_apache_config_file(), '/existing/http d.conf') 544 self.assertEqual(port._path_to_apache_config_file(), '/existing/http d.conf')
545 finally: 545 finally:
546 os.environ = saved_environ.copy() 546 os.environ = saved_environ.copy()
547 547
548 def test_additional_platform_directory(self): 548 def test_additional_platform_directory(self):
549 port = self.make_port(options=MockOptions(additional_platform_directory= ['/tmp/foo'])) 549 port = self.make_port(options=MockOptions(additional_platform_directory= ['/tmp/foo']))
550 self.assertEqual(port.baseline_search_path()[0], '/tmp/foo') 550 self.assertEqual(port.baseline_search_path()[0], '/tmp/foo')
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py ('k') | Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698