summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
diff options
context:
space:
mode:
authorShimeng (Simon) Wang <swang@google.com>2010-12-07 17:22:45 -0800
committerShimeng (Simon) Wang <swang@google.com>2010-12-22 14:15:40 -0800
commit4576aa36e9a9671459299c7963ac95aa94beaea9 (patch)
tree3863574e050f168c0126ecb47c83319fab0972d8 /WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
parent55323ac613cc31553107b68603cb627264d22bb0 (diff)
downloadexternal_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.zip
external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.gz
external_webkit-4576aa36e9a9671459299c7963ac95aa94beaea9.tar.bz2
Merge WebKit at r73109: Initial merge by git.
Change-Id: I61f1a66d9642e3d8405d3ac6ccab2a53421c75d8
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py')
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
index 9a0f4ee..27a6a29 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py
@@ -78,8 +78,9 @@ class TestUtilityFunctions(unittest.TestCase):
self.assertTrue(options is not None)
def test_parse_print_options(self):
- def test_switches(args, verbose, child_processes, is_fully_parallel,
- expected_switches_str):
+ def test_switches(args, expected_switches_str,
+ verbose=False, child_processes=1,
+ is_fully_parallel=False):
options, args = get_options(args)
if expected_switches_str:
expected_switches = set(expected_switches_str.split(','))
@@ -92,28 +93,23 @@ class TestUtilityFunctions(unittest.TestCase):
self.assertEqual(expected_switches, switches)
# test that we default to the default set of switches
- test_switches([], False, 1, False,
- printing.PRINT_DEFAULT)
+ test_switches([], printing.PRINT_DEFAULT)
# test that verbose defaults to everything
- test_switches([], True, 1, False,
- printing.PRINT_EVERYTHING)
+ test_switches([], printing.PRINT_EVERYTHING, verbose=True)
# test that --print default does what it's supposed to
- test_switches(['--print', 'default'], False, 1, False,
- printing.PRINT_DEFAULT)
+ test_switches(['--print', 'default'], printing.PRINT_DEFAULT)
# test that --print nothing does what it's supposed to
- test_switches(['--print', 'nothing'], False, 1, False,
- None)
+ test_switches(['--print', 'nothing'], None)
# test that --print everything does what it's supposed to
- test_switches(['--print', 'everything'], False, 1, False,
- printing.PRINT_EVERYTHING)
+ test_switches(['--print', 'everything'], printing.PRINT_EVERYTHING)
# this tests that '--print X' overrides '--verbose'
- test_switches(['--print', 'actual'], True, 1, False,
- 'actual')
+ test_switches(['--print', 'actual'], 'actual', verbose=True)
+
class Testprinter(unittest.TestCase):