OLD | NEW |
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" |
11 #include "ppapi/shared_impl/proxy_lock.h" | 11 #include "ppapi/shared_impl/proxy_lock.h" |
12 #include "ppapi/shared_impl/test_globals.h" | 12 #include "ppapi/shared_impl/test_globals.h" |
13 #include "ppapi/shared_impl/url_request_info_data.h" | 13 #include "ppapi/shared_impl/url_request_info_data.h" |
14 #include "ppapi/thunk/thunk.h" | 14 #include "ppapi/thunk/thunk.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 16 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
17 #include "third_party/WebKit/public/web/WebFrame.h" | |
18 #include "third_party/WebKit/public/web/WebFrameClient.h" | 17 #include "third_party/WebKit/public/web/WebFrameClient.h" |
| 18 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
19 #include "third_party/WebKit/public/web/WebView.h" | 19 #include "third_party/WebKit/public/web/WebView.h" |
20 | 20 |
21 // This test is a end-to-end test from the resource to the WebKit request | 21 // This test is a end-to-end test from the resource to the WebKit request |
22 // object. The actual resource implementation is so simple, it makes sense to | 22 // object. The actual resource implementation is so simple, it makes sense to |
23 // test it by making sure the conversion routines actually work at the same | 23 // test it by making sure the conversion routines actually work at the same |
24 // time. | 24 // time. |
25 | 25 |
26 using blink::WebCString; | 26 using blink::WebCString; |
27 using blink::WebFrame; | |
28 using blink::WebFrameClient; | 27 using blink::WebFrameClient; |
29 using blink::WebString; | 28 using blink::WebString; |
30 using blink::WebView; | 29 using blink::WebView; |
31 using blink::WebURL; | 30 using blink::WebURL; |
32 using blink::WebURLRequest; | 31 using blink::WebURLRequest; |
33 | 32 |
34 namespace { | 33 namespace { |
35 | 34 |
36 bool IsExpected(const WebCString& web_string, const char* expected) { | 35 bool IsExpected(const WebCString& web_string, const char* expected) { |
37 const char* result = web_string.data(); | 36 const char* result = web_string.data(); |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\nbar: baz")); | 246 PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\nbar: baz")); |
248 EXPECT_TRUE(IsExpected( | 247 EXPECT_TRUE(IsExpected( |
249 GetHeaderValue("foo"), "bar")); | 248 GetHeaderValue("foo"), "bar")); |
250 EXPECT_TRUE(IsExpected( | 249 EXPECT_TRUE(IsExpected( |
251 GetHeaderValue("bar"), "baz")); | 250 GetHeaderValue("bar"), "baz")); |
252 } | 251 } |
253 | 252 |
254 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. | 253 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. |
255 | 254 |
256 } // namespace content | 255 } // namespace content |
OLD | NEW |