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

Unified Diff: chrome/browser/printing/printing_layout_uitest.cc

Issue 6326014: Use FilePath::Extension instead of the deprecated file_util::GetFileExtensionFromPath. (Closed)
Patch Set: evan review Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/mini_installer_test/mini_installer_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/printing_layout_uitest.cc
diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc
index d2cdf9d9900e66c024d01f6e41a41b78866f75a7..4f8ede16f16ed9217917b1016bfc4ed3c2a427dc 100644
--- a/chrome/browser/printing/printing_layout_uitest.cc
+++ b/chrome/browser/printing/printing_layout_uitest.cc
@@ -1,11 +1,14 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/command_line.h"
+#include "base/file_path.h"
#include "base/file_util.h"
+#include "base/string_util.h"
#include "base/test/test_file_util.h"
#include "base/threading/simple_thread.h"
+#include "base/utf_string_conversions.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/ui/ui_test.h"
#include "net/test/test_server.h"
@@ -142,8 +145,8 @@ class PrintingLayoutTest : public PrintingTest<UITest> {
found_prn = false;
std::wstring file;
while (!(file = enumerator.Next().ToWStringHack()).empty()) {
- std::wstring ext = file_util::GetFileExtensionFromPath(file);
- if (!_wcsicmp(ext.c_str(), L"emf")) {
+ std::wstring ext = FilePath(file).Extension();
+ if (base::strcasecmp(WideToUTF8(ext).c_str(), ".emf") == 0) {
EXPECT_FALSE(found_emf) << "Found a leftover .EMF file: \"" <<
emf_file << "\" and \"" << file << "\" when looking for \"" <<
verification_name << "\"";
@@ -151,7 +154,7 @@ class PrintingLayoutTest : public PrintingTest<UITest> {
emf_file = file;
continue;
}
- if (!_wcsicmp(ext.c_str(), L"prn")) {
+ if (base::strcasecmp(WideToUTF8(ext).c_str(), ".prn") == 0) {
EXPECT_FALSE(found_prn) << "Found a leftover .PRN file: \"" <<
prn_file << "\" and \"" << file << "\" when looking for \"" <<
verification_name << "\"";
« no previous file with comments | « no previous file | chrome/test/mini_installer_test/mini_installer_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698