Commit 29ac3e73 authored by Sven Zheng's avatar Sven Zheng Committed by Commit Bot

Update pixel test args to gold binary

Remove duplicate keys and update the arg.
See http://crbug.com/1131319#c6

Bug: 1131319
Change-Id: Id113f4b1ce34c3b6b9a74a0fc49ffd7afc188853
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446660Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: default avatarBrian Sheedy <bsheedy@chromium.org>
Commit-Queue: Sven Zheng <svenzheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814334}
parent ff7ccf53
...@@ -67,11 +67,6 @@ void AppendArgsJustAfterProgram(base::CommandLine& cmd, ...@@ -67,11 +67,6 @@ void AppendArgsJustAfterProgram(base::CommandLine& cmd,
base::CommandLine::StringVector args) { base::CommandLine::StringVector args) {
base::CommandLine::StringVector& argv = base::CommandLine::StringVector& argv =
const_cast<base::CommandLine::StringVector&>(cmd.argv()); const_cast<base::CommandLine::StringVector&>(cmd.argv());
int args_size = args.size();
argv.resize(argv.size() + args_size);
for (int i = argv.size() - args_size; i > 1; --i) {
argv[i + args_size - 1] = argv[i - 1];
}
argv.insert(argv.begin() + 1, args.begin(), args.end()); argv.insert(argv.begin() + 1, args.begin(), args.end());
} }
...@@ -238,7 +233,7 @@ bool SkiaGoldPixelDiff::UploadToSkiaGoldServer( ...@@ -238,7 +233,7 @@ bool SkiaGoldPixelDiff::UploadToSkiaGoldServer(
base::ScopedAllowBlockingForTesting allow_blocking; base::ScopedAllowBlockingForTesting allow_blocking;
base::CommandLine cmd(GetAbsoluteSrcRelativePath(kSkiaGoldCtl)); base::CommandLine cmd(GetAbsoluteSrcRelativePath(kSkiaGoldCtl));
cmd.AppendSwitchASCII("test-name", remote_golden_image_name); cmd.AppendSwitchASCII("test-name", remote_golden_image_name);
cmd.AppendSwitchASCII("add-test-key", "source_type:" + corpus_); cmd.AppendSwitchASCII("corpus", corpus_);
cmd.AppendSwitchPath("png-file", local_file_path); cmd.AppendSwitchPath("png-file", local_file_path);
cmd.AppendSwitchPath("work-dir", working_dir_); cmd.AppendSwitchPath("work-dir", working_dir_);
......
...@@ -175,7 +175,7 @@ TEST_F(SkiaGoldPixelDiffTest, DefaultCorpus) { ...@@ -175,7 +175,7 @@ TEST_F(SkiaGoldPixelDiffTest, DefaultCorpus) {
mock_pixel, mock_pixel,
LaunchProcess(AllOf(Property( LaunchProcess(AllOf(Property(
&base::CommandLine::GetCommandLineString, &base::CommandLine::GetCommandLineString,
HasSubstr(FILE_PATH_LITERAL("source_type:gtest-pixeltests")))))) HasSubstr(FILE_PATH_LITERAL("gtest-pixeltests"))))))
.Times(1); .Times(1);
mock_pixel.Init("Prefix"); mock_pixel.Init("Prefix");
bool ret = mock_pixel.CompareScreenshot("test", bitmap); bool ret = mock_pixel.CompareScreenshot("test", bitmap);
...@@ -194,7 +194,7 @@ TEST_F(SkiaGoldPixelDiffTest, ExplicitCorpus) { ...@@ -194,7 +194,7 @@ TEST_F(SkiaGoldPixelDiffTest, ExplicitCorpus) {
EXPECT_CALL(mock_pixel, EXPECT_CALL(mock_pixel,
LaunchProcess(AllOf(Property( LaunchProcess(AllOf(Property(
&base::CommandLine::GetCommandLineString, &base::CommandLine::GetCommandLineString,
HasSubstr(FILE_PATH_LITERAL("source_type:corpus")))))) HasSubstr(FILE_PATH_LITERAL("corpus"))))))
.Times(1); .Times(1);
mock_pixel.Init("Prefix", "corpus"); mock_pixel.Init("Prefix", "corpus");
bool ret = mock_pixel.CompareScreenshot("test", bitmap); bool ret = mock_pixel.CompareScreenshot("test", bitmap);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment