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

Side by Side Diff: content/renderer/pepper/pepper_url_request_unittest.cc

Issue 19492014: PPAPI: Purposely leak ProxyLock, fix shutdown race (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove static initializer Created 7 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 | Annotate | Revision Log
OLDNEW
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/test/render_view_test.h" 6 #include "content/public/test/render_view_test.h"
7 #include "content/renderer/pepper/url_request_info_util.h" 7 #include "content/renderer/pepper/url_request_info_util.h"
8 #include "ppapi/proxy/connection.h" 8 #include "ppapi/proxy/connection.h"
9 #include "ppapi/proxy/url_request_info_resource.h" 9 #include "ppapi/proxy/url_request_info_resource.h"
10 #include "ppapi/shared_impl/proxy_lock.h"
10 #include "ppapi/shared_impl/test_globals.h" 11 #include "ppapi/shared_impl/test_globals.h"
11 #include "ppapi/shared_impl/url_request_info_data.h" 12 #include "ppapi/shared_impl/url_request_info_data.h"
12 #include "ppapi/thunk/thunk.h" 13 #include "ppapi/thunk/thunk.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 #include "third_party/WebKit/public/platform/WebURLRequest.h" 15 #include "third_party/WebKit/public/platform/WebURLRequest.h"
15 #include "third_party/WebKit/public/web/WebFrame.h" 16 #include "third_party/WebKit/public/web/WebFrame.h"
16 #include "third_party/WebKit/public/web/WebFrameClient.h" 17 #include "third_party/WebKit/public/web/WebFrameClient.h"
17 #include "third_party/WebKit/public/web/WebView.h" 18 #include "third_party/WebKit/public/web/WebView.h"
18 #include "webkit/common/user_agent/user_agent.h" 19 #include "webkit/common/user_agent/user_agent.h"
19 #include "webkit/common/user_agent/user_agent_util.h" 20 #include "webkit/common/user_agent/user_agent_util.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 54
54 namespace content { 55 namespace content {
55 56
56 class URLRequestInfoTest : public RenderViewTest { 57 class URLRequestInfoTest : public RenderViewTest {
57 public: 58 public:
58 URLRequestInfoTest() : pp_instance_(1234) { 59 URLRequestInfoTest() : pp_instance_(1234) {
59 } 60 }
60 61
61 virtual void SetUp() OVERRIDE { 62 virtual void SetUp() OVERRIDE {
62 RenderViewTest::SetUp(); 63 RenderViewTest::SetUp();
64 ppapi::ProxyLock::DisableLockingOnThreadForTest();
63 65
64 test_globals_.GetResourceTracker()->DidCreateInstance(pp_instance_); 66 test_globals_.GetResourceTracker()->DidCreateInstance(pp_instance_);
65 67
66 // This resource doesn't do IPC, so a null connection is fine. 68 // This resource doesn't do IPC, so a null connection is fine.
67 info_ = new URLRequestInfoResource(ppapi::proxy::Connection(), 69 info_ = new URLRequestInfoResource(ppapi::proxy::Connection(),
68 pp_instance_, 70 pp_instance_,
69 URLRequestInfoData()); 71 URLRequestInfoData());
70 } 72 }
71 73
72 virtual void TearDown() OVERRIDE { 74 virtual void TearDown() OVERRIDE {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\nbar: baz")); 248 PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\nbar: baz"));
247 EXPECT_TRUE(IsExpected( 249 EXPECT_TRUE(IsExpected(
248 GetHeaderValue("foo"), "bar")); 250 GetHeaderValue("foo"), "bar"));
249 EXPECT_TRUE(IsExpected( 251 EXPECT_TRUE(IsExpected(
250 GetHeaderValue("bar"), "baz")); 252 GetHeaderValue("bar"), "baz"));
251 } 253 }
252 254
253 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. 255 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody.
254 256
255 } // namespace content 257 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_file_chooser_host_unittest.cc ('k') | content/renderer/pepper/v8_var_converter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698