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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 153001: Fix 15 coverity complaints.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/url_request/url_request_unittest.h" 5 #include "net/url_request/url_request_unittest.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 899
900 HRESULT result; 900 HRESULT result;
901 IShellLink *shell = NULL; 901 IShellLink *shell = NULL;
902 IPersistFile *persist = NULL; 902 IPersistFile *persist = NULL;
903 903
904 CoInitialize(NULL); 904 CoInitialize(NULL);
905 // Temporarily create a shortcut for test 905 // Temporarily create a shortcut for test
906 result = CoCreateInstance(CLSID_ShellLink, NULL, 906 result = CoCreateInstance(CLSID_ShellLink, NULL,
907 CLSCTX_INPROC_SERVER, IID_IShellLink, 907 CLSCTX_INPROC_SERVER, IID_IShellLink,
908 reinterpret_cast<LPVOID*>(&shell)); 908 reinterpret_cast<LPVOID*>(&shell));
909 EXPECT_TRUE(SUCCEEDED(result)); 909 ASSERT_TRUE(SUCCEEDED(result));
910 result = shell->QueryInterface(IID_IPersistFile, 910 result = shell->QueryInterface(IID_IPersistFile,
911 reinterpret_cast<LPVOID*>(&persist)); 911 reinterpret_cast<LPVOID*>(&persist));
912 EXPECT_TRUE(SUCCEEDED(result)); 912 ASSERT_TRUE(SUCCEEDED(result));
913 result = shell->SetPath(app_path.value().c_str()); 913 result = shell->SetPath(app_path.value().c_str());
914 EXPECT_TRUE(SUCCEEDED(result)); 914 EXPECT_TRUE(SUCCEEDED(result));
915 result = shell->SetDescription(L"ResolveShortcutTest"); 915 result = shell->SetDescription(L"ResolveShortcutTest");
916 EXPECT_TRUE(SUCCEEDED(result)); 916 EXPECT_TRUE(SUCCEEDED(result));
917 result = persist->Save(lnk_path.c_str(), TRUE); 917 result = persist->Save(lnk_path.c_str(), TRUE);
918 EXPECT_TRUE(SUCCEEDED(result)); 918 EXPECT_TRUE(SUCCEEDED(result));
919 if (persist) 919 if (persist)
920 persist->Release(); 920 persist->Release();
921 if (shell) 921 if (shell)
922 shell->Release(); 922 shell->Release();
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 1824
1825 int64 file_size = 0; 1825 int64 file_size = 0;
1826 file_util::GetFileSize(app_path, &file_size); 1826 file_util::GetFileSize(app_path, &file_size);
1827 1827
1828 EXPECT_TRUE(!r.is_pending()); 1828 EXPECT_TRUE(!r.is_pending());
1829 EXPECT_EQ(1, d.response_started_count()); 1829 EXPECT_EQ(1, d.response_started_count());
1830 EXPECT_FALSE(d.received_data_before_response()); 1830 EXPECT_FALSE(d.received_data_before_response());
1831 EXPECT_EQ(d.bytes_received(), 0); 1831 EXPECT_EQ(d.bytes_received(), 0);
1832 } 1832 }
1833 } 1833 }
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698