| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 #include "app/gfx/gdi_util.h" | 5 #include "app/gfx/gdi_util.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/simple_thread.h" | 8 #include "base/simple_thread.h" |
| 9 #include "base/win_util.h" | 9 #include "base/win_util.h" |
| 10 #include "chrome/common/chrome_paths.h" | 10 #include "chrome/common/chrome_paths.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 return 100.; | 66 return 100.; |
| 67 } | 67 } |
| 68 | 68 |
| 69 std::wstring verification_file(test_data_directory_.ToWStringHack()); | 69 std::wstring verification_file(test_data_directory_.ToWStringHack()); |
| 70 file_util::AppendToPath(&verification_file, L"printing"); | 70 file_util::AppendToPath(&verification_file, L"printing"); |
| 71 file_util::AppendToPath(&verification_file, verification_name); | 71 file_util::AppendToPath(&verification_file, verification_name); |
| 72 FilePath emf(verification_file + L".emf"); | 72 FilePath emf(verification_file + L".emf"); |
| 73 FilePath png(verification_file + L".png"); | 73 FilePath png(verification_file + L".png"); |
| 74 | 74 |
| 75 // Looks for Cleartype override. | 75 // Looks for Cleartype override. |
| 76 if (file_util::PathExists( | 76 if (file_util::PathExists(verification_file + L"_cleartype.png") && |
| 77 FilePath::FromWStringHack(verification_file + L"_cleartype.png")) && | |
| 78 IsClearTypeEnabled()) { | 77 IsClearTypeEnabled()) { |
| 79 png = FilePath(verification_file + L"_cleartype.png"); | 78 png = FilePath(verification_file + L"_cleartype.png"); |
| 80 } | 79 } |
| 81 | 80 |
| 82 if (GenerateFiles()) { | 81 if (GenerateFiles()) { |
| 83 // Copy the .emf and generate an .png. | 82 // Copy the .emf and generate an .png. |
| 84 file_util::CopyFile(test_result, emf); | 83 file_util::CopyFile(test_result, emf); |
| 85 Image emf_content(emf.value()); | 84 Image emf_content(emf.value()); |
| 86 emf_content.SaveToPng(png); | 85 emf_content.SaveToPng(png); |
| 87 // Saving is always fine. | 86 // Saving is always fine. |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 | 443 |
| 445 // Force a navigation elsewhere to verify that it's fine with it. | 444 // Force a navigation elsewhere to verify that it's fine with it. |
| 446 url = server->TestServerPage("files/printing/test1.html"); | 445 url = server->TestServerPage("files/printing/test1.html"); |
| 447 EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, | 446 EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, |
| 448 tab_proxy->NavigateToURL(url)); | 447 tab_proxy->NavigateToURL(url)); |
| 449 } | 448 } |
| 450 CloseBrowserAndServer(); | 449 CloseBrowserAndServer(); |
| 451 | 450 |
| 452 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe"; | 451 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe"; |
| 453 } | 452 } |
| OLD | NEW |