Chromium Code Reviews| 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" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 | 46 |
| 47 } // namespace | 47 } // namespace |
| 48 | 48 |
| 49 using ppapi::proxy::URLRequestInfoResource; | 49 using ppapi::proxy::URLRequestInfoResource; |
| 50 using ppapi::URLRequestInfoData; | 50 using ppapi::URLRequestInfoData; |
| 51 | 51 |
| 52 namespace content { | 52 namespace content { |
| 53 | 53 |
| 54 class URLRequestInfoTest : public RenderViewTest { | 54 class URLRequestInfoTest : public RenderViewTest { |
| 55 public: | 55 public: |
| 56 URLRequestInfoTest() : pp_instance_(1234) {} | 56 URLRequestInfoTest() : pp_instance_(-1) {} |
|
bbudge
2014/08/19 22:29:15
Maybe a comment explaining this unusual instance v
| |
| 57 | 57 |
| 58 virtual void SetUp() OVERRIDE { | 58 virtual void SetUp() OVERRIDE { |
| 59 RenderViewTest::SetUp(); | 59 RenderViewTest::SetUp(); |
| 60 ppapi::ProxyLock::DisableLockingOnThreadForTest(); | 60 ppapi::ProxyLock::DisableLockingOnThreadForTest(); |
| 61 | 61 |
| 62 test_globals_.GetResourceTracker()->DidCreateInstance(pp_instance_); | 62 test_globals_.GetResourceTracker()->DidCreateInstance(pp_instance_); |
| 63 | 63 |
| 64 // This resource doesn't do IPC, so a null connection is fine. | 64 // This resource doesn't do IPC, so a null connection is fine. |
| 65 info_ = new URLRequestInfoResource( | 65 info_ = new URLRequestInfoResource( |
| 66 ppapi::proxy::Connection(), pp_instance_, URLRequestInfoData()); | 66 ppapi::proxy::Connection(), pp_instance_, URLRequestInfoData()); |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 231 // Test that we can set multiple header fields using \n delimiter. | 231 // Test that we can set multiple header fields using \n delimiter. |
| 232 EXPECT_TRUE( | 232 EXPECT_TRUE( |
| 233 SetStringProperty(PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\nbar: baz")); | 233 SetStringProperty(PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\nbar: baz")); |
| 234 EXPECT_TRUE(IsExpected(GetHeaderValue("foo"), "bar")); | 234 EXPECT_TRUE(IsExpected(GetHeaderValue("foo"), "bar")); |
| 235 EXPECT_TRUE(IsExpected(GetHeaderValue("bar"), "baz")); | 235 EXPECT_TRUE(IsExpected(GetHeaderValue("bar"), "baz")); |
| 236 } | 236 } |
| 237 | 237 |
| 238 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. | 238 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. |
| 239 | 239 |
| 240 } // namespace content | 240 } // namespace content |
| OLD | NEW |