OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file input format is based loosely on | 5 // This file input format is based loosely on |
6 // Tools/DumpRenderTree/ImageDiff.m | 6 // Tools/DumpRenderTree/ImageDiff.m |
7 | 7 |
8 // The exact format of this tool's output to stdout is important, to match | 8 // The exact format of this tool's output to stdout is important, to match |
9 // what the run-webkit-tests script expects. | 9 // what the run-webkit-tests script expects. |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <iostream> | 12 #include <iostream> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/file_util.h" | 18 #include "base/file_util.h" |
19 #include "base/files/file_path.h" | 19 #include "base/files/file_path.h" |
20 #include "base/logging.h" | 20 #include "base/logging.h" |
21 #include "base/memory/scoped_ptr.h" | 21 #include "base/memory/scoped_ptr.h" |
22 #include "base/process_util.h" | 22 #include "base/process_util.h" |
23 #include "base/safe_numerics.h" | 23 #include "base/safe_numerics.h" |
24 #include "base/string_util.h" | 24 #include "base/strings/string_util.h" |
25 #include "base/strings/utf_string_conversions.h" | 25 #include "base/strings/utf_string_conversions.h" |
26 #include "ui/gfx/codec/png_codec.h" | 26 #include "ui/gfx/codec/png_codec.h" |
27 #include "ui/gfx/size.h" | 27 #include "ui/gfx/size.h" |
28 | 28 |
29 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
30 #include "windows.h" | 30 #include "windows.h" |
31 #endif | 31 #endif |
32 | 32 |
33 // Causes the app to remain open, waiting for pairs of filenames on stdin. | 33 // Causes the app to remain open, waiting for pairs of filenames on stdin. |
34 // The caller is then responsible for terminating this app. | 34 // The caller is then responsible for terminating this app. |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 base::FilePath(args[1]), | 375 base::FilePath(args[1]), |
376 base::FilePath(args[2])); | 376 base::FilePath(args[2])); |
377 } | 377 } |
378 } else if (args.size() == 2) { | 378 } else if (args.size() == 2) { |
379 return CompareImages(base::FilePath(args[0]), base::FilePath(args[1])); | 379 return CompareImages(base::FilePath(args[0]), base::FilePath(args[1])); |
380 } | 380 } |
381 | 381 |
382 PrintHelp(); | 382 PrintHelp(); |
383 return kStatusError; | 383 return kStatusError; |
384 } | 384 } |
OLD | NEW |