OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // WebKitTools/DumpRenderTree/ImageDiff.m | 6 // WebKitTools/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 |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/process_util.h" | 21 #include "base/process_util.h" |
22 #include "base/scoped_ptr.h" | 22 #include "base/scoped_ptr.h" |
23 #include "base/string_util.h" | 23 #include "base/string_util.h" |
24 | 24 |
25 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
26 #include "windows.h" | 26 #include "windows.h" |
27 #endif | 27 #endif |
28 | 28 |
29 // Causes the app to remain open, waiting for pairs of filenames on stdin. | 29 // Causes the app to remain open, waiting for pairs of filenames on stdin. |
30 // The caller is then responsible for terminating this app. | 30 // The caller is then responsible for terminating this app. |
31 static const wchar_t kOptionPollStdin[] = L"use-stdin"; | 31 static const char kOptionPollStdin[] = "use-stdin"; |
32 static const wchar_t kOptionGenerateDiff[] = L"diff"; | 32 static const char kOptionGenerateDiff[] = "diff"; |
33 | 33 |
34 // Return codes used by this utility. | 34 // Return codes used by this utility. |
35 static const int kStatusSame = 0; | 35 static const int kStatusSame = 0; |
36 static const int kStatusDifferent = 1; | 36 static const int kStatusDifferent = 1; |
37 static const int kStatusError = 2; | 37 static const int kStatusError = 2; |
38 | 38 |
39 // Color codes. | 39 // Color codes. |
40 static const uint32 RGBA_RED = 0x000000ff; | 40 static const uint32 RGBA_RED = 0x000000ff; |
41 static const uint32 RGBA_ALPHA = 0xff000000; | 41 static const uint32 RGBA_ALPHA = 0xff000000; |
42 | 42 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 WideToUTF8(values[1]).c_str(), | 355 WideToUTF8(values[1]).c_str(), |
356 WideToUTF8(values[2]).c_str()); | 356 WideToUTF8(values[2]).c_str()); |
357 } | 357 } |
358 } else if (values.size() == 2) { | 358 } else if (values.size() == 2) { |
359 return CompareImages(argv[1], argv[2]); | 359 return CompareImages(argv[1], argv[2]); |
360 } | 360 } |
361 | 361 |
362 PrintHelp(); | 362 PrintHelp(); |
363 return kStatusError; | 363 return kStatusError; |
364 } | 364 } |
OLD | NEW |