OLD | NEW |
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/thunk/thunk.h" | 5 #include "ppapi/thunk/thunk.h" |
6 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 6 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" | 7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" |
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 10 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 class URLRequestInfoTest : public PpapiUnittest { | 46 class URLRequestInfoTest : public PpapiUnittest { |
47 public: | 47 public: |
48 URLRequestInfoTest() { | 48 URLRequestInfoTest() { |
49 } | 49 } |
50 | 50 |
51 virtual void SetUp() { | 51 virtual void SetUp() { |
52 PpapiUnittest::SetUp(); | 52 PpapiUnittest::SetUp(); |
53 | 53 |
54 // Must be after our base class's SetUp for the instance to be valid. | 54 // Must be after our base class's SetUp for the instance to be valid. |
55 info_ = new PPB_URLRequestInfo_Impl(instance()); | 55 info_ = new PPB_URLRequestInfo_Impl(instance()->pp_instance()); |
56 } | 56 } |
57 | 57 |
58 static void SetUpTestCase() { | 58 static void SetUpTestCase() { |
59 web_view_ = WebView::create(NULL); | 59 web_view_ = WebView::create(NULL); |
60 web_view_->initializeMainFrame(&web_frame_client_); | 60 web_view_->initializeMainFrame(&web_frame_client_); |
61 WebURL web_url(GURL("")); | 61 WebURL web_url(GURL("")); |
62 WebURLRequest url_request; | 62 WebURLRequest url_request; |
63 url_request.initialize(); | 63 url_request.initialize(); |
64 url_request.setURL(web_url); | 64 url_request.setURL(web_url); |
65 frame_ = web_view_->mainFrame(); | 65 frame_ = web_view_->mainFrame(); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 ASSERT_FALSE(info_->SetStringProperty( | 305 ASSERT_FALSE(info_->SetStringProperty( |
306 PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\ncookie: foo")); | 306 PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\ncookie: foo")); |
307 ASSERT_TRUE(IsNullOrEmpty(GetHeaderValue("cookie"))); | 307 ASSERT_TRUE(IsNullOrEmpty(GetHeaderValue("cookie"))); |
308 } | 308 } |
309 | 309 |
310 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. | 310 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. |
311 | 311 |
312 } // namespace ppapi | 312 } // namespace ppapi |
313 } // namespace webkit | 313 } // namespace webkit |
314 | 314 |
OLD | NEW |