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

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

Issue 2679173005: Rename Host.scm -> Host.git. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import optparse 5 import optparse
6 import unittest 6 import unittest
7 7
8 from webkitpy.common.net.buildbot import Build 8 from webkitpy.common.net.buildbot import Build
9 from webkitpy.common.net.layout_test_results import LayoutTestResults 9 from webkitpy.common.net.layout_test_results import LayoutTestResults
10 from webkitpy.common.system.executive_mock import MockExecutive 10 from webkitpy.common.system.executive_mock import MockExecutive
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 self.assertEqual( 478 self.assertEqual(
479 self.tool.executive.calls, 479 self.tool.executive.calls,
480 [ 480 [
481 [['python', 'echo', 'copy-existing-baselines-internal', '--suffi xes', 'txt,png', 481 [['python', 'echo', 'copy-existing-baselines-internal', '--suffi xes', 'txt,png',
482 '--builder', 'MOCK Win7', '--test', 'userscripts/first-test.ht ml', '--verbose']], 482 '--builder', 'MOCK Win7', '--test', 'userscripts/first-test.ht ml', '--verbose']],
483 [['python', 'echo', 'rebaseline-test-internal', '--suffixes', 't xt,png', 483 [['python', 'echo', 'rebaseline-test-internal', '--suffixes', 't xt,png',
484 '--builder', 'MOCK Win7', '--test', 'userscripts/first-test.ht ml', '--verbose', '--results-directory', '/tmp']] 484 '--builder', 'MOCK Win7', '--test', 'userscripts/first-test.ht ml', '--verbose', '--results-directory', '/tmp']]
485 ]) 485 ])
486 486
487 def test_unstaged_baselines(self): 487 def test_unstaged_baselines(self):
488 scm = self.tool.scm() 488 git = self.tool.git()
489 scm.unstaged_changes = lambda: { 489 git.unstaged_changes = lambda: {
490 'third_party/WebKit/LayoutTests/x/foo-expected.txt': 'M', 490 'third_party/WebKit/LayoutTests/x/foo-expected.txt': 'M',
491 'third_party/WebKit/LayoutTests/x/foo-expected.something': '?', 491 'third_party/WebKit/LayoutTests/x/foo-expected.something': '?',
492 'third_party/WebKit/LayoutTests/x/foo-expected.png': '?', 492 'third_party/WebKit/LayoutTests/x/foo-expected.png': '?',
493 'third_party/WebKit/LayoutTests/x/foo.html': 'M', 493 'third_party/WebKit/LayoutTests/x/foo.html': 'M',
494 'docs/something.md': '?', 494 'docs/something.md': '?',
495 } 495 }
496 self.assertEqual( 496 self.assertEqual(
497 self.command.unstaged_baselines(), 497 self.command.unstaged_baselines(),
498 [ 498 [
499 '/mock-checkout/third_party/WebKit/LayoutTests/x/foo-expected.pn g', 499 '/mock-checkout/third_party/WebKit/LayoutTests/x/foo-expected.pn g',
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 for cmd_line, cwd in commands: 942 for cmd_line, cwd in commands:
943 out = self.run_command(cmd_line, cwd=cwd) 943 out = self.run_command(cmd_line, cwd=cwd)
944 if 'rebaseline-test-internal' in cmd_line: 944 if 'rebaseline-test-internal' in cmd_line:
945 out = '{"remove-lines": [{"test": "%s", "builder": "%s"}]}\n' % (cmd_line[8], cmd_line[6]) 945 out = '{"remove-lines": [{"test": "%s", "builder": "%s"}]}\n' % (cmd_line[8], cmd_line[6])
946 command_outputs.append([0, out, '']) 946 command_outputs.append([0, out, ''])
947 947
948 new_calls = self.calls[num_previous_calls:] 948 new_calls = self.calls[num_previous_calls:]
949 self.calls = self.calls[:num_previous_calls] 949 self.calls = self.calls[:num_previous_calls]
950 self.calls.append(new_calls) 950 self.calls.append(new_calls)
951 return command_outputs 951 return command_outputs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698