Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(787)

Side by Side Diff: chrome/browser/printing/printing_layout_uitest.cc

Issue 271099: Re-try r29078: Remove some deprecated file_util wstring functions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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(verification_file + L"_cleartype.png") && 76 if (file_util::PathExists(
77 FilePath::FromWStringHack(verification_file + L"_cleartype.png")) &&
77 IsClearTypeEnabled()) { 78 IsClearTypeEnabled()) {
78 png = FilePath(verification_file + L"_cleartype.png"); 79 png = FilePath(verification_file + L"_cleartype.png");
79 } 80 }
80 81
81 if (GenerateFiles()) { 82 if (GenerateFiles()) {
82 // Copy the .emf and generate an .png. 83 // Copy the .emf and generate an .png.
83 file_util::CopyFile(test_result, emf); 84 file_util::CopyFile(test_result, emf);
84 Image emf_content(emf.value()); 85 Image emf_content(emf.value());
85 emf_content.SaveToPng(png); 86 emf_content.SaveToPng(png);
86 // Saving is always fine. 87 // Saving is always fine.
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 444
444 // Force a navigation elsewhere to verify that it's fine with it. 445 // Force a navigation elsewhere to verify that it's fine with it.
445 url = server->TestServerPage("files/printing/test1.html"); 446 url = server->TestServerPage("files/printing/test1.html");
446 EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, 447 EXPECT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS,
447 tab_proxy->NavigateToURL(url)); 448 tab_proxy->NavigateToURL(url));
448 } 449 }
449 CloseBrowserAndServer(); 450 CloseBrowserAndServer();
450 451
451 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe"; 452 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe";
452 } 453 }
OLDNEW
« no previous file with comments | « chrome/browser/jumplist.cc ('k') | chrome/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698