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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py

Issue 2128403002: Remove constant ALL_BASELINE_VARIANTS from port/test.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.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) 2009 Google Inc. All rights reserved. 1 # Copyright (C) 2009 Google Inc. All rights reserved.
2 # Copyright (C) 2012 Intel Corporation. All rights reserved. 2 # Copyright (C) 2012 Intel Corporation. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 from webkitpy.tool.commands.queries import * 34 from webkitpy.tool.commands.queries import *
35 from webkitpy.tool.mock_tool import MockTool, MockOptions 35 from webkitpy.tool.mock_tool import MockTool, MockOptions
36 36
37 37
38 class PrintExpectationsTest(unittest.TestCase): 38 class PrintExpectationsTest(unittest.TestCase):
39 39
40 def run_test(self, tests, expected_stdout, platform='test-win-win7', **args) : 40 def run_test(self, tests, expected_stdout, platform='test-win-win7', **args) :
41 options = MockOptions(all=False, csv=False, full=False, platform=platfor m, 41 options = MockOptions(all=False, csv=False, full=False, platform=platfor m,
42 include_keyword=[], exclude_keyword=[], paths=Fals e).update(**args) 42 include_keyword=[], exclude_keyword=[], paths=Fals e).update(**args)
43 tool = MockTool() 43 tool = MockTool()
44 tool.port_factory.all_port_names = lambda: TestPort.ALL_BASELINE_VARIANT S 44 tool.port_factory.all_port_names = lambda: [
45 'test-linux-trusty', 'test-linux-precise',
46 'test-mac-mac10.11', 'test-mac-mac10.10',
47 'test-win-win10', 'test-win-win7'
48 ]
45 command = PrintExpectations() 49 command = PrintExpectations()
46 command.bind_to_tool(tool) 50 command.bind_to_tool(tool)
47 51
48 oc = OutputCapture() 52 oc = OutputCapture()
49 try: 53 try:
50 oc.capture_output() 54 oc.capture_output()
51 command.execute(options, tests, tool) 55 command.execute(options, tests, tool)
52 finally: 56 finally:
53 stdout, _, _ = oc.restore_output() 57 stdout, _, _ = oc.restore_output()
54 self.assertMultiLineEqual(stdout, expected_stdout) 58 self.assertMultiLineEqual(stdout, expected_stdout)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 paths=True) 108 paths=True)
105 109
106 110
107 class PrintBaselinesTest(unittest.TestCase): 111 class PrintBaselinesTest(unittest.TestCase):
108 112
109 def setUp(self): 113 def setUp(self):
110 self.oc = None 114 self.oc = None
111 self.tool = MockTool() 115 self.tool = MockTool()
112 self.test_port = self.tool.port_factory.get('test-win-win7') 116 self.test_port = self.tool.port_factory.get('test-win-win7')
113 self.tool.port_factory.get = lambda port_name=None: self.test_port 117 self.tool.port_factory.get = lambda port_name=None: self.test_port
114 self.tool.port_factory.all_port_names = lambda: TestPort.ALL_BASELINE_VA RIANTS 118 self.tool.port_factory.all_port_names = lambda: [
119 'test-linux-trusty', 'test-linux-precise',
120 'test-mac-mac10.11', 'test-mac-mac10.10',
121 'test-win-win10', 'test-win-win7'
122 ]
115 123
116 def tearDown(self): 124 def tearDown(self):
117 if self.oc: 125 if self.oc:
118 self.restore_output() 126 self.restore_output()
119 127
120 def capture_output(self): 128 def capture_output(self):
121 self.oc = OutputCapture() 129 self.oc = OutputCapture()
122 self.oc.capture_output() 130 self.oc.capture_output()
123 131
124 def restore_output(self): 132 def restore_output(self):
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 def test_csv(self): 165 def test_csv(self):
158 command = PrintBaselines() 166 command = PrintBaselines()
159 command.bind_to_tool(self.tool) 167 command.bind_to_tool(self.tool)
160 self.capture_output() 168 self.capture_output()
161 command.execute(MockOptions(all=False, platform='*win7', csv=True, 169 command.execute(MockOptions(all=False, platform='*win7', csv=True,
162 include_virtual_tests=False), ['passes/text. html'], self.tool) 170 include_virtual_tests=False), ['passes/text. html'], self.tool)
163 stdout, _, _ = self.restore_output() 171 stdout, _, _ = self.restore_output()
164 self.assertMultiLineEqual(stdout, 172 self.assertMultiLineEqual(stdout,
165 ('test-win-win7,passes/text.html,None,png,pass es/text-expected.png,None\n' 173 ('test-win-win7,passes/text.html,None,png,pass es/text-expected.png,None\n'
166 'test-win-win7,passes/text.html,None,txt,pass es/text-expected.txt,None\n')) 174 'test-win-win7,passes/text.html,None,txt,pass es/text-expected.txt,None\n'))
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698