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

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

Issue 467133003: Remove webkitpy.thirdparty.mock, webkitpy.common.webkitunittest. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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) 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 12 matching lines...) Expand all
23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 29
30 import unittest 30 import unittest
31 31
32 from webkitpy.common.system.outputcapture import OutputCapture 32 from webkitpy.common.system.outputcapture import OutputCapture
33 from webkitpy.common.system.outputcapture import OutputCapture
34 from webkitpy.thirdparty.mock import Mock
35 from webkitpy.layout_tests.port.test import TestPort 33 from webkitpy.layout_tests.port.test import TestPort
36 from webkitpy.tool.commands.commandtest import CommandsTest
37 from webkitpy.tool.commands.queries import * 34 from webkitpy.tool.commands.queries import *
38 from webkitpy.tool.mocktool import MockTool, MockOptions 35 from webkitpy.tool.mocktool import MockTool, MockOptions
39 36
40 37
41 class PrintExpectationsTest(unittest.TestCase): 38 class PrintExpectationsTest(unittest.TestCase):
42 def run_test(self, tests, expected_stdout, platform='test-win-xp', **args): 39 def run_test(self, tests, expected_stdout, platform='test-win-xp', **args):
43 options = MockOptions(all=False, csv=False, full=False, platform=platfor m, 40 options = MockOptions(all=False, csv=False, full=False, platform=platfor m,
44 include_keyword=[], exclude_keyword=[], paths=Fals e).update(**args) 41 include_keyword=[], exclude_keyword=[], paths=Fals e).update(**args)
45 tool = MockTool() 42 tool = MockTool()
46 tool.port_factory.all_port_names = lambda: TestPort.ALL_BASELINE_VARIANT S 43 tool.port_factory.all_port_names = lambda: TestPort.ALL_BASELINE_VARIANT S
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 150
154 def test_csv(self): 151 def test_csv(self):
155 command = PrintBaselines() 152 command = PrintBaselines()
156 command.bind_to_tool(self.tool) 153 command.bind_to_tool(self.tool)
157 self.capture_output() 154 self.capture_output()
158 command.execute(MockOptions(all=False, platform='*xp', csv=True, include _virtual_tests=False), ['passes/text.html'], self.tool) 155 command.execute(MockOptions(all=False, platform='*xp', csv=True, include _virtual_tests=False), ['passes/text.html'], self.tool)
159 stdout, _, _ = self.restore_output() 156 stdout, _, _ = self.restore_output()
160 self.assertMultiLineEqual(stdout, 157 self.assertMultiLineEqual(stdout,
161 ('test-win-xp,passes/text.html,None,png,passes/text-ex pected.png,None\n' 158 ('test-win-xp,passes/text.html,None,png,passes/text-ex pected.png,None\n'
162 'test-win-xp,passes/text.html,None,txt,passes/text-ex pected.txt,None\n')) 159 'test-win-xp,passes/text.html,None,txt,passes/text-ex pected.txt,None\n'))
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/tool/commands/commandtest.py ('k') | Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698