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

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

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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) 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/files/file_enumerator.h" 7 #include "base/files/file_enumerator.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 base_path.Append(verification_name + L"_rendering.png")); 166 base_path.Append(verification_name + L"_rendering.png"));
167 emf_content.SaveToPng(rendering); 167 emf_content.SaveToPng(rendering);
168 } 168 }
169 return std::max(diff_png, diff_emf); 169 return std::max(diff_png, diff_emf);
170 } 170 }
171 } 171 }
172 172
173 // Makes sure the directory exists and is empty. 173 // Makes sure the directory exists and is empty.
174 void CleanupDumpDirectory() { 174 void CleanupDumpDirectory() {
175 EXPECT_TRUE(file_util::DieFileDie(emf_path_, true)); 175 EXPECT_TRUE(file_util::DieFileDie(emf_path_, true));
176 EXPECT_TRUE(file_util::CreateDirectory(emf_path_)); 176 EXPECT_TRUE(base::CreateDirectory(emf_path_));
177 } 177 }
178 178
179 // Returns if Clear Type is currently enabled. 179 // Returns if Clear Type is currently enabled.
180 static bool IsClearTypeEnabled() { 180 static bool IsClearTypeEnabled() {
181 BOOL ct_enabled = 0; 181 BOOL ct_enabled = 0;
182 if (SystemParametersInfo(SPI_GETCLEARTYPE, 0, &ct_enabled, 0) && ct_enabled) 182 if (SystemParametersInfo(SPI_GETCLEARTYPE, 0, &ct_enabled, 0) && ct_enabled)
183 return true; 183 return true;
184 UINT smoothing = 0; 184 UINT smoothing = 0;
185 if (SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &smoothing, 0) && 185 if (SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &smoothing, 0) &&
186 smoothing == FE_FONTSMOOTHINGCLEARTYPE) 186 smoothing == FE_FONTSMOOTHINGCLEARTYPE)
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 460
461 // Force a navigation elsewhere to verify that it's fine with it. 461 // Force a navigation elsewhere to verify that it's fine with it.
462 url = test_server()->GetURL("files/printing/test1.html"); 462 url = test_server()->GetURL("files/printing/test1.html");
463 ui_test_utils::NavigateToURL(browser(), url); 463 ui_test_utils::NavigateToURL(browser(), url);
464 } 464 }
465 chrome::CloseWindow(browser()); 465 chrome::CloseWindow(browser());
466 content::RunAllPendingInMessageLoop(); 466 content::RunAllPendingInMessageLoop();
467 467
468 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe"; 468 EXPECT_EQ(0., CompareWithResult(L"iframe")) << L"iframe";
469 } 469 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_service_browsertest.cc ('k') | chrome/browser/profiles/profile_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698