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

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

Issue 1177763005: [SP] Add flag to explicitly disable slimming paint by default when running layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix unit test. Created 5 years, 6 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
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/base.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 self.assertEqual(content_block.content_type, 'image/png') 124 self.assertEqual(content_block.content_type, 'image/png')
125 self.assertEqual(content_block.content_hash, 'actual') 125 self.assertEqual(content_block.content_hash, 'actual')
126 self.assertEqual(content_block.encoding, 'base64') 126 self.assertEqual(content_block.encoding, 'base64')
127 self.assertEqual(content_block.content, 'MTIzNDU2NzgK') 127 self.assertEqual(content_block.content, 'MTIzNDU2NzgK')
128 self.assertEqual(content_block.decoded_content, '12345678\n') 128 self.assertEqual(content_block.decoded_content, '12345678\n')
129 129
130 def test_no_timeout(self): 130 def test_no_timeout(self):
131 port = TestWebKitPort() 131 port = TestWebKitPort()
132 port._config.build_directory = lambda configuration: '/mock-checkout/out /' + configuration 132 port._config.build_directory = lambda configuration: '/mock-checkout/out /' + configuration
133 driver = Driver(port, 0, pixel_tests=True, no_timeout=True) 133 driver = Driver(port, 0, pixel_tests=True, no_timeout=True)
134 self.assertEqual(driver.cmd_line(True, []), ['/mock-checkout/out/Release /content_shell', '--no-timeout', '--run-layout-test', '-']) 134 self.assertEqual(driver.cmd_line(True, []), ['/mock-checkout/out/Release /content_shell', '--no-timeout', '--run-layout-test', '--disable-slimming-paint' , '-'])
135 135
136 def test_check_for_driver_crash(self): 136 def test_check_for_driver_crash(self):
137 port = TestWebKitPort() 137 port = TestWebKitPort()
138 driver = Driver(port, 0, pixel_tests=True) 138 driver = Driver(port, 0, pixel_tests=True)
139 139
140 class FakeServerProcess(object): 140 class FakeServerProcess(object):
141 def __init__(self, crashed): 141 def __init__(self, crashed):
142 self.crashed = crashed 142 self.crashed = crashed
143 143
144 def pid(self): 144 def pid(self):
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 last_tmpdir = port._filesystem.last_tmpdir 237 last_tmpdir = port._filesystem.last_tmpdir
238 driver._start(True, []) 238 driver._start(True, [])
239 self.assertFalse(port._filesystem.isdir(last_tmpdir)) 239 self.assertFalse(port._filesystem.isdir(last_tmpdir))
240 240
241 def test_start_actually_starts(self): 241 def test_start_actually_starts(self):
242 port = TestWebKitPort() 242 port = TestWebKitPort()
243 port._server_process_constructor = MockServerProcess 243 port._server_process_constructor = MockServerProcess
244 driver = Driver(port, 0, pixel_tests=True) 244 driver = Driver(port, 0, pixel_tests=True)
245 driver.start(True, [], None) 245 driver.start(True, [], None)
246 self.assertTrue(driver._server_process.started) 246 self.assertTrue(driver._server_process.started)
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/port/base.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698