| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 12 #include "base/json/json_value_serializer.h" | 12 #include "base/json/json_string_value_serializer.h" |
| 13 #include "base/md5.h" | 13 #include "base/md5.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/scoped_temp_dir.h" | 15 #include "base/scoped_temp_dir.h" |
| 16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
| 17 #include "base/stringprintf.h" | 17 #include "base/stringprintf.h" |
| 18 #include "base/sys_info.h" | 18 #include "base/sys_info.h" |
| 19 #include "base/test/test_timeouts.h" | 19 #include "base/test/test_timeouts.h" |
| 20 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
| 21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
| 22 #include "chrome/app/chrome_command_ids.h" | 22 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 | 1581 |
| 1582 std::string data; | 1582 std::string data; |
| 1583 ASSERT_NO_FATAL_FAILURE(AssertReadPNG(snapshot_path_, &data)); | 1583 ASSERT_NO_FATAL_FAILURE(AssertReadPNG(snapshot_path_, &data)); |
| 1584 EXPECT_STREQ(kReferenceMd5, base::MD5String(data).c_str()); | 1584 EXPECT_STREQ(kReferenceMd5, base::MD5String(data).c_str()); |
| 1585 if (CommandLine::ForCurrentProcess()->HasSwitch("dump-test-image")) { | 1585 if (CommandLine::ForCurrentProcess()->HasSwitch("dump-test-image")) { |
| 1586 FilePath path(FILE_PATH_LITERAL("snapshot.png")); | 1586 FilePath path(FILE_PATH_LITERAL("snapshot.png")); |
| 1587 EXPECT_EQ(file_util::WriteFile(path, &data[0], data.length()), | 1587 EXPECT_EQ(file_util::WriteFile(path, &data[0], data.length()), |
| 1588 static_cast<int>(data.length())); | 1588 static_cast<int>(data.length())); |
| 1589 } | 1589 } |
| 1590 } | 1590 } |
| OLD | NEW |