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

Side by Side Diff: webkit/plugins/ppapi/url_request_info_unittest.cc

Issue 7706011: Use precompiled headers for most large projects. (Closed) Base URL: ssh://joi@192.168.1.201/home/joi/c/chrome/src@master
Patch Set: Merge to lkgr. Created 9 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
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | webkit/support/webkit_support.gyp » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ppapi/shared_impl/url_request_info_impl.h" 5 #include "ppapi/shared_impl/url_request_info_impl.h"
6 #include "ppapi/thunk/thunk.h" 6 #include "ppapi/thunk/thunk.h"
7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 static TestWebFrameClient web_frame_client_; 112 static TestWebFrameClient web_frame_client_;
113 static WebView* web_view_; 113 static WebView* web_view_;
114 static WebFrame* frame_; 114 static WebFrame* frame_;
115 }; 115 };
116 116
117 TestWebFrameClient URLRequestInfoTest::web_frame_client_; 117 TestWebFrameClient URLRequestInfoTest::web_frame_client_;
118 WebView* URLRequestInfoTest::web_view_; 118 WebView* URLRequestInfoTest::web_view_;
119 WebFrame* URLRequestInfoTest::frame_; 119 WebFrame* URLRequestInfoTest::frame_;
120 120
121 TEST_F(URLRequestInfoTest, GetInterface) { 121 TEST_F(URLRequestInfoTest, GetInterface) {
122 const PPB_URLRequestInfo* interface = 122 const PPB_URLRequestInfo* request_info =
123 ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk(); 123 ::ppapi::thunk::GetPPB_URLRequestInfo_Thunk();
124 EXPECT_TRUE(interface); 124 EXPECT_TRUE(request_info);
125 EXPECT_TRUE(interface->Create); 125 EXPECT_TRUE(request_info->Create);
126 EXPECT_TRUE(interface->IsURLRequestInfo); 126 EXPECT_TRUE(request_info->IsURLRequestInfo);
127 EXPECT_TRUE(interface->SetProperty); 127 EXPECT_TRUE(request_info->SetProperty);
128 EXPECT_TRUE(interface->AppendDataToBody); 128 EXPECT_TRUE(request_info->AppendDataToBody);
129 EXPECT_TRUE(interface->AppendFileToBody); 129 EXPECT_TRUE(request_info->AppendFileToBody);
130 EXPECT_TRUE(interface->Create); 130 EXPECT_TRUE(request_info->Create);
131 EXPECT_TRUE(interface->Create); 131 EXPECT_TRUE(request_info->Create);
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_, 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());
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // Test that forbidden header can't be set with an allowed one. 320 // Test that forbidden header can't be set with an allowed one.
321 SetStringProperty(PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\ncookie: foo"); 321 SetStringProperty(PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\ncookie: foo");
322 EXPECT_TRUE(IsNullOrEmpty(GetHeaderValue("cookie"))); 322 EXPECT_TRUE(IsNullOrEmpty(GetHeaderValue("cookie")));
323 } 323 }
324 324
325 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. 325 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody.
326 326
327 } // namespace ppapi 327 } // namespace ppapi
328 } // namespace webkit 328 } // namespace webkit
329 329
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | webkit/support/webkit_support.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698