diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 17:40:13 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-01 17:40:13 +0000 |
commit | 836f134c56bfa714217ca12a73482205c1480774 (patch) | |
tree | 5c5b9d938a712e09831bdd32022e1b3716c5fbdf /chrome/browser/printing | |
parent | d46d6f3b80099ce0c630185a2e86b649bba49254 (diff) | |
download | chromium_src-836f134c56bfa714217ca12a73482205c1480774.zip chromium_src-836f134c56bfa714217ca12a73482205c1480774.tar.gz chromium_src-836f134c56bfa714217ca12a73482205c1480774.tar.bz2 |
Cross-platform wrappers for fopen, _wfopen_s, etc.
Patch by Paweł Hajdan jr <phajdan.jr@gmail.com>.
http://codereview.chromium.org/6005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2760 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing')
-rw-r--r-- | chrome/browser/printing/printing_layout_uitest.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc index 943aeb6..359237b 100644 --- a/chrome/browser/printing/printing_layout_uitest.cc +++ b/chrome/browser/printing/printing_layout_uitest.cc @@ -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 @@ class Image { 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, + reinterpret_cast<char*>(&*compressed.begin()), compressed.size())); } double PercentageDifferent(const Image& rhs) const { |