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

Side by Side Diff: content/renderer/pepper/pepper_url_request_unittest.cc

Issue 505013002: Remove implicit conversions from scoped_refptr to T* in content/renderer/pepper/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "content/public/common/user_agent.h" 6 #include "content/public/common/user_agent.h"
7 #include "content/public/test/render_view_test.h" 7 #include "content/public/test/render_view_test.h"
8 #include "content/renderer/pepper/url_request_info_util.h" 8 #include "content/renderer/pepper/url_request_info_util.h"
9 #include "ppapi/proxy/connection.h" 9 #include "ppapi/proxy/connection.h"
10 #include "ppapi/proxy/url_request_info_resource.h" 10 #include "ppapi/proxy/url_request_info_resource.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ppapi::thunk::GetPPB_URLRequestInfo_1_0_Thunk(); 125 ppapi::thunk::GetPPB_URLRequestInfo_1_0_Thunk();
126 EXPECT_TRUE(request_info); 126 EXPECT_TRUE(request_info);
127 EXPECT_TRUE(request_info->Create); 127 EXPECT_TRUE(request_info->Create);
128 EXPECT_TRUE(request_info->IsURLRequestInfo); 128 EXPECT_TRUE(request_info->IsURLRequestInfo);
129 EXPECT_TRUE(request_info->SetProperty); 129 EXPECT_TRUE(request_info->SetProperty);
130 EXPECT_TRUE(request_info->AppendDataToBody); 130 EXPECT_TRUE(request_info->AppendDataToBody);
131 EXPECT_TRUE(request_info->AppendFileToBody); 131 EXPECT_TRUE(request_info->AppendFileToBody);
132 } 132 }
133 133
134 TEST_F(URLRequestInfoTest, AsURLRequestInfo) { 134 TEST_F(URLRequestInfoTest, AsURLRequestInfo) {
135 EXPECT_EQ(info_, info_->AsPPB_URLRequestInfo_API()); 135 EXPECT_EQ(info_.get(), info_->AsPPB_URLRequestInfo_API());
136 } 136 }
137 137
138 TEST_F(URLRequestInfoTest, StreamToFile) { 138 TEST_F(URLRequestInfoTest, StreamToFile) {
139 SetStringProperty(PP_URLREQUESTPROPERTY_URL, "http://www.google.com"); 139 SetStringProperty(PP_URLREQUESTPROPERTY_URL, "http://www.google.com");
140 140
141 EXPECT_FALSE(GetDownloadToFile()); 141 EXPECT_FALSE(GetDownloadToFile());
142 142
143 EXPECT_TRUE(SetBooleanProperty(PP_URLREQUESTPROPERTY_STREAMTOFILE, true)); 143 EXPECT_TRUE(SetBooleanProperty(PP_URLREQUESTPROPERTY_STREAMTOFILE, true));
144 EXPECT_TRUE(GetDownloadToFile()); 144 EXPECT_TRUE(GetDownloadToFile());
145 145
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // Test that we can set multiple header fields using \n delimiter. 233 // Test that we can set multiple header fields using \n delimiter.
234 EXPECT_TRUE( 234 EXPECT_TRUE(
235 SetStringProperty(PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\nbar: baz")); 235 SetStringProperty(PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\nbar: baz"));
236 EXPECT_TRUE(IsExpected(GetHeaderValue("foo"), "bar")); 236 EXPECT_TRUE(IsExpected(GetHeaderValue("foo"), "bar"));
237 EXPECT_TRUE(IsExpected(GetHeaderValue("bar"), "baz")); 237 EXPECT_TRUE(IsExpected(GetHeaderValue("bar"), "baz"));
238 } 238 }
239 239
240 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. 240 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody.
241 241
242 } // namespace content 242 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/pepper/ppb_graphics_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698