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

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

Issue 6005: Cross-platform equivalent of fopen, _wfopen_s etc.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 3 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
Index: chrome/browser/printing/printing_layout_uitest.cc
===================================================================
--- chrome/browser/printing/printing_layout_uitest.cc (revision 2711)
+++ chrome/browser/printing/printing_layout_uitest.cc (working copy)
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/command_line.h"
+#include "base/file_util.h"
#include "base/gfx/bitmap_header.h"
#include "base/gfx/platform_device_win.h"
#include "base/gfx/png_decoder.h"
@@ -58,11 +59,9 @@
true,
&compressed));
ASSERT_TRUE(compressed.size());
- FILE* f;
- ASSERT_EQ(_wfopen_s(&f, filename.c_str(), L"wbS"), 0);
- ASSERT_EQ(fwrite(&*compressed.begin(), 1, compressed.size(), f),
- compressed.size());
- fclose(f);
+ ASSERT_EQ(compressed.size(), file_util::WriteFile(filename,
+ compressed.data(),
Mark Mentovai 2008/10/01 17:40:55 std::vector<> has no data(), I think you want &*co
+ compressed.size()));
}
double PercentageDifferent(const Image& rhs) const {

Powered by Google App Engine
This is Rietveld 408576698