| 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 27 matching lines...) Expand all Loading... |
| 38 class TestWebFrameClient : public WebFrameClient { | 38 class TestWebFrameClient : public WebFrameClient { |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace | 41 } // namespace |
| 42 | 42 |
| 43 namespace webkit { | 43 namespace webkit { |
| 44 namespace ppapi { | 44 namespace ppapi { |
| 45 | 45 |
| 46 class URLRequestInfoTest : public PpapiUnittest { | 46 class URLRequestInfoTest : public PpapiUnittest { |
| 47 public: | 47 public: |
| 48 URLRequestInfoTest() : info_(new PPB_URLRequestInfo_Impl(instance())) { | 48 URLRequestInfoTest() { |
| 49 } |
| 50 |
| 51 virtual void SetUp() OVERRIDE { |
| 52 PpapiUnittest::SetUp(); |
| 53 |
| 54 // Must do this after the normal SetUp so the instance is valid. |
| 55 info_ = new PPB_URLRequestInfo_Impl(instance()); |
| 49 } | 56 } |
| 50 | 57 |
| 51 static void SetUpTestCase() { | 58 static void SetUpTestCase() { |
| 52 web_view_ = WebView::create(NULL); | 59 web_view_ = WebView::create(NULL); |
| 53 web_view_->initializeMainFrame(&web_frame_client_); | 60 web_view_->initializeMainFrame(&web_frame_client_); |
| 54 WebURL web_url(GURL("")); | 61 WebURL web_url(GURL("")); |
| 55 WebURLRequest url_request; | 62 WebURLRequest url_request; |
| 56 url_request.initialize(); | 63 url_request.initialize(); |
| 57 url_request.setURL(web_url); | 64 url_request.setURL(web_url); |
| 58 frame_ = web_view_->mainFrame(); | 65 frame_ = web_view_->mainFrame(); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 ASSERT_FALSE(info_->SetStringProperty( | 279 ASSERT_FALSE(info_->SetStringProperty( |
| 273 PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\ncookie: foo")); | 280 PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\ncookie: foo")); |
| 274 ASSERT_TRUE(IsNullOrEmpty(GetHeaderValue("cookie"))); | 281 ASSERT_TRUE(IsNullOrEmpty(GetHeaderValue("cookie"))); |
| 275 } | 282 } |
| 276 | 283 |
| 277 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. | 284 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. |
| 278 | 285 |
| 279 } // namespace ppapi | 286 } // namespace ppapi |
| 280 } // namespace webkit | 287 } // namespace webkit |
| 281 | 288 |
| OLD | NEW |