From 49ca701d8284678304f3b7b10c877f66a5494b35 Mon Sep 17 00:00:00 2001 From: "tc@google.com" Date: Thu, 16 Oct 2008 20:11:06 +0000 Subject: Take 2 at fixing image corruption on drag and drop. Fix a unittest that needs to specify the size when reading char* data. Review URL: http://codereview.chromium.org/7441 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3478 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/os_exchange_data_unittest.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chrome/common/os_exchange_data_unittest.cc') diff --git a/chrome/common/os_exchange_data_unittest.cc b/chrome/common/os_exchange_data_unittest.cc index 594a91a..f54cb72 100644 --- a/chrome/common/os_exchange_data_unittest.cc +++ b/chrome/common/os_exchange_data_unittest.cc @@ -265,8 +265,8 @@ TEST(OSExchangeDataTest, TestURLExchangeFormats) { STGMEDIUM medium; EXPECT_EQ(S_OK, com_data->GetData(&format_etc, &medium)); - std::string output = - ScopedHGlobal(medium.hGlobal).get(); + ScopedHGlobal glob(medium.hGlobal); + std::string output(glob.get(), glob.Size()); std::string file_contents = "[InternetShortcut]\r\nURL=" + url_spec + "\r\n"; EXPECT_EQ(file_contents, output); ReleaseStgMedium(&medium); -- cgit v1.1