summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/urlmon_moniker_unittest.cc
diff options
context:
space:
mode:
authoramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 23:46:30 +0000
committeramit@chromium.org <amit@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 23:46:30 +0000
commit040b800f9a064e093255e1e5e2718b1cd51275a3 (patch)
treee45d8b11ebaf139529e521503fc3a08313d8f3cd /chrome_frame/test/urlmon_moniker_unittest.cc
parentec140301a87ecf1ba9e70e8031ee521c002b0f32 (diff)
downloadchromium_src-040b800f9a064e093255e1e5e2718b1cd51275a3.zip
chromium_src-040b800f9a064e093255e1e5e2718b1cd51275a3.tar.gz
chromium_src-040b800f9a064e093255e1e5e2718b1cd51275a3.tar.bz2
Do not wrap the original callback if we can;t initialize sniffing cache
CreateStreamOnHGlobal may fail if the underlying GlobalAlloc fails. It has a strange behavaior where if we pass in an HGlobal, it can create more streams per process. So the fix is to: 1. not register us as a bind status callback if we cannot create a stream for sniffing data and 2. When initializing the data sniffing stream pre-create a HGlobal BUG=To be filed TEST=none Review URL: http://codereview.chromium.org/1983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46525 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/urlmon_moniker_unittest.cc')
-rw-r--r--chrome_frame/test/urlmon_moniker_unittest.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome_frame/test/urlmon_moniker_unittest.cc b/chrome_frame/test/urlmon_moniker_unittest.cc
index 7881490..5af4eb3 100644
--- a/chrome_frame/test/urlmon_moniker_unittest.cc
+++ b/chrome_frame/test/urlmon_moniker_unittest.cc
@@ -139,8 +139,8 @@ TEST_F(MonikerPatchTest, SniffDataMetaTag) {
// Initialize 2 sniffers 1 with meta tag and 1 without.
SniffData sniffer1, sniffer2;
- EXPECT_TRUE(sniffer1.InitializeCache(std::wstring()));
- EXPECT_TRUE(sniffer2.InitializeCache(std::wstring()));
+ EXPECT_HRESULT_SUCCEEDED(sniffer1.InitializeCache(std::wstring()));
+ EXPECT_HRESULT_SUCCEEDED(sniffer2.InitializeCache(std::wstring()));
EXPECT_HRESULT_SUCCEEDED(sniffer1.ReadIntoCache(stream_with_meta, true));
EXPECT_HRESULT_SUCCEEDED(sniffer2.ReadIntoCache(stream_no_meta, true));
@@ -158,7 +158,7 @@ TEST_F(MonikerPatchTest, SniffDataPlayback1) {
ScopedComPtr<IStream> stream_with_meta;
SniffData sniffer;
- EXPECT_TRUE(sniffer.InitializeCache(std::wstring()));
+ EXPECT_HRESULT_SUCCEEDED(sniffer.InitializeCache(std::wstring()));
ASSERT_TRUE(ReadFileAsString(kSmallHtmlMetaTag, &small_html_meta_tag));
ASSERT_TRUE(StringToStream(small_html_meta_tag, stream_with_meta.Receive()));
EXPECT_HRESULT_SUCCEEDED(sniffer.ReadIntoCache(stream_with_meta, true));
@@ -201,7 +201,7 @@ TEST_F(MonikerPatchTest, SniffDataPlayback2) {
ScopedComPtr<IStream> stream_with_meta;
SniffData sniffer;
- EXPECT_TRUE(sniffer.InitializeCache(std::wstring()));
+ EXPECT_HRESULT_SUCCEEDED(sniffer.InitializeCache(std::wstring()));
ASSERT_TRUE(ReadFileAsString(kSmallHtmlMetaTag, &small_html_meta_tag));
ASSERT_TRUE(StringToStream(small_html_meta_tag, stream_with_meta.Receive()));
EXPECT_HRESULT_SUCCEEDED(sniffer.ReadIntoCache(stream_with_meta, true));